3

For example, I have a 4x2TB RaidZ1 set up right now, but I would like to add only a 3X4TB RaidZ1 in addition to it. Is there a way to do this with zdevs/another Zpool?

Thanks

user204020
  • 131
  • 1
  • 2

2 Answers2

6

While as already answered it is technically doable, beware that what you want to do is not a best practice as you end up with an unbalanced pool with sub optimal performance.

All disks in a pool should be of the same size (outside log and cache devices) and all striped vdevs should have the same organization.

You break both of these rules with mixing 2 TB and 4 TB drives, and striping a four disk raidz with a three disk one. You'll have to use zpool add -f option (-force) for the latter to succeed otherwise this message would be output and the add command would fail:

mismatched replication level: pool uses 4-way raidz and new vdev uses 3-way raidz
jlliagre
  • 8,861
  • 18
  • 36
3

Yes and Yes. You can add multiple VDEVs to a pool, they need not be similar. You can add multiple pools to a system, each consisting of whatever VDEVs.

Note: Once you've added a VDEV to a pool you can not remove it. The only things you can do are replace the disks in a VDEV and add/remove disks from a mirror. If you want to change the way the VDEVs are organized you have to create a whole new pool with the new arrangement then send/receive the data.

Chris S
  • 77,945
  • 11
  • 124
  • 216
  • 1
    The latter part is now (partially) obsolete - vdevs can now be removed from a pool, as long as they are not of type raidz. – bossi Feb 13 '20 at 03:53
  • From what I learned today (OpenZFS 2.1 on debian) you can*not* add vdevs of different geometry to a pool. If there is a `-way raidz` in a pool, you can only add other `-way raidz` vdevs. – schlimmchen Aug 29 '22 at 18:16
  • I'm on a RHEL-base distro, with OpenZFS 2.1.5-2. Just created a pool with a raidz (3-disk), then added a mirror (2-disk), then added a vdev (1-disk). It did warn me about adding a vdev to a pool with mirrors, but allowed me to override. I'd be surprised if the Debian build is that different. Are you running `zpool` on the command line, or using something else? – Chris S Aug 29 '22 at 21:07