Solved ZFS: Nesting a stripe inside a RAIDZ - is it possible?

roccobaroccoSC

Aspiring Daemon

Reaction score: 232
Messages: 774

I have 6 SATA drives. 4 of them are 1TB and 2 of them are 500GB. I would like to create a RAIDZ pool with them.
Obviously, adding devices of different sizes to a RAIDZ is not possible. Can the two smaller drives be striped together and then can the stripe be added to a RAIDZ together with the other 4 drives?

It should look like this:
Code:
pool
  * raidz-0
    - 1TB disk
    - 1TB disk
    - 1TB disk
    - 1TB disk
    - stripe
       > 500 GB disk
       > 500 GB disk

Can this be done with ZFS means, or should gstripe be used instead?

One more idea: What if I split each of the 1 TB drives into two partitions each and then use the 500 GB partitions together with the two smaller disks? Would this be the cleanest solution?
 

driesm

Active Member
Developer

Reaction score: 46
Messages: 123

Can this be done with ZFS means, or should gstripe be used instead?

I'm afraid this is not possible from within ZFS, you'll have to use gstripe.

Would this be the cleanest solution?
Cleanest solution would be to buy a 1 TB drive or omit the two 500 GB ones :), although what you suggest should also work just fine. Then you could have a raidz with 6 "drives" of 500 GB and another raidz with 4 "drives" of 500 GB.
 
OP
roccobaroccoSC

roccobaroccoSC

Aspiring Daemon

Reaction score: 232
Messages: 774

Cleanest solution would be to buy a 1 TB drive or omit the two 500 GB ones :), although what you suggest should also work just fine. Then you could have a raidz with 6 "drives" of 500 GB and another raidz with 4 "drives" of 500 GB.
I am recycling a couple of old USB external drives that sit useless in the drawer. I figured, why not use them for extra space on my workstation.
I ended up striping the two smaller disks and then making a big RAID-Z of 5x 1TB volumes. Luckily for me, the 500 GB drives were EXACTLY 1/2 of the 1TB drives down to the byte, so it worked like a charm.
 

ralphbsz

Son of Beastie

Reaction score: 2,517
Messages: 3,378

It might work with gstripe.

BUT: In a RAID layout, the speed of the RAID group or array is typically limited by the slowest member. If these are USB drives, they may drag the performance of the whole group down. You might not care though.
 
OP
roccobaroccoSC

roccobaroccoSC

Aspiring Daemon

Reaction score: 232
Messages: 774

They are SATA hard drives which were originally bought as USB external 2,5" drives but I dismantled them and put them in my workstation for a respectable storage space. I did not need 0,5TB USB drives anymore.
I just want to utilize the hardware, that's why I won't be replacing the 2 small disks with a larger one. At the end I decided to stripe them as suggested above and it worked. Luckily, the stripe size was exactly equal to the size of the other 4 drives so ZFS did not even complain.
 

gpw928

Aspiring Daemon

Reaction score: 298
Messages: 643

I recommend you have a read of Lucas and Jude's book FreeBSD Mastery: ZFS (IT Mastery Book 7). It's well worth $10. In it, I recently learned that:
Anything that is a FreeBSD GEOM storage provider can become a ZFS storage medium.
Of course, not all GEOM storage providers make sense...

For instance, you really don't want a GEOM stripe under a ZFS stripe.

I suggest you consider using a gconcat(8) of 2 x 500GB disks.

I have tested a concat in a very similar configuration myself.

For it to work well, you need to ensure that the behaviour of the concat is considerably similar to the 1 TB disks, but everything you have posted suggests to me that a concat would achieve that.

With 2 x 500 GB disks, your MTBF will be slightly worse than for a single 1 TB disk, but I not so much to be of concern.

I have to finish by saying that I have never done this apart from testing with memory devices, so the advice may be worth what you paid for it...

Nevertheless I am optimistic, and hope some of those with strong ZFS knowledge and experience will comment.
 
OP
roccobaroccoSC

roccobaroccoSC

Aspiring Daemon

Reaction score: 232
Messages: 774

Thanks for the suggestions. I have already read a number of Lucas and Jude's books, ZFS, advanced ZFS, Jails etc. Really nice works. But I somehow felt that ZFS vdevs should be able to be hierarchical. I was wrong. I revisited the said books after I posted the question.
 
Top