Need help adding FC luns

Fran Garcia franchu.garcia at gmail.com
Tue Jan 4 21:03:29 UTC 2011


On Tue, Jan 4, 2011 at 16:23, Matty Sarro <msarro at gmail.com> wrote:
> Thanks for your help everyone. I am pursuing this both on the SAN
> itself, as well as from the OS. The SAN itself apparently defaults to
> using loop mode FC, and it showed both ports as in a disconnected
> state. I switched it to auto-negotiate and the ports report as up on
> the SAN. After rebooting the server I see the following in dmesg:

Is the server directly connected to the MSA? If there are FC switches
in between, you need to configure the relevant zoning into them.

If the server is directly attached to the MSA, you should see somethig to this :

# lsscsi
[2:0:0:0]    enclosu HP       MSA2312fc        M111  -
[2:0:1:0]    enclosu HP       MSA2312fc        M111  -
[3:0:0:0]    enclosu HP       MSA2312fc        M111  -
[3:0:1:0]    enclosu HP       MSA2312fc        M111  -

Devices starting with 2 are seen from HBA #2, meaning we see 4 paths
to the array. Third number (0 or 1) means which storage controller
(MSA controller in this case) the device is, and last number is LUN ID
(definable from MSA side as well).

Once you've verified you can see the controllers, you need to get the
WWN of your HBAs :

# ls -1 /sys/class/fc_host/
host2
host3
# cat /sys/class/fc_host/host2/port_name
0x100000051e9cc99b
# cat /sys/class/fc_host/host3/port_name
0x100000051e9cc99c

Then you need to log into your MSA and make sure the LUNs are mapped
to those WWNs. As a best practise, you should configure a
user-friendly name to those WWNs in the MSA. (ie: host1_hba0 and
host1_hba1).

After doing this, the LUNs should be accesible from the rhel box
(after rebooting the box). If you need to re-scan online have a look
at http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Online_Storage_Reconfiguration_Guide/index.html

Output of lsscsi will be like :
[2:0:0:0]    enclosu HP       MSA2312fc        M111  -
[2:0:0:5]    disk    HP       MSA2312fc        M111  /dev/sda
[2:0:0:6]    disk    HP       MSA2312fc        M111  /dev/sdb
[2:0:1:0]    enclosu HP       MSA2312fc        M111  -
[2:0:1:5]    disk    HP       MSA2312fc        M111  /dev/sdg
[2:0:1:6]    disk    HP       MSA2312fc        M111  /dev/sdh
[3:0:0:0]    enclosu HP       MSA2312fc        M111  -
[3:0:0:5]    disk    HP       MSA2312fc        M111  /dev/sdm
[3:0:0:6]    disk    HP       MSA2312fc        M111  /dev/sdn
[3:0:1:0]    enclosu HP       MSA2312fc        M111  -
[3:0:1:5]    disk    HP       MSA2312fc        M111  /dev/sds
[3:0:1:6]    disk    HP       MSA2312fc        M111  /dev/sdt

This is a system with 2 HBAs and 2 LUNs presented.

Finally, I'd advise to use multipath. Not only you'll have persistent
device names across reboots

The final /etc/multipath.conf should look something like :

# Config provided by HP MSA installation guide
device
{
vendor "HP"
product "MSA2312fc|MSA2324fc"
getuid_callout "/lib/udev/scsi_id -g -u /dev/%n"
hardware_handler "0"
path_selector "round-robin 0"
prio alua
path_grouping_policy group_by_prio
failback immediate
rr_weight uniform
no_path_retry 18
rr_min_io 100
path_checker tur
}

multipaths {
       multipath {
               wwid                    3600c0ff000daa211d52c374c01000000
               alias                   friendlyname1
        }
       multipath {
               wwid                    3600c0ff000daa2117a2e374c01000000
               alias                   friendlyname2
        }
}

After restarting multipath, you should get :

# multipath -ll
whateverlunname1 (3600c0ff000daa2112b72444c01000000) dm-9 HP,MSA2312fc
[size=14G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=100][active]
 \_ 2:0:1:7  sdi 8:128  [active][ready]
 \_ 3:0:1:7  sdu 65:64  [active][ready]
\_ round-robin 0 [prio=20][enabled]
 \_ 2:0:0:7  sdc 8:32   [active][ready]
 \_ 3:0:0:7  sdo 8:224  [active][ready]
whateverlunname2 (3600c0ff000daa211e92cd84b01000000) dm-10 HP,MSA2312fc
[size=140G][features=1 queue_if_no_path][hwhandler=0][rw]
\_ round-robin 0 [prio=100][active]
 \_ 2:0:1:8  sdj 8:144  [active][ready]
 \_ 3:0:1:8  sdv 65:80  [active][ready]
\_ round-robin 0 [prio=20][enabled]
 \_ 2:0:0:8  sdd 8:48   [active][ready]
 \_ 3:0:0:8  sdp 8:240  [active][ready]

Your multipath devices are under /dev/mapper . Then again, do not use
non-multipathed devices (ie: sda) if you're using multipathd :-)

HTH




More information about the redhat-list mailing list