Total Pageviews

Sunday 23 February 2014

Basic Storage stuff..!!

How To Check LUN or SAN Disk In Linux

How to check attached lun from a storage device in Linux is explained with few commands. Its just to understand better how to manage attached storage.

#cat /proc/scsi/scsi file it wi give you information like 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
Above indicates that HSV110 is a storage disk and it also give the LUN numbers with iscsi information
Like 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 dont have a vendor based software to detect your SAN disk (LUNs), or instead u can use “multipath” tools which is open source utility. Then, u can see the device names via running:


# multipath -l

No comments:

Post a Comment