ZFS Drive Replacement

binarian

Member
Apr 23, 2019
10
2
23
34
All,
I am very soon doing a zfs drive replacement on my proxmox server. I have a question about what paths to use. The physical drive is /dev/sdv. However, zpool status shows that the member drives are using the /dev/disk/by-id nomenclature, and specifically are using partition 3 (so zpool status shows ata-<model>_<serial>-part3).

My question:
when I zpool offline the disk, do I need to use /dev/sdv, /dev/disk/by-id/ata-foo_bar-part3, or just use the guid? Additionally, when I put the new disk in, will I need to manually re-create the partition table information, or will zfs handle all of that for me?

Thanks
 
All,
I am very soon doing a zfs drive replacement on my proxmox server. I have a question about what paths to use. The physical drive is /dev/sdv. However, zpool status shows that the member drives are using the /dev/disk/by-id nomenclature, and specifically are using partition 3 (so zpool status shows ata-<model>_<serial>-part3).
When it is using partition 3 you are most likely booting from that ZFS pool. Otherwise it would be partition 1. And replacing a system disk is more complex. See "Replacing a failed bootable device" in the wiki: https://pve.proxmox.com/wiki/ZFS_on_Linux#_zfs_administration
As you then also need to clone the partition table and write the new bootloader.

And while you could work with "/dev/sdv", as later ZFS won't care what that disk is named, as it will read the metadata stored on the disk to identify it, it would still be better to work with "/dev/disk/by-id". That way it is easier to know what disk needs to be replaced in case that disk will fail later.
 
Last edited:
When it is using partition 3 you are most likely booting from that ZFS pool. Otherwise it would be partition 1. And replacing a system disk is more complex. See "Replacing a failed bootable device" in the wiki: https://pve.proxmox.com/wiki/ZFS_on_Linux#_zfs_administration
As you then also need to clone the partition table and write the new bootloader.

And while you could work with "/dev/sdv", as later ZFS won't care what that disk is named, as it will read the metadata stored on the disk to identify it, it would still be better to work with "/dev/disk/by-id". That way it is easier to know what disk needs to be replaced in case that disk will fail later.
Thanks a lot for this! Those instructions worked perfectly for the first disk. However: I notice that the instructions describe how to handle partition 3 (the data), and partition 2 (the EFI stuff). There's no mention of partition 1. Does anything have to be done there? ALL of my original boot drives will be replaced, one by one, so if I need to copy anything from partition 1, now is the time I have to do it.

Thanks again!
 
Depends on which version of PVE you initially have installed and if you are using systemd or grub to boot. Partition 1 is more a legacy thing when using grub as the bootloader.
 
Depends on which version of PVE you initially have installed and if you are using systemd or grub to boot. Partition 1 is more a legacy thing when using grub as the bootloader.
Gotcha. I'm using the systemd option. I'll assume it's safe to ignore!
 

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!