Multipath - dual path - fc

Step 1: Use the “ioscan” command to get some fiber card info

# ioscan -fnC fc
Class I H/W Path Driver S/W State H/W Type Description
================================================================
fc 2 0/3/1/0 fcd CLAIMED INTERFACE HP AB379-60101 4Gb Dual Port PCI/PCI-X Fibre Channel Adapter (FC Port 1)
/dev/fcd2
fc 3 0/3/1/1 fcd CLAIMED INTERFACE HP AB379-60101 4Gb Dual Port PCI/PCI-X Fibre Channel Adapter (FC Port 2)
/dev/fcd3
#

This gives us the two HBA devices and their hardware paths:
/dev/fcd2: 0/3/1/0
/dev/fcd3: 0/3/1/1

Step 2: Use the “fcmsutil” command to get some WWN info

# fcmsutil /dev/fcd2
Vendor ID is = 0x1077
Device ID is = 0x2422
PCI Sub-system Vendor ID is = 0x103C
PCI Sub-system ID is = 0x12D7
PCI Mode = PCI-X 133 MHz
ISP Code version = 4.4.4
ISP Chip version = 3
Topology = PTTOPT_FABRIC
Link Speed = 4Gb
Local N_Port_id is = 0x010500
Previous N_Port_id is = None
N_Port Node World Wide Name = 0x50060b000069b1d9
N_Port Port World Wide Name = 0x50060b000069b1d8
Switch Port World Wide Name = 0x200500051e05b304
Switch Node World Wide Name = 0x100000051e05b304
N_Port Symbolic Port Name = odevux34_fcd2
N_Port Symbolic Node Name = odevux34_HP-UX_B.11.31
Driver state = ONLINE
Hardware Path is = 0/3/1/0
Maximum Frame Size = 2048
Driver-Firmware Dump Available = NO
Driver-Firmware Dump Timestamp = N/A
Driver Version = @(#) fcd B.11.31.0909 Jun 8 2009
# fcmsutil /dev/fcd3
Vendor ID is = 0x1077
Device ID is = 0x2422
PCI Sub-system Vendor ID is = 0x103C
PCI Sub-system ID is = 0x12D7
PCI Mode = PCI-X 133 MHz
ISP Code version = 4.4.4
ISP Chip version = 3
Topology = PTTOPT_FABRIC
Link Speed = 4Gb
Local N_Port_id is = 0x010500
Previous N_Port_id is = None
N_Port Node World Wide Name = 0x50060b000069b1db
N_Port Port World Wide Name = 0x50060b000069b1da
Switch Port World Wide Name = 0x200500051e05940a
Switch Node World Wide Name = 0x100000051e05940a
N_Port Symbolic Port Name = odevux34_fcd3
N_Port Symbolic Node Name = odevux34_HP-UX_B.11.31
Driver state = ONLINE
Hardware Path is = 0/3/1/1
Maximum Frame Size = 2048
Driver-Firmware Dump Available = NO
Driver-Firmware Dump Timestamp = N/A
Driver Version = @(#) fcd B.11.31.0909 Jun 8 2009
#
We can see the WWN’s that will appear on the switches (and also in the host group on the storage manager) as well as the status (“ONLINE”) and the hardware path.

Step 3: Use “ioscan” to find the external storage disks in question

# ioscan -f -n -C disk
Class I H/W Path Driver S/W State H/W Type Description
=======================================================================
disk 2 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-C
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk 0 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 73.4GST373455LC
/dev/dsk/c2t0d0 /dev/rdsk/c2t0d0
disk 1 0/1/1/1.2.0 sdisk CLAIMED DEVICE HP 73.4GST373455LC
/dev/dsk/c3t2d0 /dev/rdsk/c3t2d0
disk 6 0/3/1/0.1.7.0.0.0.0 sdisk CLAIMED DEVICE IBM 1722-600
/dev/dsk/c9t0d0 /dev/rdsk/c9t0d0

disk 47 0/3/1/0.1.7.0.0.3.7 sdisk CLAIMED DEVICE IBM Universal Xport
/dev/dsk/c9t3d7 /dev/rdsk/c9t3d7
disk 30 0/3/1/1.1.7.0.0.0.0 sdisk CLAIMED DEVICE IBM 1722-600
/dev/dsk/c8t0d0 /dev/rdsk/c8t0d0

disk 48 0/3/1/1.1.7.0.0.3.7 sdisk CLAIMED DEVICE IBM Universal Xport
/dev/dsk/c8t3d7 /dev/rdsk/c8t3d7
#

Above you can see there are two IBM paths. This represents two single direct paths to the same storage.
/dev/dsk/c9t0d0 with hardware path 0/3/1/0.1.7.0.0.0.0
/dev/dsk/c8t0d0 with hardware path 0/3/1/1.1.7.0.0.0.0
And if you remember from the above “ioscan -fNc fc” output
/dev/fcd2 (device driver) = 0/3/1/0 (physical hardware path)
/dev/fcd3 (device driver) = 0/3/1/1 (physical hardware path)
Which means:
/dev/dsk/c9t0d0 is talking on the fiber port designated as /dev/fcd2
/dev/dsk/c8t0d0 is talking on the fiber port designated as /dev/fcd3
This gives us some good possible debugging info, especially if we later have access to the switch and can see error logs on the switch, since on the switch and in the external storage manager GUI:
/dev/fcd2 will have the port name 0x50060b000069b1d8
/dev/fcd3 will have the port name 0x50060b000069b1da
Next command:
# ioscan -f -n -N -C disk
Class I H/W Path Driver S/W State H/W Type Description
===================================================================
disk 3 64000/0xfa00/0x0 esdisk CLAIMED DEVICE HP 73.4GST373455LC
/dev/disk/disk3 /dev/rdisk/disk3
disk 4 64000/0xfa00/0x1 esdisk CLAIMED DEVICE HP 73.4GST373455LC
/dev/disk/disk4 /dev/rdisk/disk4
disk 5 64000/0xfa00/0x2 esdisk CLAIMED DEVICE TEAC DV-28E-C
/dev/disk/disk5 /dev/rdisk/disk5
disk 46 64000/0xfa00/0xe esdisk CLAIMED DEVICE IBM 1722-600
/dev/disk/disk46 /dev/rdisk/disk46

disk 50 64000/0xfa00/0xf esdisk CLAIMED DEVICE IBM Universal Xport
/dev/disk/disk50 /dev/rdisk/disk50
disk 51 64000/0xfa00/0x10 esdisk CLAIMED DEVICE IBM Universal Xport
/dev/disk/disk51 /dev/rdisk/disk51
#

Here you can see /dev/disk/disk46 is the multipath disk with hardware path 64000/0xfa00/0xe.
Meaning when you refer to the disk through the device /dev/disk/disk46, that device will write to the disk using one of the two direct paths of /dev/dsk/c9t0d0 and /dev/dsk/c8t0d0 depending on the settings for load balancing, preferred path, etc.
So far: mostly what we have done is determined that yes there is a multipath, and yes it seems to be working.

Step 4: Use the “scsimgr” command to get load balancing

So let’s check out that multipath
Using the hardware path for the multipath disk, let’s see what the load balancing policy is.
# scsimgr get_attr -H 64000/0xfa00/0xe -a load_bal_policy
SCSI ATTRIBUTES FOR LUN : 64000/0xfa00/0xe
name = load_bal_policy
current = round_robin
default = round_robin
saved =
#

AY! THERE’S THE RUB!

And there we are. The HP system is using a round-robin load balancing policy so it will keep switching the path used, which is why our storage manager is going crazy.

Step 5: Use the “scsimgr” command to set the load balancing to “preferred path”

# scsimgr save_attr -H 64000/0xfa00/0xe -a load_bal_policy="preferred_path"
And let’s make sure it took:
# scsimgr get_attr -H 64000/0xfa00/0xe -a load_bal_policy
SCSI ATTRIBUTES FOR LUN : 64000/0xfa00/0xe
name = load_bal_policy
current = preferred_path
default = round_robin
saved = preferred_path
#

Step 6: Telling HP-UX Which Path To Use As The Preferred Path

And now we have to tell the HP-UX system WHICH path to use as the preferred path.
Unfortunately, this will be a 50/50 guess. Because I do not have access to the switch. I can see on the Storage Manager GUI it wants the preferred path to be on Controller B. However, on the storage manager GUI you only define host groups which means you throw in Storage Controller A and Storage Controller B into the same host group as the two fiber ports on the HP-UX server.
If I had access to the switch, I might have an easier time seeing which one of the two HP-UX fiber ports is talking to Controller B.
Since I can’t see that, the only thing to do is set the path to one, see if the Storage Manager complains, and if there are no complaints, we guessed right! If it complains, than we set it to the other path.
First, we can verify that no preferred path is set:
# scsimgr get_attr -D /dev/rdisk/disk46 -a preferred_path
SCSI ATTRIBUTES FOR LUN : /dev/rdisk/disk46
name = preferred_path
current =
default =
saved =
#
And let’s take a quick look at the hardware paths again
# scsimgr lun_map -D /dev/rdisk/disk46
LUN PATH INFORMATION FOR LUN : /dev/rdisk/disk46
Total number of LUN paths = 2
World Wide Identifier(WWID) = 0x600a0b8000225d7d00005b3150fd79bf
LUN path : lunpath36
Class = lunpath
Instance = 36
Hardware path = 0/3/1/0.0x200700a0b81984d6.0x4000000000000000
SCSI transport protocol = fibre_channel
State = ACTIVE
Last Open or Close state = ACTIVE
LUN path : lunpath35
Class = lunpath
Instance = 35
Hardware path = 0/3/1/1.0x200600a0b81984d5.0x4000000000000000
SCSI transport protocol = fibre_channel
State = ACTIVE
Last Open or Close state = ACTIVE
#
And now we pick one. And set it
# scsimgr save_attr -D /dev/rdisk/disk46 -a preferred_path=0/3/1/0.0x200700a0b81984d6.0x4000000000000000
Value of attribute preferred_path saved successfully
#

And now check it
# scsimgr get_attr -D /dev/rdisk/disk46 -a preferred_path
SCSI ATTRIBUTES FOR LUN : /dev/rdisk/disk46
name = preferred_path
current = 0/3/1/0.0x200700a0b81984d6.0x4000000000000000(lunpath36)
default =
saved = 0/3/1/0.0x200700a0b81984d6.0x4000000000000000(lunpath36)
#
If it complains, then try the other hardware path. If it doesn’t, then you’re good
SHARE

sangeethakumar

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment