On 21/03/2019 17.46, David C. Rankin wrote:
On 03/21/2019 07:04 AM, Carlos E. R. wrote:
But I do not see how to find out what disk is connected where (sda, sdb...)
Look at:
$ ls -al /dev/disk/by-path
That should show the pci to id mapping, e.g.
lrwxrwxrwx 1 root root 9 Mar 16 15:30 pci-0000:00:1f.2-ata-1 -> ../../sda lrwxrwxrwx 1 root root 10 Mar 16 15:30 pci-0000:00:1f.2-ata-1-part1 -> ../../sda1 lrwxrwxrwx 1 root root 10 Mar 16 15:30 pci-0000:00:1f.2-ata-1-part2 -> ../../sda2 lrwxrwxrwx 1 root root 10 Mar 16 15:30 pci-0000:00:1f.2-ata-1-part3 -> ../../sda3 lrwxrwxrwx 1 root root 10 Mar 16 15:30 pci-0000:00:1f.2-ata-1-part4 -> ../../sda4 lrwxrwxrwx 1 root root 9 Mar 16 15:30 pci-0000:00:1f.2-ata-2 -> ../../sdb lrwxrwxrwx 1 root root 10 Mar 16 15:30 pci-0000:00:1f.2-ata-2-part1 -> ../../sdb1 lrwxrwxrwx 1 root root 10 Mar 16 15:30 pci-0000:00:1f.2-ata-2-part2 -> ../../sdb2 lrwxrwxrwx 1 root root 10 Mar 16 15:30 pci-0000:00:1f.2-ata-2-part3 -> ../../sdb3 lrwxrwxrwx 1 root root 9 Mar 16 15:30 pci-0000:00:1f.2-ata-3 -> ../../sr0
Yes, sure, but the names I have are: -r--r--r-- 1 root root 4096 Mar 21 12:56 /sys/class/ata_link/link1/sata_spd -r--r--r-- 1 root root 4096 Mar 21 12:56 /sys/class/ata_link/link10/sata_spd -r--r--r-- 1 root root 4096 Mar 21 12:56 /sys/class/ata_link/link11/sata_spd Ok, I found another table: cer@Telcontar:~> l /sys/class/ata_link/link1/subsystem/ total 0 drwxr-xr-x 2 root root 0 Mar 21 18:47 ./ drwxr-xr-x 52 root root 0 Mar 21 14:17 ../ lrwxrwxrwx 1 root root 0 Mar 21 18:47 link1 -> ../../devices/pci0000:00/0000:00:1c.2/0000:04:00.1/ata1/link1/ata_link/link1/ lrwxrwxrwx 1 root root 0 Mar 21 18:47 link10 -> ../../devices/pci0000:00/0000:00:1f.2/ata10/link10/ata_link/link10/ lrwxrwxrwx 1 root root 0 Mar 21 18:47 link11 -> ../../devices/pci0000:00/0000:00:1f.5/ata11/link11/ata_link/link11/ lrwxrwxrwx 1 root root 0 Mar 21 18:47 link12 -> ../../devices/pci0000:00/0000:00:1f.5/ata12/link12/ata_link/link12/ lrwxrwxrwx 1 root root 0 Mar 21 18:47 link2 -> ../../devices/pci0000:00/0000:00:1c.2/0000:04:00.1/ata2/link2/ata_link/link2/ lrwxrwxrwx 1 root root 0 Mar 21 18:47 link3 -> ../../devices/pci0000:00/0000:00:1c.3/0000:05:00.1/ata3/link3/ata_link/link3/ lrwxrwxrwx 1 root root 0 Mar 21 18:47 link4 -> ../../devices/pci0000:00/0000:00:1c.3/0000:05:00.1/ata4/link4/ata_link/link4/ lrwxrwxrwx 1 root root 0 Mar 21 18:47 link5 -> ../../devices/pci0000:00/0000:00:1c.2/0000:04:00.0/ata5/link5/ata_link/link5/ lrwxrwxrwx 1 root root 0 Mar 21 18:47 link6 -> ../../devices/pci0000:00/0000:00:1c.2/0000:04:00.0/ata6/link6/ata_link/link6/ lrwxrwxrwx 1 root root 0 Mar 21 18:47 link7 -> ../../devices/pci0000:00/0000:00:1c.3/0000:05:00.0/ata7/link7/ata_link/link7/ lrwxrwxrwx 1 root root 0 Mar 21 18:47 link8 -> ../../devices/pci0000:00/0000:00:1c.3/0000:05:00.0/ata8/link8/ata_link/link8/ lrwxrwxrwx 1 root root 0 Mar 21 18:47 link9 -> ../../devices/pci0000:00/0000:00:1f.2/ata9/link9/ata_link/link9/ cer@Telcontar:~> Now, the other lilst is too long, it includes the partitions: cer@Telcontar:~> ls -la /dev/disk/by-path total 0 drwxr-xr-x 2 root root 1740 Mar 20 22:52 . drwxr-xr-x 8 root root 160 Mar 18 11:17 .. lrwxrwxrwx 1 root root 9 Mar 18 11:17 pci-0000:00:1f.2-ata-1 -> ../../sda lrwxrwxrwx 1 root root 10 Mar 18 11:17 pci-0000:00:1f.2-ata-1-part1 -> ../../sdb1 lrwxrwxrwx 1 root root 11 Mar 18 11:17 pci-0000:00:1f.2-ata-1-part10 -> ../../sda10 lrwxrwxrwx 1 root root 11 Mar 18 11:17 pci-0000:00:1f.2-ata-1-part11 -> ../../sda11 ... So sda is link10. Long matching job. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)