Hybrid RAID and how hard is it to do?

Status
Not open for further replies.

skit

Cadet
Joined
Oct 18, 2011
Messages
3
Hi,

I'm considering installing FreeNAS on a spare machine I have and also considering starting with 3x2Tb WD Green drives.

Now I was considering using ZFS and RAIDz but I have a few issues with it.

If I start with 3x2Tb in RAIDz and later on buy a fourth drive what would be the best way to expand the array? I know SHA has the ability to expand the RAID with additional volumes but I don't understand how they do it.

If I have 4x2Tb drives and later on decide to expand to 3Tb ones. Let's say I switch two of the 2Tb drives with 3Tb ones (one at a time ofc).
I believe the better solution would be to partition them with the first 2Tb to be used with the older array and then with the extra 1Tb of each create a new RAIDz array (mirroring), correct?

But what if I add a third 3Tb drive? Can I expand the mirroring to RAIDz (and what happens if I try to add a fourth), correct?

How do they achieve this?
800px-Classic.vs.shr.vExpand.png
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
It is, sadly, relatively difficult (as in "dump data, destroy fs, create fs, reload data" difficult) with ZFS to add a single disk to a RAIDZ. While this is possible in theory, my understanding is that nobody has pursued the actual implementation of such a feature.

As for replacing the hard drives with larger ones, that at least is fairly simple. Replace each disk, one at a time, and then re-import the ZFS pool. See the slightly more complete discussion at

http://serverfault.com/questions/15...s-raid-z-array-to-larger-disks-on-opensolaris

or many other searchable results.
 

skit

Cadet
Joined
Oct 18, 2011
Messages
3
As for replacing the hard drives with larger ones, that at least is fairly simple. Replace each disk, one at a time, and then re-import the ZFS pool. See the slightly more complete discussion at

http://serverfault.com/questions/15...s-raid-z-array-to-larger-disks-on-opensolaris

or many other searchable results.

Here's the thing hat if I just upgrade some drives and not all of them.
Hence the partitioning scheme I was talking about.
So the main rules about building a ZFS RAIDz array seems to be that the number of drives the RAIDz contain are defined at the definition of the RAIDz and not something that can be 'updated' later on and upgrading is better to be done all in one (replacing all the drives), correct?

I'm really curious how they can be achieving this with "Synology Hybrid Array" if is there's no other filesystem/volume manager that offers the same flexibity (leaving unRAID out of the question here) out there ...

Thank you.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
You're better off determining how many drives you want, that number is somewhat fixed.

It *is* possible to add *another* RAIDZ to a pool to increase the pool size, so you can move from 3 to 6 disks or something like that, but the 6 drives will be two sets of 3 in RAIDZ. There's no requirement that the sets be the same size, so you can add 4 3TB drives in RAIDZ to a 3 2TB drive RAIDZ setup and get lots more space. So it's not completely terrible, just suboptimal.

As for what Synology does, I don't know. There's nothing particularly impossible about expanding a RAID array a drive at a time; the techniques are easy to figure out. What's hard is implementation, especially if the filesystem is expected to be operational while it is happening. You essentially run a wipe through the existing filesystem, reading the data from (let's say) 4 drives and writing it on 5. This is intensive, and if a drive fails in the middle, you're left with two schizo partial arrays rather than one coherent single array. Figuring out all the recovery logic for *that* is probably the hard part, but people write hard code all the time, so it's not beyond possibility for storage companies to write cool things.
 

skit

Cadet
Joined
Oct 18, 2011
Messages
3
Thank you for explaining.

I think they're probably using something like LVM + RAID5. Since it's possible to grow a RAID 5 array and use LVM to join arrays together. So it's all a question of "slicing" the space on the drives correctly. Growing the array probably will take a long time and during that time the storage will be 'offline' but that's a non-issue for me.

This seems to be a nice solution. I can't really see anything against it.

Thanks ;)
 
Status
Not open for further replies.
Top