ZFS mirror disk replacement issue

alextsang

New Member
Oct 9, 2023
9
0
1
I have 2 disk in ZFS with mirror RAID1 and there are disk removed by system. If i need to replace the disk, the server need to shutdown and locate the corrupted disk due to can't identify the corrupted disk. How i can point bootable partition to health disk before shutdown the server? Thanks.
 
What's your zpool status output? If the pool was set up somewhat recently through our tooling it should refer to some identifier that is also located on the disks label, like the serial number or the WWN.

If it's using a more generic /dev/sda name or the like for the backing device you can search the output of the following command for that name and map it to the model/serial/WWN:

lsblk -e 230 -o +MODEL,SERIAL,WWN

(the -e 230 argument is just for filtering out zvols ("virtual" ZFS backed disks), as they tend to crowd the lsblk output otherwise)

Write down, or print, the model, serial and WWN and use that info to identify the correct physical disk.

FWIW, there's also the ledctl tool from the ledmon package, which normally needs to be installed first via: apt install ledmon.

It might not work everywhere, but if you got a server HW with enclosure you might have luck and be able to use that to trigger a LED to light up, or blink, for the problematic disk and use that to identify it.
See the manpage for details, but essentially you could use one of ledctl locate /dev/... or ledctl failure /dev/... to light up a locate/failure led, and then once done use ledctl normal /dev/... to reset the LEDs to normal status again.
 

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!