understanding H:BT:L in /dev/disk/by-path

Latest response

I would like to understand the output of ls -l /dev/disk/by-path and identify
Host:Bust:Target:LUN numbers in it.

We have Fiber Channels connected to SAN Storage. The following is the sample output of the command:

The first line corresponds to local server disk and the second one corresponds to SAN Storage

pci-0000:03:00.0-scsi-0:2:0:0 -> ../../sda
pci-0000:04:00.0-fc-0x500601610860608e-lun-4 -> ../../sdf

Responses

You may use "lsscsi" command which would list out block devices along with "H:C:T:L" info which is a good one. The first column of output shows "H:C:T:L" information as shown below:

[root@host1 ~]# lsscsi
[0:0:0:0]    disk    VMware,  VMware Virtual S 1.0   /dev/sda
[0:0:1:0]    disk    VMware,  VMware Virtual S 1.0   /dev/sdb

A lot of options available with this command as one such is using "--device" which would also prints out device minor & major numbers:

[root@host1 ~]# lsscsi --device
[0:0:0:0]    disk    VMware,  VMware Virtual S 1.0   /dev/sda [8:0]
[0:0:1:0]    disk    VMware,  VMware Virtual S 1.0   /dev/sdb [8:16]

Check out the man page of this command to find out more details.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.