Friday 23 January 2015

Scanning FC/SAN LUNS in Solaris





Before scanning LUNS, we see some useful commands which are related to Fibre Channel(FC).





1.List the connected HBA’s.
root@Unixarena-SOL11:~# luxadm -e port |grep CONNECTED
/devices/pci@1d,700000/SUNW,qlc@1,1/fp@0,0:devctl CONNECTED
/devices/pci@1d,700000/SUNW,qlc@3/fp@0,0:devctl CONNECTED




2.Verify FC channel ‘s are connected and configured.
Unix@sol# cfgadm -al -o show_FCP_dev |grep fc-fabric
c2                             fc-fabric    connected    configured   unknown
c4                             fc-fabric    connected    configured   unknown




3.To find the HBA’s World wide Node number (WWN),use fcinfo command,
Unix@sol# fcinfo hba-port |grep Port
HBA Port WWN: 10000000c884bb48
HBA Port WWN: 10000000c884bb49
HBA Port WWN: 10000000c884b85c
HBA Port WWN: 10000000c884b85d




4.You can also find the WWN form luxadm command, if  HBA is  already connected to FC switch.
Unix@sol# luxadm -e dump_map /dev/cfg/c4
Pos  Port_ID Hard_Addr Port WWN         Node WWN         Type
0    29900   0        50080e8008cfb814 50080e8008cfb814 0x0  (Disk device)
1    27400   0        10000000c884b85c 20000000c884b85c 0x1f (Unknown Type,Host Bus Adapter)
Unix@sol#
From the above output, the last line shows the HBA information.In the same you can find the other controller information as well.

5.Zoning can be verified using the below command.
Unix@sol# cfgadm -al -o show_FCP_dev c2 c4 

6.If you see any controller port “WWN” showing as “unconfigured” ,then  you can initiate FC session using below mentioned command.
Unix@sol# cfgadm -c configure c2::50080e8008cfb814
Unix@sol# cfgadm -c configure c4::50080e8008cfb814

Let’s see how we can re-scan the SAN/FC luns on solaris 10/11 hosts.
To scan new FC luns, Just execute the below commands
table.tableizer-table { border: 1px solid #CCC; font-family: Arial, Helvetica, sans-serif font-size: 12px; } .tableizer-table td { padding: 4px; margin: 3px; border: 1px solid #ccc; } .tableizer-table th { background-color: #104E8B; color: #FFF; font-weight: bold; }


Scanning FC/SAN LUNS
1cfgadm -al                      To scan FC luns
2devfsadm -c disk                 To make sure all the device files are created
3tail /var/adm/messages          To see the new LUN’s information
4echo |format                    To get the new LUN’s information
5ls -lrt /dev/rdsk |grep s2|tailTo get the new LUN’s information
“luxadm probe” also used to scan FC luns but i am happy to use cfgadm.

If you still not able to see the new LUNS/DISK ,then you can try to reset the HBA as last option but its very dangerous.Sometimes system loose SAN paths to that specific HBA. 

1.List the connected HBA.

root@Unixarena-SOL11:~# luxadm -e port |grep CONNECTED
/devices/pci@1d,700000/SUNW,qlc@1,1/fp@0,0:devctl CONNECTED
/devices/pci@1d,700000/SUNW,qlc@3/fp@0,0:devctl CONNECTED

2.Reset the HBA using forcelip option.

root@Unixarena-SOL11:~# luxadm -e forcelip /devices/pci@1d,700000/SUNW,qlc@1,1/fp@0,0:devctl 
Forcelip can be issued to the controller names as well.
Unix@sol# cfgadm -al -o show_FCP_dev |grep fc-fabric
c2                             fc-fabric    connected    configured   unknown
c4                             fc-fabric    connected    configured   unknown
Unix@sol#
Unix@sol# luxadm -e forcelip /dev/cfg/c2


3.Verify the controller status using “cfgadm -al”.Make sure disks didn;t loose any SAN paths after the HBA reset. If everything seems to be okay ,then isssue the forcelip to the another controller.


If still you are not able to see the new FC/SAN LUNS ,then reboot the server and try.
Once you see the new lun, make sure that  multiple FC paths are enabled to that.
Minimum two FC paths required for SAN disks.
” luxadm display /dev/rdsk/c1txxxxxxd0s2″  – To verify the FC lun details and multipathing.

If you are using veritas volume manager,then you can verify the multipathing using vxdmp commands.

Hope this post is informative for you .Please leave a comment if you have any doubt. I will get back to you.

No comments:

Post a Comment