C H A P T E R  3

Administering Multipathing Devices Through mpathadm Commands

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. The terms used in this chapter to denote a path, initiator port, target port, and logical unit are consistent with the T10 specification. This chapter contains the following sections:


procedure icon  To Get a List of Multipathing Support That Can Be Administered by the mpathadm Command

The multipathing support is identified with the Multipath Management API plug-in library name.

single-step bulletRun the mpathadm list mpath-support command.


# mpathadm list mpath-support
mpath-support: libmpscsi_vhci.so

(Only one result is shown in the preceding example.)


procedure icon  To Get the Multipathing Support Properties

The multipathing support properties are associated with Multipath Management API plug-in properties.

1. Run the mpathadm list mpath-support command.


# mpathadm list mpath-support
mpath-support: libmpscsi_vhci.so

(Only one result is shown in the preceding example.)

2. Choose the mpath support name from the output list.

3. Run the mpathadm show mpath-support mpath-support-name command.


# mpathadm show mpath-support libmpscsi_vhci.so
mpath-support: libmpscsi_vhci.so
	 Vendor: Sun Microsystems
	 Driver Name:  scsi_vhci
	 Default Load Balance:  round-robin
	 Supported Load Balance Types:
	 	 round-robin
	 	 logical-block
	 Allows To Activate Target Port Group Access:  yes
	 Allows path Override:  no
	 Supported Auto Failback Config: yes
	 Auto Failback:  on
	 Failback Polling Rate (current/max):  0/0
	 Supported Auto Probing config: no
	 Auto Probing:  NA
	 probing Polling Rate (current/max):  NA/NA
	 Supported Devices:
	 	 Vendor:  SUN
	 	 Product:  T300
	 	 Revision:
	 	 Supported Load Balance Types:
	 	 	 round-robin
	 	 Vendor:  SUN
	 	 Product:  T4
	 	 Revision:
	 	 Supported Load Balance Types:
	 	 	 round-robin

The command output also shows a list of device products that is supported by the multipathing support software. The multipathing support libmpscsi_vhci.so supports T10 target port group compliant devices by default.


procedure icon  To Get a List of Initiator Ports Discovered on the System

An initiator port is part of a path that consists of an initiator port, target port, and a logicalunit.

single-step bulletRun the mpathadm list initiator-port command.


# mpathadm list initiator-port
Initiator-Port: iqn.1986-03.com.sun:01:080020b7ac2b.437a3b3e,4000002affff
Initiator-Port: 2000000173018713


procedure icon  To Get the Properties of a Particular Initiator Port

The properties of an initiator port can be displayed through the show command.

1. Run the mpathadm list initiator-port command.


# mpathadm list initiator-port
Initiator-Port: iqn.1986-03.com.sun:01:080020b7ac2b.437a3b3e,4000002affff
Initiator-Port: 2000000173018713

2. Select an initiator port to use from the output.

3. Run the mpathadm show initiator-port initiator-port-name command.


# mpathadm show initiator-port 2000000173018713
initiator-port: 2000000173018713
	Transport Type: Fibre Channel
	OS Device File: /devices/pci@1f,2000/SUNW,gle@4/fp@0,0


procedure icon  To Get a List of Logical Units Discovered on the System

The mpathadm list lu command displays the list of logical units attached to the initiator. This list displays the number of paths and the operational path count to each logical unit listed.

single-step bulletRun the mpathadm list lu command.


# mpathadm list lu
	/dev/rdsk/c4t60020F20000035AF4267CCCB0002CEE2d0s2
		Total Path Count: 2
		Operational Path Count: 2
	/dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
		Total Path Count: 2
		Operational Path Count: 2
	/dev/rdsk/c4t60003BA27D2120004204AC1A000F1D6Cd0s2
		Total Path Count: 2
		Operational Path Count: 2


procedure icon  To Get the Properties and Associated Path Information of a Particular Logical Unit by Name

The list of logical units, along with the properties for each logical unit, can be displayed through the mpathadm command. The list of logical units contains logical unit names that in turn can be used to display the properties of a particular logical unit.

1. Run the mpathadm list lu command.


