The first steps of copying the partition table, randomizing the GUIDs on the new disk, and replacing the ZFS partition are the same.
To make the system bootable from the new disk, different steps are needed which depend on the bootloader in use.
First, I like to offline the failed disk
zpool status zpool offline rpool /dev/source # (=failed disk) ## shutdown install the new disk or replace the disks
Now, I pick one of the old disks („source“) and clone its whole disklabel to the new disk („target“):
sgdisk /dev/disk/by-id/source -R /dev/disk/by-id/target sgdisk --randomize-guids /dev/target
Now, we can insert the new disk into the zfs bunch:
zpool replace rpool /dev/disk/by-id/source-part3 /dev/disk/by-id/target-part3 zpool status # => resilvering is working
Note Use the zpool status -v command to monitor how far the resilvering process of the new disk has progressed.
Finally, we need to tell proxmox-boot-tool to always keep the bootloader on the new disk updated.
proxmox-boot-tool format /dev/disk/by-id/target-part2 proxmox-boot-tool init /dev/disk/by-id/target-part2
NB: EFI System Partition is setup as partition #2 on bootable disks setup by the Proxmox VE installer since version 5.4.