How to determine disk connection type in Linux

So this might be an obvious question, but I am managing several servers over a network and I would like to be able to find out what type of connector each server is using (i.e. SATA, SCSI, IDE, etc…) without powering off the machine and looking inside physically.

I have tried to use smartctl --scan and it seems accurate for the most part, however when I use it on my Lenovo Thinkpad, it prints:

/dev/sda -d scsi # /dev/sda, SCSI device

which I kind of doubt that my laptop has a SCSI device. Any ideas on how I could verify this information without opening the servers themselves?

Answer

How to see how disks are connected

If you look in the directory:

/dev/disk/by-path/

You will find links for each disk, by how it is connected.

On my machine, running this:

ls -g /dev/disk/by-path/ | grep -v part

gives back this:

total 0
lrwxrwxrwx 1 root  9 Jun 15 21:27 pci-0000:00:17.0-ata-1 -> ../../sda
lrwxrwxrwx 1 root  9 Jun 15 21:27 pci-0000:00:17.0-ata-2 -> ../../sdb

(I have 2 disks, both using SATA)

Attribution
Source : Link , Question Author : christopolise , Answer Author : jrtapsell

Leave a Comment