Mpathadm Solaris 10

Posted on by
  1. Solaris 10 Mpathadm Disable Path
  2. Mpathadm Enable Path Solaris 10
Solaris 10 i386
Sun Microsystems Sun Fire X4100 M2

The Sun Solaris OS multipathing support can be determined and configured by using mpathadm commands. Starting with Solaris 10 Update 3, the mpathadm command enables multipathing administration through the ANSI standard Multipath Management API. Migration to an Oracle Solaris Zone on an Oracle Solaris 10 Host. Migration to an Oracle Solaris Zone on an Oracle Solaris 11 Host. The utility has the following capabilities: Analysis of the Oracle Solaris configuration, including networking, storage, and Oracle Solaris Operating system features in use. Analysis of application binaries.


QLE2462Mpathadm Solaris 10
Which library support mpath
# mpathadm list mpath-support
mpath-support: libmpscsi_vhci.so
mpathadm list initiator-port (also you can get these wwn via fcinfo hba-port)
Initiator Port: iqn.1986-03.com.sun:01:ba98a3efffff.47286525,4000002a00ff
Initiator Port: 2100001b32025dc6
Initiator Port: 2101001b32225dc6
Initiator Port: 2101001b32224f93
Initiator Port: 2100001b32024f93
# mpathadm list lu
/dev/rdsk/c8t60060E800429D200000029D20000003Fd0s2
Total Path Count: 2
Operational Path Count: 2
/dev/rdsk/c8t60060E800429D200000029D200000800d0s2
Total Path Count: 2
Operational Path Count: 2
Check if your SAN is supported.
# mpathadm show mpath-support libmpscsi_vhci.so
Vendor: HITACHI
Product: OPEN
Revision:
Supported Load Balance Types:
round-robin
# mpathadm show initiator-port 2101001b32224f93
Initiator Port: 2101001b32224f93
Transport Type: Fibre Channel
OS Device File: /devices/[email protected],0/pci10de,[email protected]/pci1077,[email protected],1/[email protected],0
Get information about disk
# mpathadm show lu /dev/rdsk/c8t60060E800429D200000029D20000003Fd0s2
Logical Unit: /dev/rdsk/c8t60060E800429D200000029D20000003Fd0s2
mpath-support: libmpscsi_vhci.so
Vendor: HITACHI
Product: OPEN-V -SUN
Revision: 5007
Name Type: unknown type
Name: 60060e800429d200000029d20000003f
Asymmetric: no
Current Load Balance: none
Logical Unit Group ID: NA
Auto Failback: off
Auto Probing: NA
Paths:
Initiator Port Name: 2101001b32224f93
Target Port Name: 50060e800429d274
Override Path: NA
Path State: OK
Disabled: no
Initiator Port Name: 2100001b32024f93
Target Port Name: 50060e800429d264
Override Path: NA
Path State: OK
Disabled: no
Target Ports:
Name: 50060e800429d274
Relative ID: 0
Name: 50060e800429d264
Relative ID: 0
# This is another way to see disk information.
luxadm disp /dev/rdsk/c8t60060E800429D200000029D20000003Fd0s2
DEVICE PROPERTIES for disk: /dev/rdsk/c8t60060E800429D200000029D20000003Fd0s2
Vendor: HITACHI
Product ID: OPEN-V -SUN
Revision: 5007
Serial Num: 50 029D2003F
Unformatted capacity: 46088.000 MBytes
Write Cache: Enabled
Read Cache: Enabled
Minimum prefetch: 0x0

Solaris 10 Mpathadm Disable Path


Maximum prefetch: 0x0
Device Type: Disk device
Path(s):
/dev/rdsk/c8t60060E800429D200000029D20000003Fd0s2
/devices/scsi_vhci/[email protected]:c,raw
Controller /dev/cfg/c4
Device Address 50060e800429d264,2
Host controller port WWN 2100001b32024f93
Class primary
State ONLINE
Controller /dev/cfg/c5
Device Address 50060e800429d274,2
Host controller port WWN 2101001b32224f93
Class primary
State ONLINE
# You can get hba info
fcinfo hba-port
HBA Port WWN: 2100001b32025dc6
OS Device Name: /dev/cfg/c6
Manufacturer: QLogic Corp.
Model: QLE2462
Firmware Version: 4.0.27
FCode/BIOS Version: N/A
Type: unknown
Mpathadm solaris 10 iso State: offline
Supported Speeds: 1Gb 2Gb 4Gb
Current Speed: not established
Node WWN: 2000001b32025dc6
HBA Port WWN: 2101001b32225dc6
OS Device Name: /dev/cfg/c7
Manufacturer: QLogic Corp.
Model: QLE2462
Firmware Version: 4.0.27
FCode/BIOS Version: N/A
Type: unknown
State: offline
Supported Speeds: 1Gb 2Gb 4Gb
Current Speed: not established
Node WWN: 2001001b32225dc6
HBA Port WWN: 2100001b32024f93
OS Device Name: /dev/cfg/c4
Manufacturer: QLogic Corp.
Model: QLE2462
Firmware Version: 4.0.27
FCode/BIOS Version: N/A
Type: N-port
State: online
Supported Speeds: 1Gb 2Gb 4Gb
Current Speed: 2Gb
Node WWN: 2000001b32024f93
HBA Port WWN: 2101001b32224f93
OS Device Name: /dev/cfg/c5
Manufacturer: QLogic Corp.
Model: QLE2462
Firmware Version: 4.0.27
FCode/BIOS Version: N/A
Type: N-port
State: online

