sanlun NetApp utility gathering information about LUNs in Linux

We have an NetApp SAN utility to fetch details about mapped LUN’s, Host bus adapter WWWN details, Path of the associated LUN to Linux disk. The  sanlun utility is a user application that retrieves and displays information about LUNs on a NetApp controller. By default, sanlun lists information for all devices found in the /dev directory. sanlun NetApp utility

Note: You must be root to run sanlun.

Download Netapp Host utility from mysupport Netapp site. Download Link

[root@ArkIT-Serv ~]# rpm -ivh netapp_linux_unified_host_utilities-7-1.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
 1:netapp_linux_unified_host_utiliti################################# [100%]

sanlun NetApp utility gathering information about LUNs in Linux

To display about LUN and disk information

[root@TechTutorials ~]# sanlun lun show
controller(7mode)/                        device          host                  lun
vserver(Cmode)       lun-pathname         filename        adapter    protocol   size    mode
--------------------------------------------------------------------------------------------
ark-netapp-03        /vol/u03/u03 /dev/sdo        host6      FCP        500.1g  C
ark-netapp-03        /vol/u02/u02 /dev/sdn        host6      FCP        600.1g  C

Get the  mapped LUN details using particular disk / partition. Using below command we can get the details about LUN, the LUN which is used to create Disk / Partition.

[root@TechTutorials ~]# sanlun fcp show adapter -c

[root@TechTutorials ~]# sanlun lun show -d /dev/sdo
controller(7mode)/                        device          host                  lun
vserver(Cmode)       lun-pathname         filename        adapter    protocol   size    mode
--------------------------------------------------------------------------------------------
ark-netapp-03        /vol/u03/u03 /dev/sdo        host6      FCP        500.1g  C

Fetch iSCSI details by providing Local disk information

Command will provide us the details of NetApp Filer, iSCSI Initiator details.

[root@TechTutorials ~]# sanlun lun show -v -d /dev/sdo1

vserver              lun-pathname              filename        adapter    protocol   size    mode
-------------------------------------------------------------------------------------------------
vserver1                  /vol/auto_vol196_4/lun1_1 /dev/sdo1       host29     iSCSI      3g      C
LUN Serial number: 2Fgnl+9slW1d
Controller Model Name: FAS3170
Vserver iSCSI IP address: 192.168.10.99
Vserver iSCSI port number: 3260
Vserver IP address: 192.168.20.78
Vserver volume name: auto_vol196_4   MSID::0x00000000000000000000000080000413
Vserver snapshot name:

Display mapped LUN details which are mapped to particular HBA card using its WWPN (World wide Port Name)

[root@TechTutorials ~]# sanlun lun show -wwpn 21000034ff0613e5

Displays all the devices reachable through the controller port with WWPN 21000034ff0613e5:

controller(7mode)/   target                                                      device          host       lun
vserver(Cmode)       wwpn               lun-pathname                             filename        adapter    size    mode
------------------------------------------------------------------------------------------------------------------------

Vserver1                  21000034ff0613e5   /vol/volname/lun2                        /dev/sdr        host10     200g      C
Vserver1                  21000034ff0613e5   /vol/volname/lun1                        /dev/sdq        host10     200g      C
Vserver1                  21000034ff0613e5   /vol/volname/lun2                        /dev/sdj        host9      200g      C
Vserver1                  21000034ff0613e5   /vol/volname/lun1                        /dev/sdi        host9      200g      C

The output will be the same for the command “sanlun lun show -wwpn 21:00:00:34:ff:06:13:e5”.

Get Netapp Filer Information using LUN path

We can also see, from which Netapp Filer LUN is mapped and its information.

[root@TechTutorials ~]# sanlun lun show -pv Vserver1:/vol/volname/lun2

ONTAP Path: Vserver1:/vol/volname/lun2
LUN: 1
LUN Size: 200g
Host Device: 360a990003246665c422b397a54625875
Mode: C
Multipath Policy: round-robin 0
DM-MP Features: 1 queue_if_no_path
Hardware Handler: 1 alua
Multipath Provider: Native
----------- --------- ---------- ------- ------------ ---------------------------------------------- ----------
host      vserver            host:
dm-mp       path      path       /dev/   chan:        vserver                                        major:
state       state     type       node    id:lun       LIF                                            minor
----------- --------- ---------- ------- ------------ ---------------------------------------------- ----------
active      up        primary    sdd     9:0:0:1      fcp_lif1                                       8:48
active      up        primary    sdp     10:0:2:1     fcp_lif2                                       8:240
active      up        secondary  sdf     9:0:1:1      fcp_lif3                                       8:80
active      up        secondary  sdr     10:0:3:1     fcp_lif4                                       65:16

Know Netapp Utility version information

[root@TechTutorials ~]# sanlun versionsanlun version 6.1.174.7755

That’s it about sanlun Netapp Utility ..!!

Related Articles

How to find SAN disk Lun id

iSCSI Server installation Providing Block Storage to Remote host

Thanks for your wonderful Support and Encouragement

Ravi Kumar Ankam

My Name is ARK. Expert in grasping any new technology, Interested in Sharing the knowledge. Learn more & Earn More

Leave a Reply

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