On 7/16/2010 5:54 AM, Ben wrote:
Hi all,

I currently have four drives in my OpenSolaris box.  The drives are split into two 
mirrors, one mirror containing my rpool (disks 1&  2) and one containing other data 
(disks 2&  3).

I'm running out of space on my data mirror and am thinking of upgrading it to 
two 2TB disks. I then considered replacing disk 2 with a 2TB disk and making a 
RAIDz from the three new drives.

I know this would leave my rpool vulnerable to hard drive failure, but I've got 
no data on it that can't be replaced with a reinstall.

Can this be done easily?  Or will I have to transfer all of my data to another 
machine and build the RAIDz from scratch, then transfer the data back?

Thanks for any advice,
Ben

You can't "convert" a mirror to a RAIDZ directly. In your case, however, there is a bit of slight-of-hand that can work here.

Assume you have disks A, B, C, D, all the same size, where A & B are your rpool, and C & D are your datapool:

# zpool detach rpool B
# zpool detach datapool C
# mkfile -n <size of drive B> /foo
# zpool create newpool raidz B C /foo
# zpool offline newpool /foo
# rsync -a /datapool/. /newpool/. (use whichever rsync options fit you best)
# zpool destroy datapool
# zpool replace newpool /foo D
# rm /foo


During this process, you will have your data on both mirrors exposed to a disk failure, and when it's complete, the rpool will of course remain unprotected.


--
Erik Trimble
Java System Support
Mailstop:  usca22-123
Phone:  x17195
Santa Clara, CA
Timezone: US/Pacific (GMT-0800)

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to