How To Check LUN or SAN Disk In Linux

To check the attached LUN from a storage device in Linux, we have explained this with few commands. It is just to understand better how to manage attached storage.

#cat /proc/scsi/scsi file, it will give you information as shown below:

Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: HP 36.4G Model: MAN3367MC Rev: HP05
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: COMPAQ Model: HSV110 (C)COMPAQ Rev: 2003
Type: Unknown ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 00 Lun: 02
Vendor: COMPAQ Model: HSV110 (C)COMPAQ Rev: 2003
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 00 Lun: 03
Vendor: COMPAQ Model: HSV110 (C)COMPAQ Rev: 2003
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 01 Lun: 00
Vendor: COMPAQ Model: HSV110 (C)COMPAQ Rev: 2003
Type: Unknown ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 01 Lun: 02
Vendor: COMPAQ Model: HSV110 (C)COMPAQ Rev: 2003
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi2 Channel: 00 Id: 01 Lun: 03
Vendor: COMPAQ Model: HSV110 (C)COMPAQ Rev: 2003

The above command indicates that HSV110 is a storage disk and it also gives the LUN numbers with scsi information. Here it shows scsi2 is a san disk, if you want know about SAN partition:

#dmesg | grep -i "attached "
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Attached scsi disk sdb at scsi2, channel 0, id 0, lun 2
Attached scsi disk sdc at scsi2, channel 0, id 0, lun 3
Attached scsi disk sdd at scsi2, channel 0, id 1, lun 2

If you do not have a vendor based software to detect your SAN disk (LUNs) or instead you can use "multipath" tools which is a open source utility. Then you can see the device name running through # multipath -l.

Bobbin Zachariah 10:38 am

About Bobbin Zachariah

Founder of LinOxide, passionate lover of Linux and technology writer. Started his career in Linux / Opensource from 2000. Love traveling, blogging and listening music. Reach Bobbin Zachariah about me page and google plus page.

Author Archive Page

Have anything to say?

Your email address will not be published. Required fields are marked *

All comments are subject to moderation.