Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Aug 2011 12:28:38 -0400
From:      Martin Cracauer <cracauer@cons.org>
To:        Adam Vande More <amvandemore@gmail.com>
Cc:        freebsd-fs@freebsd.org, Martin Cracauer <cracauer@cons.org>
Subject:   Re: ZFS zpool mirror drive replacement confusion
Message-ID:  <20110811162838.GA29108@cons.org>
In-Reply-To: <CA%2BtpaK2wkoD3axNK=jxdOdWz2UV8210q=3mssrh%2B2OohcxpXpw@mail.gmail.com>
References:  <20110811160314.GA25076@cons.org> <CA%2BtpaK2wkoD3axNK=jxdOdWz2UV8210q=3mssrh%2B2OohcxpXpw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Adam Vande More wrote on Thu, Aug 11, 2011 at 11:10:34AM -0500: 
> On Thu, Aug 11, 2011 at 11:03 AM, Martin Cracauer <cracauer@cons.org> wrote:
> 
> >        NAME        STATE     READ WRITE CKSUM
> >        cbackup3    DEGRADED     0     0     0
> >          mirror    DEGRADED     0     0     0
> >            ad6     ONLINE       0     0     0
> >            ad10    REMOVED      0     0     0
> >          ad2       ONLINE       0     0    11
> >
> > Unfortunately I didn't keep note of the specific command that I used.
> >
> > Two questions:
> >
> > - Does somebody know offhand what I did and what I should have done
> >  instead to get ad2 into the mirror?
> >
> 
> What you did is add a disk to the zpool, not the mirror.

`zpool history` shows:

"zpool add -f cbackup3 ad2"

What would have been correct?

`zpool attach cbackup3 ad6 ad2`  ?

`zpool replace cbackup ad10 ad2` ?

I guess they are equivalent except the first one would create a
degraded three-way mirror.

> > - Would there have been a way to remove ad2 from this set?
> >
> 
> I'm not sure of a way to remove the vdev other than to recreate from scratch
> but perhaps the new features of zpool v28 allow for some forgiveness here.


That reminds me to ask:

Is there a way to clone a ZFS filesystem (not pool) including all
snapshots inside? 

Let's say I have a 3-disk raidz filesystem with a bunch of snapshots
and I want to go to new disks in a mirror setup.  Is there a better
way than doing an rsync snapshot by snapshot going forward?

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110811162838.GA29108>