Search This Blog

2014-07-25

Linux Disk Device Mapping

To find which /dev/sd* device is mapped to which device we can look at PCI mappings

ls -ld /sys/block/sd*/device
Then look at /proc/scsi/scsi to see which scsi devices are mapped to which pci bus ID:
vi /proc/scsi/scsi
 
  
From the above example we can tell the following:
sda - 0:0:0:0 - iDrac LCDrive/Virtual CDROM
sdb - 1:0:0:1 - Virtual Floppy
sdc - 2:2:0:0 - Perc H700

ls -lah /dev/disk/by-id/
total 0
drwxr-xr-x 2 root root 320 Jul 25 09:29 .
drwxr-xr-x 6 root root 120 Jul 25 09:27 ..
lrwxrwxrwx 1 root root  10 Jul 25 09:29 dm-name-VolGrp-Vol1 -> ../../dm-0
lrwxrwxrwx 1 root root  10 Jul 25 09:29 dm-name-VolGrp-Vol2 -> ../../dm-1
lrwxrwxrwx 1 root root  10 Jul 25 09:29 dm-name-VolGrp-Vol3 -> ../../dm-2
lrwxrwxrwx 1 root root  10 Jul 25 09:29 dm-uuid-LVM-eUSmpiTS1aZWja1q4dPPqMPhi3AhGMNu5Avtsg9KN0HBtRhKlscWJiT2ENpf5VIW -> ../../dm-1
lrwxrwxrwx 1 root root  10 Jul 25 09:29 dm-uuid-LVM-eUSmpiTS1aZWja1q4dPPqMPhi3AhGMNuAhjcv5uXBeER6MnafJxkXhYuhvTXp8km -> ../../dm-0
lrwxrwxrwx 1 root root  10 Jul 25 09:29 dm-uuid-LVM-eUSmpiTS1aZWja1q4dPPqMPhi3AhGMNuOFB42fJ5i0QCnTAtTiTQnfeKBukBGVqE -> ../../dm-2
lrwxrwxrwx 1 root root   9 Jul 25 09:31 scsi-36782bcb069805f001667e67011b6790b -> ../../sda
lrwxrwxrwx 1 root root  10 Jul 25 09:28 scsi-36782bcb069805f001667e67011b6790b-part1 -> ../../sda1
lrwxrwxrwx 1 root root  10 Jul 25 09:29 scsi-36782bcb069805f001667e67011b6790b-part2 -> ../../sda2
lrwxrwxrwx 1 root root  10 Jul 25 09:29 scsi-36782bcb069805f001667e67011b6790b-part3 -> ../../sda3
lrwxrwxrwx 1 root root   9 Jul 25 09:31 wwn-0x6782bcb069805f001667e67011b6790b -> ../../sda
lrwxrwxrwx 1 root root  10 Jul 25 09:28 wwn-0x6782bcb069805f001667e67011b6790b-part1 -> ../../sda1
lrwxrwxrwx 1 root root  10 Jul 25 09:29 wwn-0x6782bcb069805f001667e67011b6790b-part2 -> ../../sda2
lrwxrwxrwx 1 root root  10 Jul 25 09:29 wwn-0x6782bcb069805f001667e67011b6790b-part3 -> ../../sda3

No comments:

Post a Comment