Thanks Bruno,

Sorry for not replying earlier, but I've been away from my work email.

The fix you provided allows me to get further: I can now allocate
devices to the array, but mondorestore segfaults when I choose 'OK'
after specifying the devices to use; I've tried with both existing RAID
autodetect partitions, and with empty disks that I've 'added' RAID
partitions to using mondorestore's partition editor.

Regards,


John Pearson.

Bruno Cornec wrote:
> John Pearson said on Thu, Mar 15, 2007 at 08:59:20AM +1030:
>
>   
>> Ran 'ps fx' on another tty, which showed commands like
>>   grep " /proc/mdstatraid1" > /dev/null 2>/dev/null
>> It looks like this should be
>>   grep "raid1" "/proc/mdstat" ....
>>     
>
> Oh yes. I fixed that in the stable SVN branch since, but I didn't for
> the future 2.2.2. Thanks for reporting that. I've now committed it as
> rev 1253 of SVN - http://trac.mondorescue.org/changeset/1253
>
> Could you try to add the patch to your tree:
>
> --- mondo/src/common/libmondo-raid.c    (révision 1247)
> +++ mondo/src/common/libmondo-raid.c    (copie de travail)
> @@ -80,13 +80,13 @@
>         int res;
>
>         command = malloc(MAX_STR_LEN * 2);
> -       strcpy(command, "grep \" /proc/mdstat");
> +       strcpy(command, "grep \"");
>         if (raidno == -1) {
>                 strcat(command, "linear");
>         } else {
>                 sprintf(command + strlen(command), "raid%d", raidno);
>         }
> -       strcat(command, "\" > /dev/null 2> /dev/null");
> +       strcat(command, "\" /proc/mdstat > /dev/null 2> /dev/null");
>         log_it("Is raid %d registered? Command = '%s'", raidno,
> command);
>         res = system(command);
>         paranoid_free(command);
>
>
>   


-- 
[EMAIL PROTECTED]  |   The greatest problem in communication is
Network Administrator    | the illusion that it has been accomplished
+61 4 0739 1169          |   - George Bernard Shaw: The Sanity of Art

Reply via email to