David Dyer-Bennet
2006-Jul-08 00:34 UTC
[zfs-discuss] RAID-Z on two disks vs. 2-way mirror
One of the obvious big differences between RAID-Z and RAID-5 is that Z can be run on just two disks. I do note it suggests you really want three, but I''ve run it on two (slices rather than whole disks, in a small test environment) and it works and recovers from removal or severe damage to either of the slices just as advertised. So the question becomes, what are the tradeoffs between running a two-way mirror vs. running RAID-Z on two disks? It looks like I can replace one of the disks in the RAID-Z with a bigger one, and get more usable space in the pool. I don''t believe I can do that in a mirror. That would seem to be a significant benefit for RAID-Z vs. a two-way mirror. Are there corresponding disadvantages? I had hoped to be able to add additional disks into an existing RAID-Z and expand the available space, but that doesn''t seem to be possible after all (I kinda got the impression it could from the announcements and summaries, but no command in the manuals seems to let me do anything like that). Oh well. I do see that you can add new RAIDZ, mirrors, or individual disks to the pool, and all the filesystems will draw against the space provided by all the different sources of disk; and of course the reliability will be that of the least reliable. This message posted from opensolaris.org
> So the question becomes, what are the tradeoffs between running a two-way > mirror vs. running RAID-Z on two disks?A two-way mirror would be better -- no parity generation, and you have the ability to attach/detach for more or less replication. (We could optimize the RAID-Z code for the two-disk case, but all that would do is make it into a two-way mirror under the covers.)> It looks like I can replace one of the disks in the RAID-Z with a bigger one, > and get more usable space in the pool. I don''t believe I can do that in a > mirror.With either mirroring or RAID-Z, the available space is determined by the MIN of all device sizes. If you replace each disk with a larger one, then when the last replacement is complete, you will indeed have more space. This is true for mirrors, RAID-Z, or even just single disks.> I had hoped to be able to add additional disks into an existing RAID-Z > and expand the available space, but that doesn''t seem to be possibleZFS uses dynamic striping. So rather than growing an existing RAID-Z group, you just add another one. That is, suppose you create the pool like this: zpool create tank raidz disk1 disk2 disk3 To add more space, you''d say: zpool add tank raidz disk4 disk5 disk6 The down side is that you can''t add just one disk -- you have to add them in small groups. The upside is that by doing it this way, there''s no need for block remapping -- so adding space isn''t a violent act. Jeff
David Dyer-Bennet
2006-Jul-08 03:19 UTC
[zfs-discuss] Re: RAID-Z on two disks vs. 2-way mirror
> > So the question becomes, what are the tradeoffs > > between running a two-way > > mirror vs. running RAID-Z on two disks? > > A two-way mirror would be better -- no parity > generation, and you have > the ability to attach/detach for more or less > replication. (We could > optimize the RAID-Z code for the two-disk case, but > all that would do > is make it into a two-way mirror under the covers.)Thanks; getting real info is so much nicer than guessing!> > I had hoped to be able to add additional disks into > > an existing RAID-Z > > and expand the available space, but that doesn''t > > eem to be possible > > ZFS uses dynamic striping. So rather than growing an > existing RAID-Z > group, you just add another one. That is, suppose > you create the pool > like this: > > zpool create tank raidz disk1 disk2 disk3 > > To add more space, you''d say: > > zpool add tank raidz disk4 disk5 disk6 > > The down side is that you can''t add just one disk -- > you have to add them > in small groups. The upside is that by doing it this > way, there''s no > need for block remapping -- so adding space isn''t a > violent act.It also means that the 4- and 5-disk hot-swap chassis give you zero realizable expansion -- at least if you''re using a minimum of three disks for a RAID-Z group. Starting a new group costs you the parity overhead again, too; but then expanding the group too much means surviving a single-drive failure isn''t good enough, either. Which means going to the much-more-expensive 8-drive chassis. Having adding space not be a "violent act" certainly has a LOT to recommend it. Anyway, thanks very much for the authoritative answers. This message posted from opensolaris.org