Archive

Archive for the ‘Netapp’ Category

Adding a Netapp LUN on the SAN to a RHEL 5 host

April 15, 2011 5 comments

This note will provide the steps to add Netapp LUNs to a running RHEL 5 linux host.

First, ensure the LUNs have been shared/zoned correctly per Netapp requirements.  This doc also assumes Netapp Linux Host software has been installed.

Next, scan the HBAs for the new LUNs:

echo “- – -” > /sys/class/scsi_host/<host listings>/scan

<host listings> refer to the scsi host instances (for the hbas). if you do a listing of the scsi_host directory, you will see something similar to the following:
[root@r08u6 scsi_host]# ll
total 0
drwxr-xr-x 2 root root 0 Aug 4 15:52 host0
drwxr-xr-x 2 root root 0 Aug 4 15:52 host1
drwxr-xr-x 2 root root 0 Aug 4 15:52 host2

as you can see, on this server it shows 3 instances of scsi host entries. by using the echo command above on each of these directory’s “scan” files it will force a re-read of the specific scsi bus.

This procedure has been tested on RHEL5 successfully without interruption to the system.

Next, run:
#sanlun lun show all
controller:         lun-pathname         device filename  adapter  protocol          lun size         lun state
IRVFAS01B:  /vol/BI_TEST/BI_TEST_LUN_2  /dev/sdz         host3    FCP            2t (2199023255552)  GOOD
IRVFAS01B:  /vol/BI_TEST/BI_TEST_LUN_1  /dev/sdaa        host3    FCP            2t (2199023255552)  GOOD
IRVFAS01B:  /vol/BI_TEST/BI_TEST_LUN_2  /dev/sdab        host3    FCP            2t (2199023255552)  GOOD
IRVFAS01B:  /vol/BI_TEST/BI_TEST_LUN_1  /dev/sdac        host3    FCP            2t (2199023255552)  GOOD
IRVFAS01B:  /vol/BI_TEST/BI_TEST_LUN_2  /dev/sdap        host4    FCP            2t (2199023255552)  GOOD
IRVFAS01B:  /vol/BI_TEST/BI_TEST_LUN_1  /dev/sdaq        host4    FCP            2t (2199023255552)  GOOD
IRVFAS01B:  /vol/BI_TEST/BI_TEST_LUN_2  /dev/sdbd        host4    FCP            2t (2199023255552)  GOOD
IRVFAS01B:  /vol/BI_TEST/BI_TEST_LUN_1  /dev/sdbe        host4    FCP            2t (2199023255552)  GOOD

In the example above, we see 2 LUNs mapped with 4 paths to each.

Now, verify using multipath:
#multipath -ll

Note, the WWID that are shown.  You can use them below to map the devices to an alias device name of your choosing.

If the new LUNs aren’t listed, reload the configs:
#service multipathd reload

If you want to use an alias name for the device, modify /etc/multipath.conf and add a stanza similar to:

multipath {
wwid            360a98000486e642f50346331694a7247
alias           mynewLUN1
path_grouping_policy failover
}

This should be part of the “multipaths” section.

Advertisements
Categories: Linux, Netapp, Redhat