Convert FreeBSD ZFS two-disk unmirrored pool to mirrored

Unfortunately, at this point you basically have two good options:

  • Destroy and recreate the pool with the intended configuration, then restore your data from a restoration copy
  • Get two more drives (minimum same size as each respective one you already have) and expand your pool to two mirrored pairs instead of two single disks

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 adding rather than attaching 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.

Tags:

Freebsd

Raid

Zfs