VMware Solutions Discussions

LUN Visibility

saranraj456
7,994 Views

Hello,

can anyone  provide me the steps to find the diffrence B/w LUN and Local disk in host like windows2003,windows 2008,solaris,linux with the help of HUK and also without it?

Cheers,

Saran

1 ACCEPTED SOLUTION

arunchak
7,025 Views

You can also find the vendor of the LUN and the id by executing "cat /proc/scsi/scsi" in RHEL

[root@warspite ~]# cat /proc/scsi/scsi

Attached devices:

Host: scsi0 Channel: 00 Id: 00 Lun: 00

  Vendor: IBM-ESXS Model: CBR036C31210ESFN Rev: DFQG

  Type:   Direct-Access                    ANSI SCSI revision: 04

Host: scsi0 Channel: 00 Id: 01 Lun: 00

  Vendor: IBM-ESXS Model: ST336607LC    FN Rev: B25H

  Type:   Direct-Access                    ANSI SCSI revision: 03

Host: scsi0 Channel: 00 Id: 08 Lun: 00

  Vendor: IBM      Model: 25P3495a S320  1 Rev: 1

  Type:   Processor                        ANSI SCSI revision: 02

Host: scsi3 Channel: 00 Id: 00 Lun: 00

  Vendor: NETAPP   Model: LUN              Rev: 7330

  Type:   Direct-Access                    ANSI SCSI revision: 04

Host: scsi3 Channel: 00 Id: 00 Lun: 01

  Vendor: NETAPP   Model: LUN              Rev: 7330

  Type:   Direct-Access                    ANSI SCSI revision: 04

Host: scsi3 Channel: 00 Id: 00 Lun: 03

  Vendor: NETAPP   Model: LUN              Rev: 7330

  Type:   Direct-Access                    ANSI SCSI revision: 04

Thanks,

  Arun

View solution in original post

15 REPLIES 15

baijulal
7,978 Views

Are you looking to identify which are local disk and whichare LUINS presented on that host ?

saranraj456
7,978 Views

Yeah,  i am looking for that info

rwelshman
7,978 Views

If you look in Device Manager at the Disk Drives - the manufacteur of the disk is usually listed - so Netapp disks would be a NetApp LUN, for example.

saranraj456
7,978 Views

Thanks for the info!

That things will be used in windows,for unix host like LINUX,Solaris what would be the method/cmd to find out?

arunchak
7,978 Views

HI,

For Linux, install sansurfer package and say “sanlun lun show”. Hope this is useful.

Thanks,

Arun

saranraj456
7,978 Views

.

I am bit curious to know how could we differentiate LUN and Local disk ,without a HUK / Sansurfer packages installed ?.We came across such a difficulty in an incompatible machine that doesnt have any package to install.

Cheers,

Saran

arunchak
7,978 Views

Hi,

So you want to find the LUN’s connected without any external packages like sansurfer being installed.

Try out: ls -l /sys/block/*/device

Thanks,

Arun

arunchak
7,978 Views

To give you an analogy:

[root@warspite ~]# ls -l /sys/block/*/device

lrwxrwxrwx 1 root root 0 Aug 20 00:20 /sys/block/hda/device -> ../../devices/ide0/0.0

lrwxrwxrwx 1 root root 0 Aug 20 00:20 /sys/block/sda/device -> ../../devices/pci0000:00/0000:00:04.0/0000:03:00.0/0000:04:01.0/host0/target0:0:0/0:0:0:0

lrwxrwxrwx 1 root root 0 Aug 20 00:20 /sys/block/sdb/device -> ../../devices/pci0000:00/0000:00:04.0/0000:03:00.0/0000:04:01.0/host0/target0:0:1/0:0:1:0

lrwxrwxrwx 1 root root 0 Aug 20 00:20 /sys/block/sdc/device -> ../../devices/pci0000:00/0000:00:04.0/0000:03:00.2/0000:05:01.0/host3/rport-3:0-2/target3:0:0/3:0:0:0

lrwxrwxrwx 1 root root 0 Aug 20 00:20 /sys/block/sdd/device -> ../../devices/pci0000:00/0000:00:04.0/0000:03:00.2/0000:05:01.0/host3/rport-3:0-2/target3:0:0/3:0:0:1

lrwxrwxrwx 1 root root 0 Aug 20 00:20 /sys/block/sde/device -> ../../devices/pci0000:00/0000:00:04.0/0000:03:00.2/0000:05:01.0/host3/rport-3:0-2/target3:0:0/3:0:0:3


[root@warspite ~]# sanlun lun show

controller:           lun-pathname           device filename  adapter  protocol          lun size         lun state

       cos:  /vol/NikhilSetupVMware/vcslun1  /dev/sdc         host3    FCP           30g (32212254720)    GOOD

        cos:  /vol/NikhilSetupVMware/vcslun2  /dev/sdd         host3    FCP           10g (10737418240)    GOOD

        cos:  /vol/NikhilSetupVMware/OC50VCS  /dev/sde         host3    FCP           10g (10737418240)    GOOD

The ones that are bolded from the command " ls -l /sys/block/*/device" are the LUNs connected - which are also shown in sanlun lun show.

Thanks,

  Arun


