Under the /sys/class/scsi_device folder I have the following:

 root@linux01:/sys/class/scsi_device # ls
 1:0:0:0  2:0:0:0  2:0:1:0  3:0:0:0

How can I know how each of these devices is related to the disk?

For example, how can I determine if device 2:0:1:0 is disk /dev/sdb?

root@linux01:/sys/class/scsi_device # sfdisk -s
/dev/sdb:  15728640
/dev/sdc: 524288000
/dev/sda:    153600
# more /etc/redhat-release  ( Linux VM machine ) 
Red Hat Enterprise Linux Server release 6.5 (Santiago)

1 Answer 1


An easy way to get the correspondence is to look at the device/block subdirectory in the /sys hierarchy:

# ls -1d /sys/class/scsi_device/*/device/block/*

The directory name in there correspond to the block device name in /dev.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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