growing a raid z(1/2)

I'm planning on building a fileserver on top of opensolaris, using either a raid z1 or z2. Is it possible to later upgrade a disk at a time and immediately have access to the increased storage? Or is the increased storage only available when every device in the raid z upgraded?

Also, how do regular zpools treat devices of different sizes? I've found no certain answers about this. I may have to start out with two drives of different sizes in a zpool without any redundancy at first. I've heard from some that each drive is treated as the size of the smallest disk (both in zpools and raid zs), but the zfs documentation seems to imply otherwise.


Solution 1:

I just had to test this out in VirtualBox. It turns out you're limited by the size of the smallest disk in the pool. Thus 2x500GB and 1x250GB in raidz1 will yield only 250GB of usable space. Once you upgrade the last disk (and ensure zpool set autoexpand=on thepool) then you gain access to the extra space.

Regular zpools stripe the data across as many disks/vdevs you have in your pool and if one is larger than the other, it just stops striping when the smaller disk is full.

Solution 2:

Instead of upgrading raidz disks which won't help increasing a pool size until all disks are upgraded, you can increase the size of a pool by adding a whole new raidz to it.

About your second question, if you are not using redundancy in a pool and use disks of different size, the global available size will be the sum of each disk size and not limited by the smallest one. If you use redundancy (mirroring or raidz), the smallest disk size will rule.