Powered By Blogger

Tuesday, January 18, 2011

Verify Solaris 10 Multipathing/Configure SAN Disk

I was attempting to troubleshoot issues as a user was complaining about slow performance on a SAN disk. First thing that I did was check to ensure that there were not any performance issues on any disks that might have been causing this users issues


A quick iostat verified that everything was looking fine
iostat -cxzn 1


This box is running Veritas so lets check out the disks. Vxdisk list shows one Sun6140 disk.

# vxdisk list
DEVICE TYPE DISK GROUP STATUS
Disk_0 auto:none - - online invalid
Disk_1 auto:none - - online invalid
SUN6140_0_1 auto:cdsdisk diskname_dg02 diskname_dg online nohotuse

Luxadm is an utility, which discovers FC devices (luxadm probe), shut downs devives (luxadm shutown_device ...) runs a firmware upgrade (luxadm download_firmware ...) and many other things. In this instance I use luxadm to get the true device name for my disk

# luxadm probe
No Network Array enclosures found in /dev/es

Found Fibre Channel device(s):
Node WWN:200600a0b829a7a0 Device Type:Disk device
Logical Path:/dev/rdsk/c4t600A0B800029A7A000000DC747A8168Ad0s2

I then run a luxadm on the device. Below you can see that I do indeed have two paths to the device.
1 controller = one path, 2 controllers = 2 paths

# luxadm display /dev/rdsk/c4t600A0B800029A7A000000DC747A8168Ad0s2
DEVICE PROPERTIES for disk: /dev/rdsk/c4t600A0B800029A7A000000DC747A8168Ad0s2
Vendor: SUN
Product ID: CSM200_R
Revision: 0619
Serial Num: SG71009283
Unformatted capacity: 12288.000 MBytes
Write Cache: Enabled
Read Cache: Enabled
Minimum prefetch: 0x1
Maximum prefetch: 0x1
Device Type: Disk device
Path(s):

/dev/rdsk/c4t600A0B800029A7A000000DC747A8168Ad0s2
/devices/scsi_vhci/ssd@g600a0b800029a7a000000dc747a8168a:c,raw
Controller /devices/pci@1f,4000/SUNW,qlc@5,1/fp@0,0
Device Address 203700a0b829a7a0,1
Host controller port WWN 210100e08bb370ab
Class secondary
State STANDBY
Controller /devices/pci@1f,4000/SUNW,qlc@5/fp@0,0
Device Address 203600a0b829a7a0,1
Host controller port WWN 210000e08b9370ab
Class primary
State ONLINE

Had I only had one path I would have run cfgadm. I would have seen that one of the fc-fabric devices would have been unconfigured. I then could have used cfgadm to configure it and enable my mulitpathing

# cfgadm
Ap_Id Type Receptacle Occupant Condition
c0 scsi-bus connected configured unknown
c1 scsi-bus connected unconfigured unknown
c2 fc-fabric connected configured unknown
c3 fc-fabric connected configured unknown



MPXIO Primer
Solaris I/O multipathing gives you the ability to set up multiple redundant paths to a storage system and gives you the benefits of load balancing and failover.

Need to enable MPXIO

Solaris 10 is the easier, because the mpxio capability is built-in. You just need to turn it on!

To enable it, edit the file /kernel/drv/fp.conf file. At the end it should say:

mpxio-disable="yes";Just change yes to no and it will be enabled:

mpxio-disable="no";Before multipathing, you should see two copies of each disk in format. Afterwards, you'll just see the one copy.

It assigns the next available controller ID, and makes up some horrendously long target number. For example:

Filesystem kbytes used avail capacity Mounted on /dev/dsk/c6t600C0FF000000000086AB238B2AF0600d0s5 697942398 20825341 670137634 4% /test

Finding WWN of HBA cards in Solaris 8, 9 and 10

bash-2.03# luxadm probe
No Network Array enclosures found in /dev/es

