How to check if an attached SSD device is SATA or PCIe on Linux?
I have a machine with both SATA and PCIe SSDs attached. Is there a set of Linux commands (on Ubuntu or CentOS) that I can use to check if a given SSD is SATA or PCIe?
Solution 1:
lsblk -io NAME,TYPE,SIZE,MOUNTPOINT,FSTYPE,MODEL
will identify all the block devices, i.e., drives. Then, run
sudo hdparm -I /dev/sd*X* | grep SATA
where X is each drive letter found. If the result contains SATA, well, it's the SATA drive.
Alternatively,
lspci
will identify all the PCI devices, including PCIe.
Or, you can look for the NVMe logo on the drive.