zpool import reboots computer

Martin Ranne martin.ranne at kockumsonics.com
Wed Jan 25 16:10:23 UTC 2012


Thank you everyone who have helped me with hacking zfs. We have now been able to do an import of the pool and transfered all the data to another computer. Next step is to see if we can quickly repair the pool or just delete it and make it new again.

We hacked the functions vdev_mirror_child_select() and vdev_mirror_io_start(). In vdev_mirror_io_start() we added the code below just after the mc pointer was set in both loops.

if (mc->mc_vd == NULL) {
    (void) printf("mc->mc_vd is NULL. Child %i\n", c);
    continue;
}

In vdev_mirror_child_select(), we added the code below just after the mc pointer was set.

if (mc->mc_vd == NULL) {
    (void) printf("mc->mc_vd is NULL. Child %i\n", c);
    mc->mc_tried = 1;
    mc->mc_skipped = 1;
    continue;
}


Best regards,

Martin Ranne

>On 2012-01-23 21:31, Andriy Gapon wrote: 
>>on 23/01/2012 20:33 Martin Ranne said the following:
>>Have done some checking and found mc->mc_vd == NULL in the function vdev_mirror_io_start() where the while-loop is. 
>>
>>while (children--) { 
>>    mc = &mm->mm_child[c];
>>    zio_nowait(zio_vdev_child_io(zio, zio->io_bp,
>>        mc->mc_vd, mc->mc_offset, zio->io_data, zio->io_size,
>>        zio->io_type, zio->io_priority, 0,
>>        vdev_mirror_child_done, mc));
>>    c++;
>>}
>>
>>if i set a break before it runs zio_nowait() it will still crash the kernel. 
>>What can i check next for it to be able to continue? Is it possible to have it ignore the child where mc_vd is NULL? I am also looking into what more I can do to debug it (adding code to print to console as i can not use kernel dumps).
>>
>Not sure.  If by "set a break" you mean inserting a break statement, try
>continue instead.
>



More information about the freebsd-fs mailing list