Operating System - Linux
1748219 Members
4751 Online
108759 Solutions
New Discussion юеВ

Re: viewing the available LUNs in linux

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

viewing the available LUNs in linux

Hi

My system is connected with SAN network.
and I has four SAN disks (LUNs).

so I want to know

1) what are the device files assigned for those SAN disks.

2)and how many SAN disks (LUNs) are available.

what is the command used in linux to view above information.

5 REPLIES 5
Taifur
Respected Contributor

Re: viewing the available LUNs in linux

Hi Senith Kumar

Linux doesn't have ioscan.

Try dmesg to see what device are attached to your system.

Try #cat /proc/scsi/scsi to see what scsi device are attached.

Try #fdisk -l /dev/sda or /dev/hda to see how many partitions are in the disk.

Try #free to see the memory usage and also swap usage (No swapinfo on Linux.)

Try #cat /proc/meminfo

Try #cat /proc/cpuinfo to see
what cpu your system is using.

Rgds//
Taifur

Johnson Punniyalingam
Honored Contributor

Re: viewing the available LUNs in linux

1) what are the device files assigned for those SAN disks.

2)and how many SAN disks (LUNs) are available.
<<

Hi Senthil kumar,

can you post the "df -k" output for your "linux Server"

if your "Linux Server configured with LVM"

we can you vgdisplay command to check,

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
senthil_kumar_1
Super Advisor

Re: viewing the available LUNs in linux

I have taken "df" and "dmesg" reports for two linux servers.

server 1:


ze4egi@emdlagas71:/proc/scsi/qla2xxx> df -h

Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d0p2 17G 6.7G 11G 40% /
tmpfs 7.8G 0 7.8G 0% /dev/shm
/dev/mapper/vg01-lvol1
997G 583G 414G 59% /iman_volumes
/dev/sda1 15G 7.9G 6.2G 57% /appl
/dev/sda2 12G 5.7G 6.4G 48% /win_appl



ze4egi@emdlagas71:/proc/scsi/qla2xxx> dmesg | grep lun

Attached scsi disk sda at scsi0, channel 0, id 1, lun 0
Attached scsi disk sdb at scsi0, channel 0, id 1, lun 1
Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0, type 1
Attached scsi generic sg1 at scsi0, channel 0, id 0, lun 1, type 1
Attached scsi generic sg2 at scsi0, channel 0, id 0, lun 2, type 12
Attached scsi generic sg3 at scsi0, channel 0, id 1, lun 0, type 0
Attached scsi generic sg4 at scsi0, channel 0, id 1, lun 1, type 0
Attached scsi generic sg5 at scsi1, channel 0, id 0, lun 0, type 8
Attached scsi generic sg6 at scsi1, channel 0, id 0, lun 1, type 1
Attached scsi generic sg7 at scsi1, channel 0, id 0, lun 2, type 1
Attached scsi generic sg8 at scsi1, channel 0, id 0, lun 3, type 12
Attached scsi tape st0 at scsi0, channel 0, id 0, lun 0
Attached scsi tape st1 at scsi0, channel 0, id 0, lun 1
Attached scsi tape st2 at scsi1, channel 0, id 0, lun 1
Attached scsi tape st3 at scsi1, channel 0, id 0, lun 2


server 2:

-bash-3.00$ df -h

Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d0p1 71G 1.3G 66G 2% /
/dev/cciss/c0d0p5 4.9G 2.1G 2.6G 45% /admin
/dev/cciss/c0d0p13 9.7G 6.1G 3.1G 67% /appl
/dev/cciss/c0d0p6 4.9G 2.5G 2.2G 54% /ccm_admin
none 7.9G 0 7.9G 0% /dev/shm
/dev/cciss/c0d0p2 9.7G 6.9G 2.4G 75% /home_uat
/dev/cciss/c0d0p7 4.9G 1.2G 3.5G 26% /opt
/dev/cciss/c0d0p5 4.9G 2.1G 2.6G 45% /projects
/dev/cciss/c0d0p9 4.9G 65M 4.5G 2% /tmp
/dev/cciss/c0d0p10 4.9G 3.1G 1.5G 68% /usr
/dev/cciss/c0d0p11 4.9G 917M 3.7G 20% /var
/dev/sda2 23G 7.7G 15G 36% /data6.5x
/dev/sdc1 50G 38G 9.3G 81% /orders
/dev/mapper/vg00-lvol1
168G 59G 101G 37% /data6.5
lgcms:/data_63 83G 63G 20G 77% /data63
lgcms:/data_tcs 14G 8.6G 5.1G 63% /datatcs
ad121991:/home 26G 23G 2.5G 91% /home


-bash-3.00$ dmesg | grep lun

Attached scsi disk sda at scsi1, channel 0, id 0, lun 0
Attached scsi disk sdb at scsi1, channel 0, id 0, lun 1
Attached scsi disk sdc at scsi1, channel 0, id 0, lun 2
Attached scsi disk sdd at scsi1, channel 0, id 0, lun 3
Attached scsi generic sg0 at scsi1, channel 0, id 0, lun 0, type 0
Attached scsi generic sg1 at scsi1, channel 0, id 0, lun 1, type 0
Attached scsi generic sg2 at scsi1, channel 0, id 0, lun 2, type 0
Attached scsi generic sg3 at scsi1, channel 0, id 0, lun 3, type 0


I have following questions:

server 1:

1) is the first server has only two luns (sda-lun0, sdb-lun1)
2) what is tape st0, tape st1..
3) what is generic sg0, sg1, sg2 ...


server 2:

1) is the second server has only four luns (sda-lun0, sdb-lun1, sdc-lun2, sdd-lun3)


pls answer my questions one by one.

Jeeshan
Honored Contributor
Solution

Re: viewing the available LUNs in linux

avizen9
Esteemed Contributor

Re: viewing the available LUNs in linux