How to add a hot spare hdd to the proxmox - zfs file system on an EFI-based system…

grand

Member
Feb 3, 2022
5
3
8
49
For Legacy system: zpool add rpool spare / dev / disk / by-id / ...

In this case the full hdd is added, but this may not be good on the EFI system due to the following:
- Under the EFI system, proxmox ZFS creates an ESP (vfat) partition, from where the boot load takes place.
- BOOT, EFI, and ZFS Data partitions are created on all (RAIDZ2) hdds. The third (data - zfs) partition by-id is imported under the zfs pool, not the disk.

proxmox-raidz2-efi.jpg

After that, it would be logical for me to do the same for hotspare, so not to add the entire disk, but only the zfs data partition…
How to add a hot spare hdd to the proxmox - zfs file system on an EFI-based system… What would be the right procedure?
Thank you in advance for your help ;)
 
I think hot spares work different on ZFS as you think. As far as I understand a hot spare won't replace a failed disk permanently. Its just a disk that temporarily will be used so the resilvering can start immediately. You then add a new disk later (which you need to partition first and copy the bootloaders using the proxmox-boot-tool), this new disk will then permanently replace the failed disk and data is copied over from the hot spare to the new disk. After that the hot spare won't be needed anymore so it will wait for the next disk to fail.
 
Last edited:
I think hot spares work different on ZFS as you think. As far as I understand a hot spare won't replace a failed disk permanently. Its just a disk that temporarily will be used so the resilvering can start immediately. You then add a new disk later (which you need to partition first and copy the bootloaders using the proxmox-boot-tool), this new disk will then permanently replace the failed disk and data is copied over from the hot spare to the new disk. After that the hot spare won't be needed anymore so it will wait for the next disk to fail.
Thanks. I know that too, but it is questionable to me how to prepare a backup hdd. It is enough to mount the raw hdd, or it is needed here too - (which you must first partition and copy the bootloaders using the proxmox-boot-tool)... - I did not find any reference to this in the manual.

Add hdd spare: zpool add rpool spare /dev/disk/by-id/ ... - in this case the full hdd is added.
I have nothing else to do?
The method of attachment is in question for me under the EFI system.
 
Last edited:
If anyone has experience with hot spare hhd under efi system, please write.
The method of attachment is in question for me under the EFI system.
Thanks.
 
Here is some general information about adding hot spares for a ZFS pool. You can add additional ESP partitions using proxmox-boot-tool. Those worked my system that boots in UEFI mode.
The description is very good and detailed.
Thanks. It reassures me that he used it under EFI system and had no problem.

I have a little lack left, because there is no EFI partition in the description - all mounted drives are full disks. The image I shared shows that the proxmox mounted the data partition in the ZFS POOL, not a disk.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!