Expanding mirrored ZFS pool with existing VMs

Sep

Member
Mar 27, 2022
35
1
13
I have created Mirrored (2 18TB HDD) pool on my VE. I now want to add 2 20TB HDD in mirrored configuration to this pool, so the capacity will expand to 38 TB. How to do that pls.

I know how to use

zpool add rpool /dev/sda

for single drive adding to single drive configuration. Have no idea how to handle mirrored drives.
 
Last edited:
That would be zpool add rpool mirror newdisk1 newdisk2. But it would be better to add your disks by its ID, for example "/dev/disk/by-id/yourDisk" and not by something like "/dev/sda". What ID refers to what disk you can see by running ls -la /dev/disk/by-id.
For example a output of...
Code:
...
lrwxrwxrwx 1 root root    9 Jul  5 10:12 ata-INTEL_SSDSC2BA100G3_BTTV42250126100FGN -> ../../sda
...
...would mean the ID of "sda" is "ata-INTEL_SSDSC2BA100G3_BTTV42250126100FGN" so "/dev/disk/by-id/ata-INTEL_SSDSC2BA100G3_BTTV42250126100FGN" could be used to add the disks to the pool instead of "/dev/sda". Also got the benefit that a zpool status will then list you the disk by its ID and not by just sda. So in case a disk fails and needs to be replaced, its way easier to identify the correct disk to remove because "ata-INTEL_SSDSC2BA100G3_BTTV42250126100FGN" contains the model and the serial which is usually printed on the disk.