Found Fibre Channel device(s):
Node WWN:50070e800475e108 Device Type:Disk device
Logical Path:/dev/rdsk/c5t50060E800475D109d0s2
Node WWN:50070e800475e108 Device Type:Disk device
Logical Path:/dev/rdsk/c5t50060E800475D109d1s2
Node WWN:50070e800475e108 Device Type:Disk device
Logical Path:/dev/rdsk/c5t50060E800475D109d2s2
Node WWN:50070e800475e108 Device Type:Disk device
Logical Path:/dev/rdsk/c5t50060E800475D109d3s2
Node WWN:50070e800475e108 Device Type:Disk device
Logical Path:/dev/rdsk/c5t50060E800475D109d4s2
Node WWN:50070e800475e108 Device Type:Disk device
Logical Path:/dev/rdsk/c5t50060E800475D109d5s2
Node WWN:50070e800475e108 Device Type:Disk device
Logical Path:/dev/rdsk/c5t50060E800475D109d6s2
Node WWN:50070e800475e108 Device Type:Disk device
Logical Path:/dev/rdsk/c5t50060E800475D109d7s2

HBA card WWN

# prtconf -vp | grep wwn
port-wwn: 2100001b.3202f94b
node-wwn: 2000001b.3202f94b
port-wwn: 210000e0.8b90e795
node-wwn: 200000e0.8b90e795

#prtconf -vp | more

Node 0xf00e2f80
assigned-addresses: 81000810.00000000.00000300.00000000.00000100.82000814.00000000.00100000.00000000.00002000.82000830.00000000.00140000.00000000.00040000
version: ‘QLA2460 Host Adapter Driver(SPARC): 1.11 10/03/05′
manufacturer: ‘QLGC’
model: ‘QLA2460 ‘
name: ‘SUNW,qlc’
port-wwn: 2100001b.3202f94b
node-wwn: 2000001b.3202f94b
reg: 00000800.00000000.00000000.00000000.00000000.01000810.00000000.00000000.00000000.00000100.02000814.00000000.00000000.00000000.00001000
compatible: ‘pci1077,140.1077.140.2′ + ‘pci1077,140.1077.140′ + ‘pci1077,140′ + ‘pci1077,2422.2′ + ‘pci1077,2422′ + ‘pciclass,c0400′ + ‘pciclass,0400′
short-version: ’1.11 10/03/05′
#size-cells: 00000000
#address-cells: 00000002
device_type: ‘scsi-fcp’
fcode-rom-offset: 0000aa00
66mhz-capable:
fast-back-to-back:
devsel-speed: 00000001
latency-timer: 00000040
cache-line-size: 00000010
max-latency: 00000000
min-grant: 00000040
interrupts: 00000001
class-code: 000c0400
subsystem-id: 00000140
subsystem-vendor-id: 00001077
revision-id: 00000002
device-id: 00002422
vendor-id: 00001077

Node 0xf00ee398
#size-cells: 00000000
#address-cells: 00000004
reg: 00000000.00000000
device_type: ‘fp’
name: ‘fp’

Node 0xf00eeaa0
device_type: ‘block’
compatible: ‘ssd’
name: ‘disk’

Node 0xf00ef91c
assigned-addresses: 81001010.00000000.00000400.00000000.00000100.82001014.00000000.
version: ‘QLA2460 Host Adapter Driver(SPARC): 1.11 10/03/05′
manufacturer: ‘QLGC’
model: ‘QLA2460 ‘
name: ‘SUNW,qlc’
port-wwn: 210000e0.8b90e795
node-wwn: 200000e0.8b90e795
reg: 00001000.00000000.00000000.00000000.00000000.01001010.00000000.
compatible: ‘pci1077,140.1077.140.2′ + ‘pci1077,140.1077.140′ + ‘pci1077,140′ + ‘pci1077,2422.2′ + ‘pci1077,2422′ + ‘pciclass,c0400′ + ‘pciclass,0400′
short-version: ’1.11 10/03/05′
#size-cells: 00000000
#address-cells: 00000002
device_type: ‘scsi-fcp’
fcode-rom-offset: 0000aa00
66mhz-capable:
fast-back-to-back:
devsel-speed: 00000001
latency-timer: 00000040
cache-line-size: 00000010
max-latency: 00000000
min-grant: 00000040
interrupts: 00000001
class-code: 000c0400
subsystem-id: 00000140
subsystem-vendor-id: 00001077
revision-id: 00000002
device-id: 00002422
vendor-id: 00001077

