4

I have 16 disks inserted into Lenovo SR650. The disk names /dev/sda , /dev/sdb ... are not in order with its position in the slots. I want to identify what is the name of the disk in first slot in Ubuntu16.04.4 commandline.

  • This answer on U&L gives a generic way of doing it via groking serial numbers, but I'm sure there's a more efficient manner of doing it. – Tim Post Jul 12 '18 at 16:21
3

Disks are enumerated by path under /dev/disk/by-path/ and via WWN under /dev/disk/by-id/. The first tell you about slot number and, by matching it with WWN, enable you to determine how slot enumeration is layed down (ie: from left to right and bottom to up, or vice versa). Most servers even have the slot themselves numbered (but be warned: I saw occasions where the printed number did not match /dev/disk/by-path).

Assuming you have no SN/WWN information on the disks themselves, you can use LED information to identify the disks:

  • if your enclosure is supported, you can use something as ledctl to let the disk/slot blink;

  • if you can't use ledctl or similar, you can generate a read load for each disk by running, in a fast loop, something as smartctl --all /dev/disk/by-path/<disk> while watching your disk/slot led.

0

Try the command:

blkid

Here's a link to more info: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/s2-sysinfo-filesystems-blkid

  • This doesn't tell you which bay a disk is installed in. – Michael Hampton Jul 12 '18 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.