What’s new in future versions of OpenZFS
One of the most demanded novelties by system administrators is the possibility of increasing the number of disks in a RAIDZ, the developer and founder of OpenZFS Mattheew Ahrens has announced that he is finishing a new functionality that will allow the user to expand the size of a single vdev from RAIDZ1 on ZFS. In this way, if we have a vdev configured in RAIDZ1 with three disks, we could expand it to four, five or more disks without the need to carry out a backup and its subsequent restoration, because until now, this was only possible by losing all the data of the discs.
We must remember that the ZFS structure is organized in zpool which is in the upper part, just below we will find the vdev that can be configured in “Individual”, “Mirror”, and the different levels RAIDz1, RAIDz2 and RAIDz3, depending on the level of security to the integrity of the data you want to provide. A pool can contain several vdevs, it is not necessary that the size of the different vdevs be the same.
Until now, if we wanted to expand the storage of a zpool, it was enough to add an additional disk if we had it configured as “Individual” or as “Mirror”, however, this was not possible in the RAIDz of the different levels. Now this has changed, and we can increase the number of disks in a vdev configured as RAIDz. At a domestic and business level, as the number of disks in a vdev could not be increased, it was very necessary to do a good planning and know in detail the future storage needs, because once it was done and configured we could not do anything else to be able to expand a vdev, the only thing we could do is add an additional vdev.
Currently in the typical RAID that we can use with the EXT4 file system, we can expand and even change the type of RAID in certain cases, with the aim of expanding storage or data integrity, however, with RAIDz this does not it has been possible from the beginning, until now.
Now the zfs command “zpool attach” will not only be able to add one more disk in a configured mirror, but also in the existing RAIDz in a vdev. For example, we could expand a RAIDz1 of three disks into one of four disks, although what we can never do is change from a RAIDz1 to a RAIDz2, for example. We can only expand the number of disks within a RAIDz without changing the type of RAIDz.
The negative part of this new functionality is that it will take time to arrive. It is not part of any version of OpenZFS yet, the next version of OpenZFS 2.1 will not incorporate this very important functionality, however, it will surely be incorporated in the next major version of OpenZFS, but it is still unknown when it will be, the most important thing is that it will end arriving, surely the next year 2022.