Ian Collins wrote:
On 04/20/10 04:13 PM, Sunil wrote:
Hi,

I have a strange requirement. My pool consists of 2 500GB disks in stripe which I am trying to convert into a RAIDZ setup without data loss but I have only two additional disks: 750GB and 1TB. So, here is what I thought:

1. Carve a 500GB slice (A) in 750GB and 2 500GB slices (B,C) in 1TB.
2. Create a RAIDZ pool out of these 3 slices. Performance will be bad because of seeks in the same disk for B and C but its just temporary.

If the 1TB drive fails, you're buggered. So there's not a lot of point setting up a raidz.
It is possible to survive failures of a single drive with multiple slices on it that are in the same pool. It requires using a RAIDZ level equal or greater than the number of slices on that drive. RAIDZ2 on a 1 TB drive with two slices will survive the same as RAIDZ1 with one slice.

(I'm focusing on addressing data survival here. Performance will be worse than usual, but even this impact may be mitigated by using a dedicated ZIL. (Remote and cloud based data storage using remote iSCSI devices and local ZIL devices have been shown to have much better performance characteristics than would have otherwise been expected from a cloud based system. See http://blogs.sun.com/jkshah/entry/zfs_with_cloud_storage_and )

With RAIDZ3, you can survive the loss of one drive with 3 slices on it that are all in one pool. (Of course at that point you can't handle any further failures. Reliability with this kind of configuration is at worst equal to RAIDZ1, but likely better on average, because you can tolerate some specific multiple drive failure combinations that RAIDZ1 cannot handle. A similar comparison might be made between the reliability of a 4 drive RAIDZ2 pool vs. 4 drives in a stripe-mirror arrangement...you get similar usable space but in one case you can lose any 2 drives, in the other case you can lose any 1 drive and some combinations of 2 drives.

I shared a variation of this idea a while ago in a comment here:
http://blogs.sun.com/ahl/entry/expand_o_matic_raid_z

A how to is below:

You may as well create a pool on the 1TB drive and copy to that.

3. zfs send | recv my current pool data into the new pool.
4. Destroy the current pool.
5. In the new pool, replace B with the 500GB disk freed by the destruction of the current pool. 6. Optionally, replace C with second 500GB to free up the 750GB completely.

Or use the two 500GB and the 750 GB drive for the raidz.

Option to get all drives included:
1.) move all data to 1 TB drive
2.) create RAIDZ1/RAIDZ2 pool using 2* 500 GB drives, 750 GB drive, and a sparse file that you delete right after the pool is created. Your pool will be degraded by deleting the sparse file but will still work (because it is a RAIDZ). Use RAIDZ2 if you want ZFS's protections to be active immediately (as you'll have 3 out of 4 devices available).
3.) move all data from 1 TB drive to RAIDZ pool
4.) replace sparse file device with 1 TB drive (or 500 GB slice of 1 TB drive)
5.) resilver pool

A variation on this is to create a RAIDZ2 using 2* 500 GB drives, 750 GB drive, and 2 sparse files. After the data is moved from the 1 TB drive to the RAIDZ2, two 500 GB slices are created on the 1 TB drive. These 2 slices in turn are used to replace the 2 sparse files. You'll end up with 3*500GB of usable space and protection from at least 1 drive failure (the 1 TB drive) up to 2 drive failures (any of the other drives). Performance caveats of 2 slices on one drive apply.

If you like, you can later add a fifth drive relatively easily by replacing one of the slices with a whole drive.

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

Reply via email to