ZFS is one of the best file systems available in almost all of the Linux distributions. Proxmox VE is built on Debian Linux and it supports ZFS backend for VM and container storage. This tutorial will help you migrate your existing ZFS pool to a new set of hard drives. Recently I cam across this use case in my home system to upgrade my drives to higher capacity.
If you would like to start by creating ZFS pool in Proxmox VE instead go to my post here. You can continue back here to migrate that a ZFS pool after that.
2. Install the new hard drives and create a new temporary ZFS pool for copying. I am creating one named temp_tank (this will be renamed to tank later). Now you will have two ZFS pools on your server.
3. To prepare for copying to the temp pool first create a snapshot of the tank. The below command creates new snapshot named to_copy in the tank zpool.
zfs snapshot tank@to_copy
zfs send -R tank@to_copy | zfs receive -F temp_tank
5. Once the above completes, unmout the tank pool using zpool export command and remove the drives from your server. (Store the old drives safely so that you can use it to restore in case anything goes wrong)
zpool export tank
Now you will see only the temp_tank pool in the system
zpool export temp_tank
zpool import temp_tank tank
To verify go to the web UI, under Disks -> ZFS . The migrated pool tank is ONLINE and healthy.
That is it, you have successfully upgraded the hard drives.