[SOLVED] Proxmox zfs pool replaced drive - missing BIOS boot and EFI partitions

matrix1999

Member
Jan 10, 2023
55
8
13
One of my drive is about to be worn out, so as a precaution, I replaced the worn NVMe today.

Upon rebooting Proxmox, I ran the zpool replace command. The new NVMe drive resilvered successfully. However, upon inspecting via the UI, I noticed something different.

As you can see in the screenshot below, the replaced NVMEdrive (highlighted in red rectangle) no longer has the BIOS boot and EFI partitions. Did I do something wrong when I ran the zpool replace command?

1759002861548.png
 
Last edited:
please read:
Code:
man sgdisk
sgdisk /dev/disk/by-id/<working-disk> -R /dev/disk/by-id/<new-disk>
sgdisk -G <new-disk>
# the you must create new boot disk.
proxmox-boot-tool format /dev/disk/by-id/<new-disk>-part2
proxmox-boot-tool init /dev/disk/by-id/<new-disk>-part2

# and the you can use, check the function first
proxmox-boot-tool status
proxmox-boot-tool refresh
proxmox-boot-tool clean

# last step i replace the faild disk
zfs ...
 
please read:
Code:
man sgdisk
sgdisk /dev/disk/by-id/<working-disk> -R /dev/disk/by-id/<new-disk>
sgdisk -G <new-disk>
# the you must create new boot disk.
proxmox-boot-tool format /dev/disk/by-id/<new-disk>-part2
proxmox-boot-tool init /dev/disk/by-id/<new-disk>-part2

# and the you can use, check the function first
proxmox-boot-tool status
proxmox-boot-tool refresh
proxmox-boot-tool clean

# last step i replace the faild disk
zfs ...
I actually like your steps better than the guide. Yours is more comprehensive. Thank you very much. Doing 2nd time resilvering as we speak right now. Actually, I am taking this opportunity to do the proxmox-boot-tool refresh and clean on the rest of my nodes in my clusters. I haven't done that in a while and especially not since I upgraded to PVE 9.
 
Hi - I greatly appreciate this thread and I made the same mistake and didn't copy over the partition scheme and the boot info before replacing the failed drive. However, now that I have performed these steps, when I ran the replace command, since i am now replacing the replacement, as it were, it wrote back the faulty partition scheme without the boot partitions and I am back to square one. How do I replace this drive without the boot partitions with a new one that has the boot partitions? I hope this makes sense...
 
Last edited:
yes, that is what i did... so i should run the replace command specifying partition 3?
I can't be sure that it's partition 3, but yes that's the idea. You specify the (correct) large partition for use with ZFS, which preserves the partition table and boot partition (and the optional BIOS-boot partition). Note that a Linux system sometimes needs something like a partprobe or reboot to actually recognize newly created partitions.
 
Hi - I greatly appreciate this thread and I made the same mistake and didn't copy over the partition scheme and the boot info before replacing the failed drive. However, now that I have performed these steps, when I ran the replace command, since i am now replacing the replacement, as it were, it wrote back the faulty partition scheme without the boot partitions and I am back to square one. How do I replace this drive without the boot partitions with a new one that has the boot partitions? I hope this makes sense...
If I read you correctly, all you have to do is to repeat the same process again and make sure you run this sgdisk /dev/disk/by-id/&lt;working-disk&gt; -R /dev/disk/by-id/&lt;new-disk&gt; correctly.

In most cases, and assuming you are running ZFS, you will be running proxmox-boot-tool format /dev/disk/by-id/&lt;new-disk&gt;-part2 on the third partition ("-part2") since the first two are the boot and EFI partitions.