ZFS zpool mirror drive replacement confusion

Martin Cracauer cracauer at cons.org
Thu Aug 11 17:45:14 UTC 2011


Freddie Cash wrote on Thu, Aug 11, 2011 at 09:36:07AM -0700: 
> On Thu, Aug 11, 2011 at 9:30 AM, Andriy Gapon <avg at freebsd.org> wrote:
> 
> > on 11/08/2011 19:03 Martin Cracauer said the following:
> 
> > It didn't
> 
> > >   let me, saying it can only remove drives from mirror or raid sets.
> > >   I think it should have been possible before I mounted the filesystem
> > >   in there read-write for the first time after the drive add.  This
> > >   seems like an easy mistake to make.
> >
> > This has been reported to the ZFS people (upstream) many times, still they
> > didn't
> > add any safety nets.
> >
> > There's a very big safety net included already:  zpool will error out
> complaining about mis-matched vdevs if you try to "zpool add" a single disk
> to a pool with a mirror vdev.  In fact, the user has to add "-f" (force) to
> the "zpool add" command in order for this to even happen.  IOW, this is user
> error, not "lack of safety nets".  :)

I only issued the -f since the filesystem in there isn't important but
anyway.

The problem here isn't so much safety net in code.  But I don't think
the manpage is doing a good job explaining specifically how to replace
failed drives in raidz and mirrors, respectively.  Ending up doing a
drive add to the zpool instead like I did is pretty easy, in
particular if you are coming from traditional block device level raid
systems.

I also don't think that the behavior observed (add device to the pool
and make it unremovable even before the filesystem is even mounted) is
very intuitive.

Sending snapshots, I was hoping for something that would send all
snapshots at once (a clone of the complete filesystem).

Martin
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin Cracauer <cracauer at cons.org>   http://www.cons.org/cracauer/


More information about the freebsd-fs mailing list