If when creating a ZFS pool you add more disks that planned, is there a way of removing those disks - say a mirrored pair - without having to trash the whole pool??? This message posted from opensolaris.org
On Thu, Dec 22, 2005 at 01:20:33PM -0800, Phil Coleman wrote:> If when creating a ZFS pool you add more disks that planned, is there > a way of removing those disks - say a mirrored pair - without having > to trash the whole pool???You can detach individual disks from a mirror using ''zpool detach''. You cannot currently remove toplevel vdevs (i.e. unmirrored disks) from a pool. See: http://www.opensolaris.org/os/community/zfs/faq/#deviceremoval As well as: 4852783 reduce pool capacity It''s on our short list. - Eric -- Eric Schrock, Solaris Kernel Development http://blogs.sun.com/eschrock
Thanks for that. WIll keep an eye on the updates. This message posted from opensolaris.org
Constantin Gonzalez
2006-Jan-04 16:41 UTC
[zfs-discuss] Re: Removing disks from a ZFS pool
Hi, Phil Coleman wrote:> Thanks for that. WIll keep an eye on the updates.Here''s a workaround, if you have some space to spare. Shrinking pools can be done by migrating the zfs filesystems to a free pool, provided you have some spare space, then migrating back. (Detaching a disk from a mirror might provide the space in an emergency situation, but is obviously not recommended.) I''ve migrated a lot of my own zfs filesystems using: zfs snapshot foo/bar at now zfs backup foo/bar at now | zfs restore baz/bar (note that this will create both baz/bar and baz/bar at now) (do that for all zfs filesystems in foo) zfs destroy foo zfs create foo (with whatever disks and scheme you prefer to use) zfs backup baz/bar at now | zfs restore foo/bar at now (you may want to zfs destroy any migration snapshots you don''t want anymore) worked fine a number of times until I found the perfect setup for my own disks :) (Takes some time, though...). Hope this helps, Constantin -- Constantin Gonzalez Sun Microsystems GmbH Consultant, Platform Technology Group Germany Client Solutions http://www.sun.de/ Tel.: +49 89/4 60 08-25 91 http://blogs.sun.com/constantin/
That is important for "lease rollover" as well. Right now with create an additional mirror on the new disk box and then detach the mirror on the old one. Something similar must be a available in around 3 years after we go live with ZFS 8-). This message posted from opensolaris.org