Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My /dev/sda is reporting a failure, so I need to swap it for a new one. I am trying to identify which physical port it is connected to (there are four of this drive type in the server, so I can't eyeball it, or see serials easily).

If I have this:

lrwxrwxrwx 1 root root   9 Apr 15 16:31 pci-0000:00:1f.2-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx 1 root root   9 Apr 15 16:31 pci-0000:00:1f.2-scsi-1:0:0:0 -> ../../sdb
lrwxrwxrwx 1 root root   9 Apr 15 16:31 pci-0000:00:1f.2-scsi-2:0:0:0 -> ../../sdc
lrwxrwxrwx 1 root root   9 Apr 15 16:31 pci-0000:00:1f.2-scsi-3:0:0:0 -> ../../sdd
lrwxrwxrwx 1 root root   9 Apr 15 16:31 pci-0000:00:1f.2-scsi-4:0:0:0 -> ../../sde
lrwxrwxrwx 1 root root   9 Apr 15 16:31 pci-0000:00:1f.2-scsi-5:0:0:0 -> ../../sdf

What are the chances that the first physical SATA port contains /dev/sda?

Note that I cannot run lshw due to a kernel issue, and hdparms -I doesn't give me any clues.

share|improve this question
up vote 2 down vote accepted

I had to swap out the failed drive, and I can say that in this case at least, the path mapping in /dev/disk/by-path does map to the physical ports on the motherboard. I swapped the right drive!

This is a sample set of one instance, so it may be different for others.

share|improve this answer

As far as I can remember, this may not be the same order as on the motherboard. To be perfectly sure, use

smartctl -i /dev/sda

to get the serial number of the HDD labelled as /dev/sda. (You may have to install smartmontools, but usually it is already there.)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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