As of yet, there isn't a way to convert zpool structures. Also, there isn't a way to expand a RAIDz. To my knowledge, RAIDz is something you have to setup from the start.
That said, there is an exception. If you have three disks in a RAIDz configuration, basically one disk is used for redundancy. You can concatenate zpools so you can create a second three disk RAIDz and that the two work together. That way each three disk RAIDz is fault tolerant within itself. The down side is not you have to use two drive for fault tolerance where as if you build the RAIDz with six drives from the start you would only be required to use one.
There is a second exception. (I've only done this in VMware to test it.) If you have a RAIDz zpool, and want to increase the capacity, you can swap you the drives one by one with a larger capacity drive. Then after the last drive has rebuilt, (I think) you can export the pool, and import it back and ZFS will see the new capacity on the drive and begin to use it. I read this off a blog I can't locate and it was a while ago, so there may be additional steps.
Some people have considered using the copies property of ZFS to spread extra copies across a stripe zpool. Here is a site that talks about the copies property. ZFS will attempt to put the two copies on two different drives, but it doesn't have to. So the data may be fault tolerant, or may not.
I'm hoping the FreeNAS because it is built on a flavor of BSD will get the latest bits soon. OpenIndiana had the latest versions of ZFS incorporated (zpool version 28 and zfs version 5). Also, I've read ZFS has been ported to Linux (not just with FUSE).
I used to use FreeNAS because it was easy to setup. The I moved around to various OSs chasing the latest versions of ZFS mainly because I wanted the dedupe feature to extend the capacity of my storage.
I know when ZFS get in place migration between zpool types and dynamic expansion of RAIDz many ZFS people will be happy.
A method some people use, but that is not recommended:
- Create a pool with 2 drives and a sparse file (of the right, virtual size to match the other drives), and then immediately offline the sparse file. This will create a degraded RAID-Z1 pool with two drives worth of capacity and no redundancy.
- Copy data to the degraded pool.
- Replace the offlined sparse-file with the third disk and resilver.
The number of "devices" that a vdev is created with, is permanent after creation. Therefore, you must have three "disks" at the time of creation. This method gives a way to create a degraded RAID-Z1 pool and later restore the absent redundancy.
This method is not recommended, because while copying and while the 3rd drive is absent, there is no redundancy/parity. But it can work.
Best Answer
Unfortunately, at this point you basically have two good options:
The latter can be performed in-place, and has the bonus of providing you with additional storage space, but requires you to purchase more hardware (which you said in the question that you don't want to do). The former cannot be done in-place, but provides you with a good opportunity to test your restoration strategy (you do have a restoration strategy, I presume?).
As you have found out, it's not possible to remove a JBOD component in a ZFS pool. By
add
ing rather thanattach
ing the new drive, you created a JBOD situation with multiple disks.If you do go with expanding the pool, I suggest strongly considering expanding into raidz2 instead of two mirrored pairs. You get (essentially) the same usable storage capacity, but the ability to survive the failure of any two of the drives, as opposed to only one per pair. You can create a raidz2 vdev with two sparse files and then delete those files before replacing them with drives you are migrating data from, to migrate from your current situation of 2-disk JBOD to 4-disk RAIDZ2 only adding two more disks.