Node 0xf00fad34
#size-cells: 00000000
#address-cells: 00000004
reg: 00000000.00000000
device_type: ‘fp’
name: ‘fp’

Node 0xf00fb43c
device_type: ‘block’
compatible: ‘ssd’
name: ‘disk’

For Solaris 8 and 9:
Run the following script to determine the WWNs of the HBAs that are currently being utilized:
#!/bin/sh for i in `cfgadm |grep fc-fabric|awk ‘{print $1}’`;

do

dev=”`cfgadm -lv $i|grep devices |awk ‘{print $NF}’`” wwn= \

“`luxadm -e dump_map $dev |grep ‘Host Bus’|awk ‘{print $4}’`”

echo “$i: $wwn” done

To show link status of card

bash-2.03# luxadm -e port

Found path to 2 HBA ports

/devices/ssm@0,0/pci@18,700000/SUNW,qlc@2/fp@0,0:devctl CONNECTED
/devices/ssm@0,0/pci@19,700000/SUNW,qlc@2/fp@0,0:devctl CONNECTED

To see the WWN’s (using address given to you from previous commands),

it is the last one that specifies it is a HBA, so the port WWN here is 50070e800475e108

bash-2.03# luxadm -e dump_map /devices/ssm@0,0/pci@18,700000/SUNW,qlc@2/fp@0,0:devctl
Pos Port_ID Hard_Addr Port WWN Node WWN Type
0 642113 0 50070e800475e108 50070e800475e108 0×0 (Disk device)
1 643f13 0 550070e800475e108 50070e800475e108 0×0 (Disk device)
2 643913 0 2100001b3205e828 2000001b3205e828 0x1f (Unknown Type,Host Bus Adapter)

SAN Foundation Software versions display as such

bash-2.03# modinfo | grep SunFC
38 102bcd25 209b8 150 1 fcp (SunFC FCP v20070703-1.98)
39 102d4071 855c - 1 fctl (SunFC Transport v20070703-1.41)
42 102ead69 164e0 149 1 fp (SunFC Port v20070703-1.60)
44 10300a79 cd574 153 1 qlc (SunFC Qlogic FCA v20070212-2.19)

To show Sun/Qlogic HBA’s

bash-2.03# luxadm qlgc

Found Path to 2 FC100/P, ISP2200, ISP23xx Devices

Opening Device: /devices/ssm@0,0/pci@18,700000/SUNW,qlc@2/fp@0,0:devctl
Detected FCode Version: ISP2312 Host Adapter fcode version 1.16 11/15/06

Opening Device: /devices/ssm@0,0/pci@19,700000/SUNW,qlc@2/fp@0,0:devctl
Detected FCode Version: ISP2312 Host Adapter fcode version 1.16 11/15/06
Complete

To show all vendor HBA’s

bash-2.03# luxadm fcode_download -p

Found Path to 0 FC/S Cards
Complete

Found Path to 0 FC100/S Cards
Complete

Found Path to 2 FC100/P, ISP2200, ISP23xx Devices

Opening Device: /devices/ssm@0,0/pci@18,700000/SUNW,qlc@2/fp@0,0:devctl
Detected FCode Version: ISP2312 Host Adapter fcode version 1.16 11/15/06

Opening Device: /devices/ssm@0,0/pci@19,700000/SUNW,qlc@2/fp@0,0:devctl
Detected FCode Version: ISP2312 Host Adapter fcode version 1.16 11/15/06
Complete

Found Path to 0 JNI1560 Devices.
Complete

Found Path to 0 Emulex Devices.
Complete