Problems replacing failing drive in ZFS pool

Garrett Moore garrettmoore at gmail.com
Mon Jul 19 15:56:13 UTC 2010


So you think it's because when I switch from the old disk to the new disk,
ZFS doesn't realize the disk has changed, and thinks the data is just
corrupt now? Even if that happens, shouldn't the pool still be available,
since it's RAIDZ1 and only one disk has gone away?

I don't have / on ZFS; I'm only using it as a 'data' partition, so I should
be able to try your suggestion. My only concern: is there any risk of
trashing my pool if I try your instructions? Everything I've done so far,
even when told "insufficient replicas / corrupt data", has not cost me any
data as long as I switch back to the original (dying) drive. If I mix in
export/import statements which might 'touch' the pool, is there a chance it
will choke and trash my data?



On Mon, Jul 19, 2010 at 11:45 AM, Freddie Cash <fjwcash at gmail.com> wrote:

> On Mon, Jul 19, 2010 at 8:21 AM, Garrett Moore <garrettmoore at gmail.com>
> wrote:
> > I have an 8-drive ZFS array consisting of WD15EADS drives. One of my
> disks
> > has started to fail, so I got a replacement disk. I have replaced a disk
> > before by:
> >
> >  zpool offline tank /dev/da5
> > shutting down, swapping from old disk to new disk
> > booting
> >  zpool replace tank /dev/da5
> >
> > This worked fine.
> >
> > This time the failing disk was da3, and I tried the same thing:
> >  zpool offline tank /dev/da3
> > zpool status showed da3 offline.
> > shut down, swapped old disk to new disk.
>
> For some reason, ZFS is getting confused by the device names, possibly
> due to the controller renumbering device nodes?
>
> Try the following:
>   zpool offline tank /dev/da3
>   zpool status tank                           to make sure it offlined
> the correct drive
>  zpool export tank                           might have to do this
> from single-user mode
>  reboot
>
>  zpool import tank                           this forces ZFS to
> re-taste each drive to read the metadata
>  zpool replace tank /dev/da3            this should force it to use
> the correct drive
>
> Note:  if you have / on ZFS, the above may not be doable.
>
> --
> Freddie Cash
> fjwcash at gmail.com
> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"
>


More information about the freebsd-stable mailing list