RaidZ with 3 drives reports only 50% capacity in Virtualbox

Status
Not open for further replies.

whiskeyjack

Dabbler
Joined
Feb 17, 2013
Messages
24
If I understand ZFS configurations somewhat, then 3 drives of identical size in raid z1 should give a usable capacity of 2 drives.

I just created a test environment in Virtualbox with 4 drives: 1x 4GB for the OS and 3x 10GB for data, all as "fixed size". I then used the volume manager to put the 3 data drives in a volume and selected RaidZ. So far so good, but the actual size turns out to be 15.7GB and not the 20GB I expected.

Am I misunderstanding RaidZ or is something else going on? Thanks for any pointers.
 

JaimieV

Guru
Joined
Oct 12, 2012
Messages
742
RAIDZ1 over three disks will give two disksworth of usable space, barring other tweaks, yes.

There are some odd ZFS space effects to be had, but yours is just due to small disks having a disproportionate amount of space taken up by ZFS structures. Also there could be a disconnect with parts of your system measuring disks in powers of 10 (advertising sizes), and others in powers of 2 (actual sizes).

This is asked in the forums ad infinitum, so do check around for more direct info.
 

whiskeyjack

Dabbler
Joined
Feb 17, 2013
Messages
24
Good to know this. I did search around (a bit... maybe I should have been more thorough), but did not find a conclusive answer. So thank you for taking the effort to reply.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
The difference is probably due to a 2Gb swap file per drive. As JaimieV said, given your small disks, the ZFS overhead is more noticeable.
 

JaimieV

Guru
Joined
Oct 12, 2012
Messages
742
Whoops! I forgot about the 2gig swap per drive. :o Good catch.
 
Status
Not open for further replies.
Top