Expand or covert a mirroed zpool 2 disks to 4 disks (proxmox)

Hi,
I currently have a 2 way mirror using 2 6TB HDD’s that I have been using for network shares under proxmox,

I want to move from 2 6TB drives to 4 6TB drives but I am unsure of the best way to go about it. Do I move to RAIDZ1 setup or would it even be possible to convert the current pool into a Stripped Mirror in ZFS?

worst case I dont have enough on the drives that i couldn’t copy the data somewhere else and recreate the pool but if theirs a way to do it with needing to move the data first that would be the most ideal.

Any info and suggestions very welcome thanks in advance!

the ZFS GUI in ProxMox is BAD. Even just configuring a new ZFS pool leaves it in a weird state.

i do not recommend using RAIDZ1. so long as you are OK with using a pool of mirros the process is as follows.

zpool status will show your current config:

then you use zfs commands to create another mirror and add it to the existing pool. if your zfs vdev does not use disk-by-id you will need to ‘zpool export ’ and then zpool import -d /dev/disk/by-id/ <poolname>

you should end up with a pool of 2 mirrors like my image, where your current pool will show 1 mirror in your pool.

NOTE: if the data is not an issue, it is actually easier to just remove and recreate the entire pool.

IE:
zpool create ‘tank’ mirror c1d0 c2d0 mirror c3d0 c4d0

then zpool export, and import by id.

1 Like

I created all the zfs zpools within proxmox itself should there be some post configuration needed if the pools were created using the UI ?

While the data loss isn’t an issue its a bit of a hassle … so I will give your method a try thanks for reply much appreciated !

zpool status command and you will be able to tell if they are mounted as device ID or mount point. and VDEV config. In THEORY you should be able to just create a VDEV mirror and add it to the existing pool.

when you are all done all the VDEVs should be mounted by ID.

2 Likes

I would buy another 6TB or larger, back up the data temporarily and switch the pool to RaidZ. You need a backup of the pool anyway and with the spare disk you can expand the pool later or if a disk breaks you have the replacement on hand

1 Like

I think in this case I would rather just make the pool larger than rebuilding it all as Im serving clients with it and going from 6TB to 12TB is likely enough before I rebuild my home lab / network storage setup

looks like all mounted by device ID so I think your approach is the most straightforward expansion wise thanks for the advice.

gotta look up some hardware shopping list now and will report back !

1 Like

@Zedicus would I be right in thinking in this config I were to add another set of larger disks this would be fine because the two larger disks would be mirroring each other ? or am I thinking about how the replication works incorrectly in this configuration?

Yes.
Each VDEV will be a mirrored pair. So you will add a mirrored pair to a pool that has a mirrored pair in it.

As for data protection, you can loose 1 drive from each pair. But not both drives in a pair.

Did i help or make it more confusing?

Makes total sense thank you very much for the information!

success took a while before I could bring down the server to install new disks. I was able to add the two new 12TB drives to my existing zpool all working as expected thanks for the help :smiley: @Zedicus

I ended up doing it a different way to the above example

zpool add <pool-name> mirror /dev/disk/by-id/<disk-id> /dev/disk/by-id/<disk-id>
zpool status

  pool: decelerating-hdd
 state: ONLINE
  scan: scrub repaired 0B in 04:16:33 with 0 errors on Sun Jun  9 04:40:35 2024
config:

        NAME                                          STATE     READ WRITE CKSUM
        decelerating-hdd                              ONLINE       0     0     0
          mirror-0                                    ONLINE       0     0     0
            ata-WDC_WD60EFAX-68JH4N0_WD-WX42D8058TZ9  ONLINE       0     0     0
            ata-WDC_WD60EFAX-68JH4N0_WD-WX32D800HCS6  ONLINE       0     0     0
          mirror-1                                    ONLINE       0     0     0
            ata-ST12000NM0127_ZJV59KZB                ONLINE       0     0     0
            ata-ST12000NM0127_ZJV5C8B4                ONLINE       0     0     0

errors: No known data errors

I had tried it the other way but couldnt get it to import found this on another post worked :slight_smile:

2 Likes

Yeah it seems some systems like one way and not the other, i never have figured out why, but trying both usually leads to success.