Zum Inhalt

Proxmox: replace zfs root disk

Changing a failed bootable device
Depending on how Proxmox VE was installed it is either using systemd-boot or grub through proxmox-boot-tool [1] or plain grub as bootloader (see Host Bootloader). You can check by running:

proxmox-boot-tool status

The first steps of copying the partition table, reissuing GUIDs 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.

zpool status
zpool offline rpool /dev/source # (=failed disk)
## shutdown install the new disk or replace the disks
sgdisk /dev/source -R /dev/target
sgdisk --randomize-guids /dev/target
zpool replace rpool /dev/source /dev/target
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.

With proxmox-boot-tool:
get uuid from new disk:

proxmox-boot-tool format
proxmox-boot-tool init

Note ESP stands for EFI System Partition, which is setup as partition #2 on bootable disks setup by the Proxmox VE installer since version 5.4. For details, see Setting up a new partition for use as synced ESP.