saranraj456
7,978 Views

Thanks arun!

What is the way to find the LUN exactly,when the host contains multiple LUN's with same size.?

arunchak
7,009 Views

HI,

See, with sansurfer or other software it should be easy. Otherwise, I am not very sure but can give you a hint:

In the output I gave you for analogy:

lrwxrwxrwx 1 root root 0 Aug 20 00:20 /sys/block/sdc/device -> ../../devices/pci0000:00/0000:00:04.0/0000:03:00.2/0000:05:01.0/host3/rport-3:0-2/target3:0:0/3:0:0:0

lrwxrwxrwx 1 root root 0 Aug 20 00:20 /sys/block/sdd/device -> ../../devices/pci0000:00/0000:00:04.0/0000:03:00.2/0000:05:01.0/host3/rport-3:0-2/target3:0:0/3:0:0:1

lrwxrwxrwx 1 root root 0 Aug 20 00:20 /sys/block/sde/device -> ../../devices/pci0000:00/0000:00:04.0/0000:03:00.2/0000:05:01.0/host3/rport-3:0-2/target3:0:0/3:0:0:3

were the 3 LUNs mapped to the host.

Now From filer view, the id’s of these 3 Luns mapped to this host are as follows:

Lun name - vcslun2               Lun id - 1

vcslun1 -                                                  0

OC5OVCS –                                             3

If you see thelast digit of the output above (target mapped to):

ie.

target3:0:0/3:0:0:0

target3:0:0/3:0:0:1

target3:0:0/3:0:0:3

and map the Lun id, you should be able to differentiate.

So,

lrwxrwxrwx 1 root root 0 Aug 20 00:20 /sys/block/sdd/device -> ../../devices/pci0000:00/0000:00:04.0/0000:03:00.2/0000:05:01.0/host3/rport-3:0-2/target3:0:0/3:0:0:1

i.e device sdd should be the LUN vcslun2

Thanks,

  Arun

arunchak
7,026 Views

You can also find the vendor of the LUN and the id by executing "cat /proc/scsi/scsi" in RHEL

[root@warspite ~]# cat /proc/scsi/scsi

Attached devices:

Host: scsi0 Channel: 00 Id: 00 Lun: 00

  Vendor: IBM-ESXS Model: CBR036C31210ESFN Rev: DFQG

  Type:   Direct-Access                    ANSI SCSI revision: 04

Host: scsi0 Channel: 00 Id: 01 Lun: 00

  Vendor: IBM-ESXS Model: ST336607LC    FN Rev: B25H

  Type:   Direct-Access                    ANSI SCSI revision: 03

Host: scsi0 Channel: 00 Id: 08 Lun: 00

  Vendor: IBM      Model: 25P3495a S320  1 Rev: 1

  Type:   Processor                        ANSI SCSI revision: 02

Host: scsi3 Channel: 00 Id: 00 Lun: 00

  Vendor: NETAPP   Model: LUN              Rev: 7330

  Type:   Direct-Access                    ANSI SCSI revision: 04

Host: scsi3 Channel: 00 Id: 00 Lun: 01

  Vendor: NETAPP   Model: LUN              Rev: 7330

  Type:   Direct-Access                    ANSI SCSI revision: 04

Host: scsi3 Channel: 00 Id: 00 Lun: 03

  Vendor: NETAPP   Model: LUN              Rev: 7330

  Type:   Direct-Access                    ANSI SCSI revision: 04

Thanks,

  Arun

saranraj456
7,009 Views

Arun,

is it possible by anyway to find the LUN using a serial number in it?

Cheers,
Saran

arunchak
7,009 Views

HI,

  LUN id is the unique identifier between the host and the filer (storage) to differentiate between LUNs. There should be a way to find the LUN using serial number. I am currently not aware of it. Will let you know if I find anything.

Thanks,

  Arun

saranraj456
7,009 Views

Arun,

We have used luxadm in solaris to find out the serial no with the help of that we can match the LUN with Serial No.

# luxadm display /dev/rdsk/c0t600015D0002028000000000000001142d0s2

DEVICE PROPERTIES for disk: /dev/rdsk/c0t600015D0002028000000000000001142d0s2

  Vendor:     SUN

  Product ID:     SE6920

  Revision:     0202

  Serial Num:     00500057

  Unformatted capacity:     10240.000 MBytes

  Read Cache:     Enabled

    Minimum prefetch:     0x0

    Maximum prefetch:     0xffff

  Device Type:     Disk device

  Path(s):

  /dev/rdsk/c0t600015D0002028000000000000001142d0s2

  /devices/scsi_vhci/disk@g600015d0002028000000000000001142:c,raw

   Controller     /dev/cfg/c4

    Device Address          213600015d207200,0

    Host controller port WWN          210100e08b206812

    Class          primary

    State          ONLINE

   Controller     /dev/cfg/c11

    Device Address          213600015d207200,0

    Host controller port WWN          210100e08b30a2f2

    Class          primary

    State          ONLINE

Cheers,

Saran

arunchak
7,009 Views

Thanks 

There is an equavelant way by using lscfg in Linux. Guess, I need to install couple of rpm's to make it work.

Thanks,

  Arun

Public