Evening all, I''m new to Solaris but after drooling over zfs for ages I finally took the plunge. First off I had 2x1Tb hdd in raid1 XFS format using mdadm, so using a opensolaris vm image I transfered one side of the mirror to the other in zfs. (using rsync and it took 3days!) So with a 1 disk zpool carrying all my data I brought both the drives over in a new box, all going swimmingly until I realise that instead of mirroring the two drives it seems to have stripped them :-/. Is there a way to to unstrip them and or convert it to a mirror? The drive hasnt been written to since so I don''t know if zfs automatically starts stripping the data between the drives. Even to a non-expert the process of making sure all data is on one disk doesn''t sound complicated but I know it might not be impletmented (yet!) Any ideas or will I have to get a 3rd drive to move all the data onto, destroy the zpool and start from scratch? Maquis196 -- This message posted from opensolaris.org
Christopher May wrote:> Evening all, I''m new to Solaris but after drooling over zfs for ages I finally took the plunge. > > First off I had 2x1Tb hdd in raid1 XFS format using mdadm, so using a opensolaris vm image I transfered one side of the mirror to the other in zfs. (using rsync and it took 3days!) > > So with a 1 disk zpool carrying all my data I brought both the drives over in a new box, all going swimmingly until I realise that instead of mirroring the two drives it seems to have stripped them :-/. > > Is there a way to to unstrip them and or convert it to a mirror? The drive hasnt been written to since so I don''t know if zfs automatically starts stripping the data between the drives. Even to a non-expert the process of making sure all data is on one disk doesn''t sound complicated but I know it might not be impletmented (yet!) > > Any ideas or will I have to get a 3rd drive to move all the data onto, destroy the zpool and start from scratch? > >I''m afraid you will. Look on the bright side and count your self lucky you learned this hard lesson early! -- Ian.
Christopher May wrote:> Evening all, I''m new to Solaris but after drooling over zfs for ages I finally took the plunge. > > First off I had 2x1Tb hdd in raid1 XFS format using mdadm, so using a opensolaris vm image I transfered one side of the mirror to the other in zfs. (using rsync and it took 3days!) > > So with a 1 disk zpool carrying all my data I brought both the drives over in a new box, all going swimmingly until I realise that instead of mirroring the two drives it seems to have stripped them :-/. >You wouldn''t be surprised by the number of people who manage to do that first time around.> Is there a way to to unstrip them and or convert it to a mirror? The drive hasnt been written to since so I don''t know if zfs automatically starts stripping the data between the drives. Even to a non-expert the process of making sure all data is on one disk doesn''t sound complicated but I know it might not be impletmented (yet!) >It''s not implemented yet... RFE 4852783 reduce pool capacity> Any ideas or will I have to get a 3rd drive to move all the data onto, destroy the zpool and start from scratch?Yes. You can then use the 3rd disk to make backups to keep off-site, or similar. Been there, done that myself ;-) -- Andrew
>>>>> "cm" == Christopher May <maquis196 at yahoo.co.uk> writes:cm> Is there a way to to unstrip them and or convert it to a cm> mirror? The drive hasnt been written to since so I don''t know cm> if zfs automatically starts stripping the data between the cm> drives. There is no supported way and have been no reports of anyone''s forcing it to happen so far. I think you should buy the third drive. If you can find a small drive laying around, here is another option that might work, but you could lose the whole pool due to some miscalculation or another mistake: 1. make a new, small 1-drive zpool on the small drive 2. make a 1TB zvol on the small zpool, without reservation (zfs create -Vs). so the zvol is larger than the pool. 3. ''zpool replace'' the mostly-empty disk with the sparse zvol. wait for resilver. you can tell which disk is mostly empty using ''zpool iostat -v''. 4. create a new zpool on the just-freed 1TB drive 5. rsync from 2TB zpool onto 1TB zpool, another 3 days 6. destroy the old 2TB zpool. ''zpool attach'' the freed 1TB drive to the new zpool. untested, YMMV. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 304 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20081113/073dea74/attachment.bin>
On Qui, 2008-11-13 at 16:07 -0500, Miles Nordin wrote:> If you can find a small drive laying around, here is another option > that might work, but you could lose the whole pool due to some > miscalculation or another mistake: > > 1. make a new, small 1-drive zpool on the small drive > > 2. make a 1TB zvol on the small zpool, without reservation (zfs > create -Vs). so the zvol is larger than the pool. > > 3. ''zpool replace'' the mostly-empty disk with the sparse zvol. wait > for resilver.That''s an interesting idea.. However, for safety I would suggest that instead of replacing the mostly-empty disk with the sparse zvol, to *attach* the sparse zvol to the mostly-empty disk. If the attach completes successfully, then it should be safe to detach the mostly-empty disk and create a new pool there. Regards, Ricardo