Mpathadm Enable Path Solaris 10


Supported Speeds: 1Gb 2Gb 4Gb
Current Speed: 2Gb
Node WWN: 2001001b32224f93
# Get remote information over hba
fcinfo remote-port -l -s -p 2101001b32224f93
Remote Port WWN: 50060e800429d274
Active FC4 Types: SCSI
SCSI Target: yes
Node WWN: 50060e800429d274
Link Error Statistics:
Link Failure Count: 0
Loss of Sync Count: 0
Loss of Signal Count: 0
Primitive Seq Protocol Error Count: 0
Invalid Tx Word Count: 0
Invalid CRC Count: 0
LUN: 1
Vendor: HITACHI
Product: OPEN-V*5 -SUN
OS Device Name: /dev/rdsk/c8t60060E800429D200000029D200000800d0s2
LUN: 2Mpathadm Solaris 10
Vendor: HITACHI
Product: OPEN-V -SUN
OS Device Name: /dev/rdsk/c8t60060E800429D200000029D20000003Fd0s2

Solaris 10 11/06 was released in late 2006 with a plethora of new features, and among them a new tool called mpathadm, which comes as part of the SUNWmpathadm package.

Before I delve into how this specific tool works and how it helps when managing multipathed storage in Solaris, I’ll give some background on what multipathing is and how it is implemented in Solaris.
What is multipathing?

Multipathing is a generic term relating to a certain SAN configuration where a host on that SAN (ie; a server) has multiple physical paths to a target (ie; a disk array) on said SAN. A common multipath configuration consists of a server with multiple fibre channel ports, and each port is connected to a separate fibre channel switch in the SAN. Optionally, the target device or disk array may also have multiple physical links in the same manner. In the end, though, the host “sees” multiple instances of the same target – once through each connection to the SAN. It’s up to the host to then manage this. The end result is higher reliability. If a switch were to go down or the optical cable between the host and a switch were damaged, the host’s connectivity to its SAN disks would not be interrupted. IO traffic is also multiplexed over the multiple links, thus providing fail-over and higher throughput.

How multipathing works in Solaris

Multipathing has existed in Solaris since Solaris 8 via an add-on product called Sun SAN Foundation Kit. With the release of Solaris 10, all functionality of the SAN Foundation Kit was integrated into the OS and no longer requires an add-on to function.

When multipathing is enabled, the scsi_vhci driver looks for multiple instances of the same target (eg; a LUN) and upon finding one, creates a “meta” disk device which it manages. IO to and from this device are then multiplexed over however many paths scsi_vhci sees to the LUN.

Below is an example of a host which has two fibre channel controllers (c4 and c5) connected to the sam SAN, and both see the same target LUNs, of which there are four:

2
4
[root@ackpthh]/>ls-l/dev/rdsk/c6t600039300001546301000000D52ACC7Ed0*
lrwxrwxrwx1root root69Jul62006/dev/rdsk/c6t600039300001546301000000D52ACC7Ed0->../../devices/scsi_vhci/disk@g600039300001546301000000d52acc7e:wd,raw
lrwxrwxrwx1root root68Jul62006/dev/rdsk/c6t600039300001546301000000D52ACC7Ed0s0->../../devices/scsi_vhci/disk@g600039300001546301000000d52acc7e:a,raw
lrwxrwxrwx1root root68Jul62006/dev/rdsk/c6t600039300001546301000000D52ACC7Ed0s1->../../devices/scsi_vhci/disk@g600039300001546301000000d52acc7e:b,raw

You might notice the new controller, c6. This is a “virtual” controller implemented by scsi_vhci since making such virtual disk devices under a real physical controller would be a broken idea since, technically, there is no such physical device. Remember, this is a meta device.

A note about those big, long multipath device names: there’s actually a format to them, so don’t let their length turn you off. The format is as follows, using the above device as an example:

Kujdes gazeten Shekulli, po manipulon lexuesit ne heshtje! (lexime: 14078) Forumi horizont ne Facebook. (lexime: 6534) Foto sipas aparatit tim. Www fajtori com shtypi. Shtypi Shqiptar: Shtypi Shqiptar: Evropa: Amerikat: Azia & Oqeania: Afrika & Lindja e Mesme. Kemi 69 vizitor(e) dhe 0 anetar(e) ne faqe ne kete moment. Ju jeni vizitor anonim. Mund te rregjistroheni ne cast falas duke klikuar ketu.

We can now use the multipath device as we would any other kind of disk device, with format for example:

c6t600039300001546301000000D52ACC7Ed0s1
scsi_vhci controllerTarget comprised of real target’s WWN
, LUN number, and SCSI volume UID
(Page 83 data)
LUN number and then
slice number