[zfs-discuss] Attaching a mirror to a mirror

2009-03-26 Thread Matthew Angelo
Assuming I have a zpool which consists of a simple 2 disk mirror. How do I attach a third disk (disk3) to this zpool to mirror the existing data? Then split this mirror and remove disk0 and disk1, leaving a single disk zpool which consist of the new disk3. AKA. Online data migration.

Re: [zfs-discuss] Attaching a mirror to a mirror

2009-03-26 Thread Francois Napoleoni
Hi Matthew, Just attach disk3 to existing mirrored tlv Wait for resilvering to complete Dettach disk0 and disk1 This will leave you with only disk3 in your pool. You will loose ZFS redundancy fancy features (self healing, ...). # zpool create test mirror /export/disk0 /export/disk1 # zpool

Re: [zfs-discuss] Attaching a mirror to a mirror

2009-03-26 Thread Matthew Angelo
Hi Francis, Thanks for confirming. That did the trick. I kept thinking I had to mirror at the highest level (zpool), then split. I actually did it in one less step than you mention by using replace instead of attach then detach but what you said is 100% correct. zpool replace /root/zfs/disk0