# mpathadm list lu
	/dev/rdsk/c4t60020F20000035AF4267CCCB0002CEE2d0s2
		Total Path Count: 2
		Operational Path Count: 2
	/dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
		Total Path Count: 2
		Operational Path Count: 2
	/dev/rdsk/c4t60003BA27D2120004204AC1A000F1D6Cd0s2
		Total Path Count: 2
		Operational Path Count: 2

2. Select a logical unit name from the output.

3. Run the mpathadm show lu logical-unit-name command.


# mpathadm show lu /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
logical unit: /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
	mpath-support libmpscsi_vhci.so
	 Vendor:  SUN
	 Product:  T4
	 Revision:  0301
	 Name Type:  SCSI Inquiry VPD page 83 type 3
	Name:  60003ba27d2120004204ac2b000dab00
	 Asymmetric:  yes
	 Current Load Balance:  round-robin
	 Logical Unit Group ID:  NA
	 Auto Failback:  on
	 Auto Probing:  NA
 
	 Paths:
	 	 Initiator Port Name:  2000000173818713
	 	 Target Port Name:  20030003ba27d212
	 	 Override Path:  NA
	 	 Path State:  OK
	 	 Disabled:  no
 
		 Initiator Port Name:  2000000173018713
	 	 Target Port Name:  20030003ba27d095
	 	 Override path:  NA
	 	 Path State:  OK
	 	 Disabled:  no
 
	 Target Port Groups:
	 	 ID:  2
	 	 Explicit Failover:  yes
	 	 Access State:  standby
	 	 Target Ports:
	 	 	 Name:  20030003ba27d212
	 	 	 Relative ID:  0
	 
	 	 ID:  5
	 	 Explicit Failover:  yes
	 	 Access State:  active
	 	 Target Ports:
	 	 	 Name:  20030003ba27d095
	 	 Relative ID:  0


procedure icon  To List All Logical Units Associated With a Particular Target Port

A list of paths through a target port can be displayed through the show command of a logical unit. First, retrieve the list of target ports associated with a logical unit. Then use the target port to list all logical units associated with this target port.

1. Run the mpathadm list lu command.


# mpathadm list lu
	/dev/rdsk/c4t60020F20000035AF4267CCCB0002CEE2d0s2
		Total Path Count: 2
		Operational Path Count: 2
	/dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
		Total Path Count: 2
		Operational Path Count: 2
	/dev/rdsk/c4t60003BA27D2120004204AC1A000F1D6Cd0s2
		Total Path Count: 2
		Operational Path Count: 2

2. Select a logical unit name from the output.

3. Run the mpathadm show lu logical-unit-name command.


# mpathadm show lu /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
logical unit: /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
	mpath-support libmpscsi_vhci.so
	 Vendor:  SUN
	 Product:  T4
	 Revision:  0301
	 Name Type:  SCSI Inquiry VPD page 83 type 3
	Name:  60003ba27d2120004204ac2b000dab00
	 Asymmetric:  yes
	 Current Load Balance:  round-robin
	 Logical Unit Group ID:  NA
	 Auto Failback:  on
	 Auto Probing:  NA
 
	 Paths:
	 	 Initiator Port Name:  2000000173818713
	 	 Target Port Name:  20030003ba27d212
	 	 Override Path:  NA
	 	 Path State:  OK
	 	 Disabled:  no
 
		 Initiator Port Name:  2000000173018713
	 	 Target Port Name:  20030003ba27d095
	 	 Override path:  NA
	 	 Path State:  OK
	 	 Disabled:  no
 
	 Target Port Groups:
	 	 ID:  2
	 	 Explicit Failover:  yes
	 	 Access State:  standby
	 	 Target Ports:
	 	 	 Name:  20030003ba27d212
	 	 	 Relative ID:  0
	 
	 	 ID:  5
	 	 Explicit Failover:  yes
	 	 Access State:  active
	 	 Target Ports:
	 	 	 Name:  20030003ba27d095
	 	 Relative ID:  0

4. Select a target port from the output list.

5. Run the mpathadm list lu -t target-port-name command.


# mpathadm list lu -t 20030003ba27d212
	 /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
	 	 Total Path Count: 2
	 	 Operational Path Count: 2
	 /dev/rdsk/c4t60003BA27D2120004204AC1A000F1D6Cd0s2
	 	 Total Path Count: 2
	 	 Operational Path Count: 2


procedure icon  To List a Logical Unit With a Particular Name Derived From the Hardware Used by the System

1. Run the mpathadm list lu command.


# mpathadm list lu
	/dev/rdsk/c4t60020F20000035AF4267CCCB0002CEE2d0s2
		Total Path Count: 2
		Operational Path Count: 2
	/dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
		Total Path Count: 2
		Operational Path Count: 2
	/dev/rdsk/c4t60003BA27D2120004204AC1A000F1D6Cd0s2
		Total Path Count: 2
		Operational Path Count: 2

2. Select a logical unit name from the output.

3. Run the mpathadm show lu logical-unit-name command.


# mpathadm show lu /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
logical unit: /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
	mpath-support libmpscsi_vhci.so
	 Vendor:  SUN
	 Product:  T4
	 Revision:  0301
	 Name Type:  SCSI Inquiry VPD page 83 type 3
	Name:  60003ba27d2120004204ac2b000dab00
	 Asymmetric:  yes
	 Current Load Balance:  round-robin
	 Logical Unit Group ID:  NA
	 Auto Failback:  on
	 Auto Probing:  NA
 
	 Paths:
	 	 Initiator Port Name:  2000000173818713
	 	 Target Port Name:  20030003ba27d212
	 	 Override Path:  NA
	 	 Path State:  OK
	 	 Disabled:  no
 
		 Initiator Port Name:  2000000173018713
	 	 Target Port Name:  20030003ba27d095
	 	 Override path:  NA
	 	 Path State:  OK
	 	 Disabled:  no
 
	 Target Port Groups:
	 	 ID:  2
	 	 Explicit Failover:  yes
	 	 Access State:  standby
	 	 Target Ports:
	 	 	 Name:  20030003ba27d212
	 	 	 Relative ID:  0
	 
	 	 ID:  5
	 	 Explicit Failover:  yes
	 	 Access State:  active
	 	 Target Ports:
	 	 	 Name:  20030003ba27d095
	 	 Relative ID:  0

4. Select an inquiry-string-name from the output.

5. Run the mpathadm list LU -n inquiry-string-name command.


# mpathadm list LU -n 60003ba27d2120004204ac2b000dab00
mpath-support: libmpscsi_vhci.so
	 /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
	 	 Total Path Count: 2
	 	 Operational Path Count: 2


procedure icon  To Configure Auto-Failback for a Particular Multipathing Support

Symmetrical devices allow for automatic failback to a possible optimal path. If a failover occurs on the initial path, the standby path becomes the new online path. Usually the standby path is a suboptimal path. When Auto-Failback is enabled, the initial path comes back online, failover to the initial path automatically occurs.

1. Run the mpathadm list mpath-support command.


# mpathadm list mpath-support
mpath-support: libmpscsi_vhci.so

(Only one result is shown in the preceding example.)

2. Select an mpath support name from the output list.

3. Run the mpathadm modify mpath-support -a [on | off] mpath-support-name command.


# mpathadm modify mpath-support -a off libmpscsi_vhci.so

4. Run the mpathadm show mpath-support mpath-support-name command to check the change.


# mpathadm show mpath-support libmpscsi_vhci.so
mpath-support: libmpscsi_vhci.so
	 Vendor: Sun Microsystems
	 Driver Name:  scsi_vhci
	 Default Load Balance:  round-robin
	 Supported Load Balance Types:
	 	 round-robin
	 	 logical-block
	 Allows To Activate Target Port Group Access:  yes
	 Allows path Override:  no
	 Supported Auto Failback Config: yes
	 Auto Failback:  on
	 Failback Polling Rate (current/max):  0/0
	 Supported Auto Probing config: no
	 Auto Probing:  NA
	 probing Polling Rate (current/max):  NA/NA
	 Supported Devices:
	 	 Vendor:  SUN
	 	 Product:  T300
	 	 Revision:
	 	 Supported Load Balance Types:
	 	 	 round-robin
	 	 Vendor:  SUN
	 	 Product:  T4
	 	 Revision:
	 	 Supported Load Balance Types:
	 	 	 round-robin



Note - The Auto-Failback display initiated by the mpathadm modify command setting is effective while the system is running. However, to keep the changed setting persistent, you must update the /kernel/drv/scsi_vhci.conf file. Refer to Configuring Automatic Failback.




procedure icon  To Fail Over a Logical Unit

This operation is applicable only to devices that fall under the following two categories:

1. Run the mpathadm list lu command.


# mpathadm list lu
	/dev/rdsk/c4t60020F20000035AF4267CCCB0002CEE2d0s2
		Total Path Count: 2
		Operational Path Count: 2
	/dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
		Total Path Count: 2
		Operational Path Count: 2
	/dev/rdsk/c4t60003BA27D2120004204AC1A000F1D6Cd0s2
		Total Path Count: 2
		Operational Path Count: 2

2. Select a logical unit name from the output.

3. Run the mpathadm show lu logical-unit-name command.


# mpathadm show lu /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
logical unit: /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
	mpath-support libmpscsi_vhci.so
	 Vendor:  SUN
	 Product:  T4
	 Revision:  0301
	 Name Type:  SCSI Inquiry VPD page 83 type 3
	Name:  60003ba27d2120004204ac2b000dab00
	 Asymmetric:  yes
	 Current Load Balance:  round-robin
	 Logical Unit Group ID:  NA
	 Auto Failback:  on
	 Auto Probing:  NA
 
	 Paths:
	 	 Initiator Port Name:  2000000173818713
	 	 Target Port Name:  20030003ba27d212
	 	 Override Path:  NA
	 	 Path State:  OK
	 	 Disabled:  no
 
		 Initiator Port Name:  2000000173018713
	 	 Target Port Name:  20030003ba27d095
	 	 Override path:  NA
	 	 Path State:  OK
	 	 Disabled:  no
 
	 Target Port Groups:
	 	 ID:  2
	 	 Explicit Failover:  yes
	 	 Access State:  standby
	 	 Target Ports:
	 	 	 Name:  20030003ba27d212
	 	 	 Relative ID:  0
	 
	 	 ID:  5
	 	 Explicit Failover:  yes
	 	 Access State:  active
	 	 Target Ports:
	 	 	 Name:  20030003ba27d095
	 	 Relative ID:  0

4. Run the mpathadm failover LU logical-unit-name command.


# mpathadm failover LU /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2

If this operation is successful, the access state of the devices' target port groups changes. This is a result of the logical unit failover.

5. Run the mpathadm show lu logical-unit-name command to verify the access state change.


# mpathadm show lu /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
logical unit: /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
	mpath-support libmpscsi_vhci.so
	 Vendor:  SUN
	 Product:  T4
	 Revision:  0301
	 Name Type:  SCSI Inquiry VPD page 83 type 3
	Name:  60003ba27d2120004204ac2b000dab00
	 Asymmetric:  yes
	 Current Load Balance:  round-robin
	 Logical Unit Group ID:  NA
	 Auto Failback:  on
	 Auto Probing:  NA
 
	 Paths:
	 	 Initiator Port Name:  2000000173818713
	 	 Target Port Name:  20030003ba27d212
	 	 Override Path:  NA
	 	 Path State:  OK
	 	 Disabled:  no
 
		 Initiator Port Name:  2000000173018713
	 	 Target Port Name:  20030003ba27d095
	 	 Override path:  NA
	 	 Path State:  OK
	 	 Disabled:  no
 
	 Target Port Groups:
	 	 ID:  2
	 	 Explicit Failover:  yes
	 	 Access State: active
	 	 Target Ports:
	 	 	 Name:  20030003ba27d212
	 	 	 Relative ID:  0
	 
	 	 ID:  5
	 	 Explicit Failover:  yes
	 	 Access State: standby
	 	 Target Ports:
	 	 	 Name:  20030003ba27d095
	 	 Relative ID:  0


procedure icon  To Enable a Path

If the path to a logical unit is disabled, the enable command changes the path back to enabled. The full path must be specified using the initiator port name, target port name, and the logical unit. To verify the change, run the show command for the logical unit.

1. Run the mpathadm list lu command.


# mpathadm list lu
	/dev/rdsk/c4t60020F20000035AF4267CCCB0002CEE2d0s2
		Total Path Count: 2
		Operational Path Count: 2
	/dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
		Total Path Count: 2
		Operational Path Count: 2
	/dev/rdsk/c4t60003BA27D2120004204AC1A000F1D6Cd0s2
		Total Path Count: 2
		Operational Path Count: 2

2. Select a logical unit name from the output.

3. Run the mpathadm show lu logical-unit-name command.


# mpathadm show lu /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
logical unit: /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
	mpath-support libmpscsi_vhci.so
	 Vendor:  SUN
	 Product:  T4
	 Revision:  0301
	 Name Type:  SCSI Inquiry VPD page 83 type 3
	Name:  60003ba27d2120004204ac2b000dab00
	 Asymmetric:  yes
	 Current Load Balance:  round-robin
	 Logical Unit Group ID:  NA
	 Auto Failback:  on
	 Auto Probing:  NA
 
	 Paths:
	 	 Initiator Port Name:  2000000173818713
	 	 Target Port Name:  20030003ba27d212
	 	 Override Path:  NA
	 	 Path State:  OK
	 	 Disabled:  no
 
		 Initiator Port Name:  2000000173018713
	 	 Target Port Name:  20030003ba27d095
	 	 Override path:  NA
	 	 Path State:  OK
	 	 Disabled:  no
 
	 Target Port Groups:
	 	 ID:  2
	 	 Explicit Failover:  yes
	 	 Access State:  standby
	 	 Target Ports:
	 	 	 Name:  20030003ba27d212
	 	 	 Relative ID:  0
	 
	 	 ID:  5
	 	 Explicit Failover:  yes
	 	 Access State:  active
	 	 Target Ports:
	 	 	 Name:  20030003ba27d095
	 	 Relative ID:  0

4. Select an initiator port and a target port name.

5. Run the mpathadm enable path -i initiator-port-name -t target-port-name
-l
logical-unit-name command.


# mpathadm enable path -i 2000000173018713 -t 20030003ba27d095 -l /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2


procedure icon  To Disable a Path

This operation makes the path unavailable for the logical unit, regardless of its operational state.

1. Run the mpathadm list lu command.


# mpathadm list lu
	/dev/rdsk/c4t60020F20000035AF4267CCCB0002CEE2d0s2
		Total Path Count: 2
		Operational Path Count: 2
	/dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
		Total Path Count: 2
		Operational Path Count: 2
	/dev/rdsk/c4t60003BA27D2120004204AC1A000F1D6Cd0s2
		Total Path Count: 2
		Operational Path Count: 2

2. Select a logical unit name from the output.

3. Run the mpathadm show lu logical-unit-name command.


# mpathadm show lu /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
logical unit: /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
	mpath-support libmpscsi_vhci.so
	 Vendor:  SUN
	 Product:  T4
	 Revision:  0301
	 Name Type:  SCSI Inquiry VPD page 83 type 3
	Name:  60003ba27d2120004204ac2b000dab00
	 Asymmetric:  yes
	 Current Load Balance:  round-robin
	 Logical Unit Group ID:  NA
	 Auto Failback:  on
	 Auto Probing:  NA
 
	 Paths:
	 	 Initiator Port Name:  2000000173818713
	 	 Target Port Name:  20030003ba27d212
	 	 Override Path:  NA
	 	 Path State:  OK
	 	 Disabled:  no
 
		 Initiator Port Name:  2000000173018713
	 	 Target Port Name:  20030003ba27d095
	 	 Override path:  NA
	 	 Path State:  OK
	 	 Disabled:  no
 
	 Target Port Groups:
	 	 ID:  2
	 	 Explicit Failover:  yes
	 	 Access State:  standby
	 	 Target Ports:
	 	 	 Name:  20030003ba27d212
	 	 	 Relative ID:  0
	 
	 	 ID:  5
	 	 Explicit Failover:  yes
	 	 Access State:  active
	 	 Target Ports:
	 	 	 Name:  20030003ba27d095
	 	 Relative ID:  0

4. Select an initiator port and a target port name.

5. Run the mpathadm disable path -i initiator-port-name -t target-port-name
-l
logical-unit-name command.


# mpathadm disable path -i 2000000173018713 -t 20030003ba27d095 -l /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2



Note - The disabled state is not persistent across rebooting. If the path is operational before the next boot sequence, it is enabled by default.





Note - This operation is not allowed when the given path is the last operational path remaining.