I have a zpool named rtank. I accidently attached a single drive to the pool. I am an idiot I know :D Now I want to replace this single drive with a raidz group. Below is the pool setup and what I tried: NAME STATE READ WRITE CKSUM rtank ONLINE 0 0 0 - raidz1 ONLINE 0 0 0 -- c4t0d0 ONLINE 0 0 0 -- c4t1d0 ONLINE 0 0 0 -- c4t2d0 ONLINE 0 0 0 -- c4t3d0 ONLINE 0 0 0 -- c4t4d0 ONLINE 0 0 0 -- c4t5d0 ONLINE 0 0 0 -- c4t6d0 ONLINE 0 0 0 -- c4t7d0 ONLINE 0 0 0 - raidz1 ONLINE 0 0 0 -- c3t0d0 ONLINE 0 0 0 -- c3t1d0 ONLINE 0 0 0 -- c3t2d0 ONLINE 0 0 0 -- c3t3d0 ONLINE 0 0 0 -- c3t4d0 ONLINE 0 0 0 -- c3t5d0 ONLINE 0 0 0 - c5d0 ONLINE 0 0 0 <--- single drive in the pool not in any raidz $ pfexec zpool replace rtank c5d0 raidz c3t6d0 c3t7d0 c3t8d0 c3t9d0 c3t10d0 c3t11d0 too many arguments $ zpool upgrade -v This system is currently running ZFS pool version 18. Is what I am trying to do possible? If so what am I doing wrong? Thanks. -- This message posted from opensolaris.org
Bob Friesenhahn
2009-Sep-26 01:58 UTC
[zfs-discuss] ZFS pool replace single disk with raidz
On Fri, 25 Sep 2009, Ryan Hirsch wrote:> I have a zpool named rtank. I accidently attached a single drive to > the pool. I am an idiot I know :D Now I want to replace this single > drive with a raidz group. Below is the pool setup and what I tried:I think that the best you will be able to do is the turn this single drive into a mirror. It seems that this sort of human error occurs pretty often and there is not yet a way to properly fix it. Bob -- Bob Friesenhahn bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Alas you need the fix for: http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4852783 Until that arrives mirror the disk or rebuild the pool. --chris -- This message posted from opensolaris.org
To: ZFS Developers. I know we hate them but an "Are you sure?" may have helped here, and may be a quicker fix than waiting for 4852783 (just thinking out loud here). Could the zfs command have worked out c5d0 was a single disk and attaching it to the pool would have been dumb? Ryan Hirsch wrote: I have a zpool named rtank. I accidently attached a single drive to the pool. I am an idiot I know :D Now I want to replace this single drive with a raidz group. Below is the pool setup and what I tried: NAME STATE READ WRITE CKSUM rtank ONLINE 0 0 0 - raidz1 ONLINE 0 0 0 -- c4t0d0 ONLINE 0 0 0 -- c4t1d0 ONLINE 0 0 0 -- c4t2d0 ONLINE 0 0 0 -- c4t3d0 ONLINE 0 0 0 -- c4t4d0 ONLINE 0 0 0 -- c4t5d0 ONLINE 0 0 0 -- c4t6d0 ONLINE 0 0 0 -- c4t7d0 ONLINE 0 0 0 - raidz1 ONLINE 0 0 0 -- c3t0d0 ONLINE 0 0 0 -- c3t1d0 ONLINE 0 0 0 -- c3t2d0 ONLINE 0 0 0 -- c3t3d0 ONLINE 0 0 0 -- c3t4d0 ONLINE 0 0 0 -- c3t5d0 ONLINE 0 0 0 - c5d0 ONLINE 0 0 0 <--- single drive in the pool not in any raidz $ pfexec zpool replace rtank c5d0 raidz c3t6d0 c3t7d0 c3t8d0 c3t9d0 c3t10d0 c3t11d0 too many arguments $ zpool upgrade -v This system is currently running ZFS pool version 18. Is what I am trying to do possible? If so what am I doing wrong? Thanks. -- Trevor Pretty | Technical Account Manager | +64 9 639 0652 | +64 21 666 161 Eagle Technology Group Ltd. Gate D, Alexandra Park, Greenlane West, Epsom Private Bag 93211, Parnell, Auckland www.eagle.co.nz This email is confidential and may be legally privileged. If received in error please destroy and immediately notify us. _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Richard Elling
2009-Sep-27 22:00 UTC
[zfs-discuss] ZFS pool replace single disk with raidz
On Sep 27, 2009, at 2:28 PM, Trevor Pretty wrote:> > To: ZFS Developers. > > I know we hate them but an "Are you sure?" may have helped here, and > may be a quicker fix than waiting for 4852783 (just thinking out > loud here). Could the zfs command have worked out c5d0 was a single > disk and attaching it to the pool would have been dumb?It already does this, and has for some time. # zpool create zwimming raidz /dev/ramdisk/rd1 /dev/ramdisk/rd2 /dev/ ramdisk/rd3 # zpool add zwimming /dev/ramdisk/rd4 invalid vdev specification use ''-f'' to override the following errors: mismatched replication level: pool uses raidz and new vdev is disk Which basically prompts someone to add the "-f" See also the first great debate on zfs-discuss. -- richard> > > Ryan Hirsch wrote: >> >> I have a zpool named rtank. I accidently attached a single drive >> to the pool. I am an idiot I know :D Now I want to replace this >> single drive with a raidz group. Below is the pool setup and what >> I tried: >> >> >> NAME STATE READ WRITE CKSUM >> rtank ONLINE 0 0 0 >> - raidz1 ONLINE 0 0 0 >> -- c4t0d0 ONLINE 0 0 0 >> -- c4t1d0 ONLINE 0 0 0 >> -- c4t2d0 ONLINE 0 0 0 >> -- c4t3d0 ONLINE 0 0 0 >> -- c4t4d0 ONLINE 0 0 0 >> -- c4t5d0 ONLINE 0 0 0 >> -- c4t6d0 ONLINE 0 0 0 >> -- c4t7d0 ONLINE 0 0 0 >> - raidz1 ONLINE 0 0 0 >> -- c3t0d0 ONLINE 0 0 0 >> -- c3t1d0 ONLINE 0 0 0 >> -- c3t2d0 ONLINE 0 0 0 >> -- c3t3d0 ONLINE 0 0 0 >> -- c3t4d0 ONLINE 0 0 0 >> -- c3t5d0 ONLINE 0 0 0 >> - c5d0 ONLINE 0 0 0 <--- single drive >> in the pool not in any raidz >> >> >> $ pfexec zpool replace rtank c5d0 raidz c3t6d0 c3t7d0 c3t8d0 c3t9d0 >> c3t10d0 c3t11d0 >> too many arguments >> >> $ zpool upgrade -v >> This system is currently running ZFS pool version 18. >> >> >> Is what I am trying to do possible? If so what am I doing wrong? >> Thanks. >> > > -- > Trevor Pretty | Technical Account Manager | +64 9 639 0652 | +64 21 > 666 161 > Eagle Technology Group Ltd. > Gate D, Alexandra Park, Greenlane West, Epsom > Private Bag 93211, Parnell, Auckland > > > > > > > www.eagle.co.nz > This email is confidential and may be legally privileged. If > received in error please destroy and immediately notify us. > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss