If you experience a failed drive with your ZFS boot pool on your proxmox server you can carry out the following steps:
Use the command below to view the drive which has been marked as offline.
zpool status rpool
Note the drive id which was broken and which id is working then install your new drive.
Now copy the partition table from the old drive to the new drive:
sgdisk /dev/disk/by-id/workingdrive -R /dev/disk/by-id/newdrive
sgdisk -G /dev/disk/by-id/newdrive
partprobe
Prepare the boot partition on the new drive
proxmox-boot-tool format /dev/disk/by-id/newdrive-part2
Copy the kernels and grub
proxmox-boot-tool init /dev/disk/by-id/newdrive-part2
Replace the disk in the zpool and resilver
zpool replace rpool brokendrive-part3 newdrive-part3
And that’s it you’ll shortly see your pool back to full health!