Show disks in GUI named by their drive bay?

masgo

Active Member
Jun 24, 2019
66
14
28
74
I am using Proxmox on typical servers with multiple drive bays. The disks show up on the GUI as sda, sdb, ... which is not very helpfull identifing a disk. I would like them to show up named after their respective drive bay, eg. bay-1, bay-3, ... . This woule make thins like replacing a broken drive much easier. .. "What? drive 4 is broken?" ok, pull it out, new drive in, done.

Where to geh this informations? I checked on different servers with different HBA/RAID controllers, and it always boils down to /dev/disk/by-path/

Example
# ls -la /dev/disk/by-path/*0
lrwxrwxrwx 1 root root 9 Oct 27 18:53 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx 1 root root 9 Nov 25 13:19 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:1:0 -> ../../sdc
lrwxrwxrwx 1 root root 9 Nov 25 13:19 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:3:0 -> ../../sdd
lrwxrwxrwx 1 root root 9 Oct 27 18:53 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:4:0 -> ../../sdb
lrwxrwxrwx 1 root root 9 Nov 25 13:19 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:5:0 -> ../../sde
lrwxrwxrwx 1 root root 9 Nov 25 13:20 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:7:0 -> ../../sdf
lrwxrwxrwx 1 root root 9 Nov 25 13:20 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:9:0 -> ../../sdg

The bold number is the slot number.

It would also be okay, if the drives would show up as pci-0000:02:00.0-scsi-0:0:0:0
 
@masgo
that's a good idea!
and in your usecase ... wouldn't it be helpful to have a button in gui, that you can start flashing the drive light?
(i think smarttools can do this on command level, can't it?)
 
Last edited:
@masgo
that's a good idea!
and in your usecase ... wouldn't it be helpful to have a button in gui, that you can start flashing the drive light?
(i think smarttools can do this on command level, can't it?)
This would obviously be a great idea.

As far as I know, smartmontools can not do this. There are specialized tools for that (check out this: https://serverfault.com/questions/64239/physically-identify-the-failed-hard-drive ). The overall problem seems to be, that the mechanisms used to control these backplane LEDs vary depending on make and model.

But on most servers I encountered the bays are clearly labeled. On the few exceptions, I labeled them myself. And "replace drive 4" is not much more difficult than "replace the drive with the blinking LED".

The only time I actually used the blinking function was after cabling up the backplane to check if I did it right.
 
This would obviously be a great idea.

As far as I know, smartmontools can not do this. There are specialized tools for that (check out this: https://serverfault.com/questions/64239/physically-identify-the-failed-hard-drive ). The overall problem seems to be, that the mechanisms used to control these backplane LEDs vary depending on make and model.

But on most servers I encountered the bays are clearly labeled. On the few exceptions, I labeled them myself. And "replace drive 4" is not much more difficult than "replace the drive with the blinking LED".

The only time I actually used the blinking function was after cabling up the backplane to check if I did it right.
A lot of times a simple "dd if=/dev/sdg of=/dev/null" can help narrow down which drive it is. Even if a failed drive has been deleted by the OS, working drives will still help narrow down the bad drive.
 
mhmm.. we could probably get the 'by-path' link relatively cheap in the disk api call, and i can see why that might be interesting (altough i would not show it by default in the user interface, only if the user configures it)

can you open an enhancement request on our bugtracker? https://bugzilla.proxmox.com/
this way you get a notification if we implement this (no promises though :) )
 
Simple workaround: Make a list with all the slot numbers and the corresponding serial numbers of all hard disks. If a disk fails, just look up the serial number and take a look at your list so you know the slot number! Beware to keep the list up to date because otherwise it is not very useful.
 
this depends on the cabling of controller/motherboard and backplane. if you assume slot 1 is most up/left 9f your slots. thats ok. mostly. but what is slot 2? the disk right of it or below it? had both.
and I had machines where slot 1 is the most left/down(bottom) slot.

so no pci or any other path of the operating system will tell what is the real slot nr x
(besides you note it per host/hardware in your documentation or label the disk with s/n)
 
I recommend adding an "Assign Section" feature, specifying the row and slot (for example, Row 1, Slot 1). This would allow for efficient tracking and assignment of hardware HDD/SSD/NVme components. For instance, when the operating system is installed on a server model for the first time, and the first two hard disk drives (HDDs) are added, their locations can be noted and assigned accordingly. Additionally, displaying the PCI number as a bonus would clarify the configuration at any given time. Based on the common server configuration, this feature would facilitate understanding the pattern of assigned HDD bays.
 

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!