* Jean-Louis Martineau <[email protected]> [20100112 14:27]:
> Jean-Francois,
>
> It is a bug that the index files are removed for 'strategy skip' dles.
> The attached patch fix it.
Thanks Jean-Louis,
I've applied the patch and will recompile later.
jf
>
> Jean-Louis
>
> Jean-Francois Malouin wrote:
>> Hi,
>>
>> Last Friday we got bitten by a rather vicious raid controller
>> firmware/codeset that corrupted some of our raidsets when a disk
>> failed in the array and the controller started a rebuild. Seeing that
>> I quickly disabled some of DLEs involved by either commenting them out
>> or inserting a `strategy skip' stanza in the dumptypes while we
>> researched/solved the issue.
>>
>> This is with amanda-2.6.1p2 both on clients and servers.
>>
>> Once the firmware issue was sorted out and the affected raidsets
>> rebuilt I tried to restore them as they were prior to the failure
>> just to see that the index files for those DLEs had disappeared.
>> I had to retrieve them from the backups, but that made me a little
>> nervous that something else was at work. Of course I could have used
>> amfetchdump rather than amrecover, but that begs the question:
>>
>> What is the `proper' way to deal with a situation like this:
>> commenting away the DLEs or use 'strategy skip'?
>>
>> I'm quite please to say: I restored of 3TB of data with no glitch
>> whatsoever once the index files were put back in place. Amanda is quite
>> a nice piece of software!
>>
>> thanks,
>> jf
>>
>
> diff --git a/server-src/amadmin.c b/server-src/amadmin.c
> index 1af5386..b6bd60a 100644
> --- a/server-src/amadmin.c
> +++ b/server-src/amadmin.c
> @@ -1037,6 +1037,7 @@ find(
> char *sort_order = NULL;
> find_result_t *output_find;
> char *errstr;
> + disk_t *dp;
>
> if(argc < 3) {
> g_fprintf(stderr,
> @@ -1082,6 +1083,11 @@ find(
> } else {
> start_argc=4;
> }
> +
> + /* Enable all 'strategy skip' dles */
> + for (dp = diskq.head; dp != NULL; dp = dp->next) {
> + dp->todo = 1;
> + }
> errstr = match_disklist(&diskq, argc-(start_argc-1),
> argv+(start_argc-1));
>
> output_find = find_dump(&diskq); /* Add deleted dump to diskq */
> diff --git a/server-src/amindexd.c b/server-src/amindexd.c
> index f20a914..3c35add 100644
> --- a/server-src/amindexd.c
> +++ b/server-src/amindexd.c
> @@ -682,6 +682,7 @@ check_and_load_config(
> char *conf_tapelist;
> char *conf_indexdir;
> struct stat dir_stat;
> + disk_t *dp;
>
> /* check that the config actually exists */
> if (config == NULL) {
> @@ -706,6 +707,11 @@ check_and_load_config(
> return -1;
> }
>
> + /* Enable all 'strategy skip' dles */
> + for (dp = disk_list.head; dp != NULL; dp = dp->next) {
> + dp->todo = 1;
> + }
> +
> conf_tapelist = config_dir_relative(getconf_str(CNF_TAPELIST));
> if(read_tapelist(conf_tapelist)) {
> reply(501, _("Could not read tapelist file %s!"), conf_tapelist);
> diff --git a/server-src/amtrmidx.c b/server-src/amtrmidx.c
> index 9a28848..e7a62b9 100644
> --- a/server-src/amtrmidx.c
> +++ b/server-src/amtrmidx.c
> @@ -110,6 +110,11 @@ main(
> read_diskfile(conf_diskfile, &diskl);
> amfree(conf_diskfile);
>
> + /* Enable all 'strategy skip' dles */
> + for (diskp = diskl.head; diskp != NULL; diskp = diskp->next) {
> + diskp->todo = 1;
> + }
> +
> if (config_errors(NULL) >= CFGERR_WARNINGS) {
> config_print_errors();
> if (config_errors(NULL) >= CFGERR_ERRORS) {
--
<° >< Jean-François Malouin McConnell Brain Imaging Centre
Systems/Network Administrator Montréal Neurological Institute
3801 Rue University, Suite WB219 Montréal, Québec, H3A 2B4
Phone: 514-398-8924 Fax: 514-398-8948