Skip to main content

SCSI: SAN or local disk? [Resolved]

I have a Debian 9 running. It has a SSD connected as well as a fibrechannel link to a SAN storage.

As far I see both are visible as /dev/sdX devices.

How can I find out what is the disk and what is the storage?

Where is the storage configured in the system?


Question Credit: chris01
Question Reference
Asked May 16, 2019
Tags: linux, scsi, iscsi
Posted Under: Unix Linux
43 views
2 Answers

More convenient way is to use lsscsi utility.

From documentation about FC:

For FC devices (logical units), the '--transport' option will show the port name and the port identifier instead of the SCSI INQUIRY "strings". For example:

$ lsscsi -g
[3:0:0:0]    enclosu HP       A6255A           HP04  -         /dev/sg3
[3:0:1:0]    disk    HP 36.4G ST336753FC       HP00  /dev/sdd  /dev/sg4
[3:0:2:0]    disk    HP 36.4G ST336753FC       HP00  /dev/sde  /dev/sg5

$ lsscsi -g --transport
[3:0:0:0]    enclosu fc:0x50060b00002e48a3,0x0b109b  -         /dev/sg3
[3:0:1:0]    disk    fc:0x21000004cf97de68,0x0b109f  /dev/sdd  /dev/sg4
[3:0:2:0]    disk    fc:0x21000004cf97e385,0x0b10a3  /dev/sde  /dev/sg5

credit: Yurij Goncharuk
Answered May 16, 2019

You can try something like: check the major and the minor numbers for this device:

# ls -l /dev/sd*
brw-rw---- 1 root disk 8, 0 May 15 12:58 /dev/sda

then go to directory

/sys/dev/block/8:0/device

where 8:0 represent above major and minor number and get the content of file model

# cat model
VBOX HARDDISK

P.S. This is for RHEL, on Debian the path maybe should be /sys/dev/8:0/device


credit: Romeo Ninov
Answered May 16, 2019
Your Answer
D:\Adnan\Candoerz\CandoProject\vQA