Kory Wheatley
2008-Jan-10 19:54 UTC
[zfs-discuss] Break a ZFS mirror and concatenate the disks
We have a ZFS mirror setup of two 73GB''s disk, but we are running out of space. I want to break the mirror and join the disk to have a pool of 146GB, and of course not lose the data doing this. What are the commands? To break the mirror I would do zpool detach moodle c1t3d0 NAME STATE READ WRITE CKSUM moodle ONLINE 0 0 0 mirror ONLINE 0 0 0 c1t2d0 ONLINE 0 0 0 c1t3d0 ONLINE 0 0 0 Then could I do zpool add moodle c1t3d0 without losing the data? This message posted from opensolaris.org
Cindy.Swearingen at Sun.COM
2008-Jan-10 20:51 UTC
[zfs-discuss] Break a ZFS mirror and concatenate the disks
Hey Kory, I think you must mean can you detach one of the 73GB disks from moodle and then add it to another pool of 146GB and you want to save the data from the 73GB disk? You can''t do this and save the data. By using zpool detach, you are removing any knowledge of ZFS from that disk. If you want to save the data from moodle, I would add new disks to this pool, either by replacing the 73GB disks with large disks or by adding another mirror, like this: # zpool replace moodle c1t2d0 c2t2d0 # zpool replace moodle c1t3d0 c2t3d0 or: # zpool add moodle mirror c2t2d0 c2t3d0 Maybe I misunderstand what you are trying to do... Cindy Kory Wheatley wrote:> We have a ZFS mirror setup of two 73GB''s disk, but we are running out of space. I want to break the mirror and join the disk to have a pool of 146GB, and of course not lose the data doing this. What are the commands? > To break the mirror I would do > > zpool detach moodle c1t3d0 > > NAME STATE READ WRITE CKSUM > moodle ONLINE 0 0 0 > mirror ONLINE 0 0 0 > c1t2d0 ONLINE 0 0 0 > c1t3d0 ONLINE 0 0 0 > > Then could I do > zpool add moodle c1t3d0 > > without losing the data? > > > This message posted from opensolaris.org > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Richard Elling
2008-Jan-10 21:12 UTC
[zfs-discuss] Break a ZFS mirror and concatenate the disks
(I think Cindy is thinking of something else :-) Kory Wheatley wrote:> We have a ZFS mirror setup of two 73GB''s disk, but we are running out of space. I want to break the mirror and join the disk to have a pool of 146GB, and of course not lose the data doing this. What are the commands? > To break the mirror I would do > > zpool detach moodle c1t3d0 > > NAME STATE READ WRITE CKSUM > moodle ONLINE 0 0 0 > mirror ONLINE 0 0 0 > c1t2d0 ONLINE 0 0 0 > c1t3d0 ONLINE 0 0 0 > > Then could I do > zpool add moodle c1t3d0 > > without losing the data?Yes. This is exactly how to do that. Later, of course, you can attach more disks to protect the data with mirrors. -- richard
Kory Wheatley
2008-Jan-10 21:24 UTC
[zfs-discuss] Break a ZFS mirror and concatenate the disks
Currently c2t2d0 c2t3d0 are setup in a mirror. I want to break the mirror and save the data on c2t2d0 (which both drives are 73g. Then I want to concatenate c2t2do to c2t3d0 so I have a pool of 146GB no longer in a mirror just concatenated. But since their mirror right now I need the data save on one disk so I don''t lose everything. I don''t need to add new disks that not an option I want to break the mirror so I can expand the disks together in a pool but save the data. This message posted from opensolaris.org
Cindy.Swearingen at Sun.COM
2008-Jan-10 21:32 UTC
[zfs-discuss] Break a ZFS mirror and concatenate the disks
Hi Kory, Yes, I get it now. You want to detach one of the disks and then readd the same disk, but lose the redundancy of the mirror. Just as long as you realize you''re losing the redundancy. I''m wondering if zpool add will complain. I don''t have a system to try this at the moment. Cindy Kory Wheatley wrote:> Currently c2t2d0 c2t3d0 are setup in a mirror. I want to break the mirror and save the data on c2t2d0 (which both drives are 73g. Then I want to concatenate c2t2do to c2t3d0 so I have a pool of 146GB no longer in a mirror just concatenated. But since their mirror right now I need the data save on one disk so I don''t lose everything. I don''t need to add new disks that not an option I want to break the mirror so I can expand the disks together in a pool but save the data. > > > This message posted from opensolaris.org > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Jim Dunham
2008-Jan-11 01:46 UTC
[zfs-discuss] Break a ZFS mirror and concatenate the disks
Kory,> Yes, I get it now. You want to detach one of the disks and then readd > the same disk, but lose the redundancy of the mirror. > > Just as long as you realize you''re losing the redundancy. > > I''m wondering if zpool add will complain. I don''t have a system to > try this at the moment.The correct, just verified steps are as follows: zpool detach moodle c2t3d0 zpool add moodle c2t3d0 I performed these steps while the zpool was online, under heavy I/O, with an I/O tool that does data validation. When done, I then performed a final "zpool scrub moodle", with no issues, and then revalidated all the data. As stated earlier, sacrificing redundancy (RAID 1 mirroring) for double the storage (RAID 0 concatenation) is being penny wise, and pound foolish. Jim> > Cindy > > Kory Wheatley wrote: >> Currently c2t2d0 c2t3d0 are setup in a mirror. I want to break the >> mirror and save the data on c2t2d0 (which both drives are 73g. >> Then I want to concatenate c2t2do to c2t3d0 so I have a pool of >> 146GB no longer in a mirror just concatenated. But since their >> mirror right now I need the data save on one disk so I don''t lose >> everything. I don''t need to add new disks that not an option I >> want to break the mirror so I can expand the disks together in a >> pool but save the data. >> >> >> This message posted from opensolaris.org >> _______________________________________________ >> zfs-discuss mailing list >> zfs-discuss at opensolaris.org >> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss