2 .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH MPATHADM 1M "May 4, 2009"
8 mpathadm \- multipath discovery and administration
12 \fBmpathadm\fR \fIsubcommand\fR \fIdirect-object\fR [\fIoptions\fR] [\fIoperand\fR]
18 The \fBmpathadm\fR command enables multipathing discovery and management. The
19 \fBmpathadm\fR command is implemented as a set of subcommands, many with their
20 own options, that are described in the section for that subcommand. Options not
21 associated with a particular subcommand are described under OPTIONS. The
22 \fBmpathadm\fR subcommands operate on a \fIdirect-object\fR. These are
23 described in this section for each subcommand. The \fIdirect-objects\fR,
24 \fIinitiator-port\fR, \fItarget-port\fR, and\fIlogical-unit\fR in the
25 subcommands are consistent with SCSI standard definitions.
28 The \fBmpathadm\fR command supports the following subcommands, which are
29 described in detail in subsections that follow.
36 Display a list of discovered instances for a given object.
45 Display information about a given object instance.
54 Modify properties of an object.
81 Cause target port group failover for a logical-unit.
90 Set a path to be used over other paths on a logical-unit.
95 The \fBmpathadm\fR subcommands operate on a \fIdirect-object\fR. These are
96 described in this section for each subcommand.
100 The syntax for the \fBlist\fR subcommand is:
104 # mpathadm list \fIdirect-object\fR [\fIoperands\fR...]
110 The \fBlist\fR subcommand displays data for following direct-objects:
114 \fB\fBmpath-support\fR [\fImpath-support-name\fR, ...]\fR
118 List the multipathing support that can be administered by this CLI. This
119 presents itself in the form of a library name registered through the MPAPI
120 framework. If no mpath-support name \fImpath-support-name\fR is specified, all
121 registered multipathing support libraries will be displayed.
127 \fB\fBinitiator-port\fR [\fIinitiator-port-name\fR, ...]\fR
131 List the initiator ports that are discovered on this system. If no
132 \fIinitiator-port-name\fR is specified, all discovered initiator ports are
139 \fB{\fBlogical-unit\fR | \fBlu\fR} [\fIoptions\fR]
140 [\fIlogical-unit-name\fR, ...]\fR
144 List the information on multipath logical units. If no \fIlogical-unit-name\fR
145 is specified, all discovered logical-units will be displayed.
147 Options for \fBlist logical-unit\fR are as follows:
151 \fB\fB-n\fR, \fB-\fR\fB-name\fR \fIname\fR\fR
155 Return the logical unit name that is associated with the given name string.
156 This name can be extracted from the output of the \fBmpathadm\fR \fBshow lu\fR
163 \fB\fB-t\fR, \fB-\fR\fB-target-port\fR \fItarget-port-name\fR\fR
167 Return the list of logical units names that are associated with the given
168 \fItarget-port-name\fR.
173 .SS "\fBshow\fR Subcommand"
176 The syntax for the \fBshow\fR subcommand is:
180 # mpathadm show \fIdirect-object\fR [\fIoperands\fR...]
186 The \fBshow\fR subcommand displays detailed information for following the
191 \fB\fBmpath-support\fR [\fImpath-support-name\fR, ...]\fR
195 Show the detailed information on the given \fImpath-support-name\fR if the name
196 exists. If the given \fImpath-support-name\fR supports only a limited set of
197 device products, the list of device products will be listed as part of the
204 \fB\fBinitiator-port\fR
205 \fIinitiator-port-name\fR[,\fIinitiator-port-name\fR, ...]\fR
209 Show the detailed information for the given \fIinitiator-port-name\fR.
215 \fB{\fBlogical-unit\fR | \fBlu\fR} [\fIlogical-unit-name\fR, ...]\fR
219 Display the detailed information on multipath logical unit(s), including path
220 and target port group information. Note that the name property in the logical
221 unit information represents the identifier for this LUN, derived from the
222 hardware, and used by this system. If the name is derived from SCSI Inquiry
223 Vital Product Data (VPD) page 83h, the name type property represents an
224 associated identifier type defined by the SCSI standards.
227 .SS "\fBmodify\fR Subcommand"
230 The syntax for the \fBmodify\fR subcommand is:
234 # mpathadm modify \fIdirect-object\fR [\fIoptions\fR] [\fIoperands\fR...]
240 The \fBmodify\fR subcommand modifies characteristics of the following
245 \fB\fBmpath-support\fR [\fIoptions\fR] \fImpath-support-name\fR, ...\fR
249 Configuration management of an \fImpath-support\fR. Options to modify
250 mpath-support are as follows:
254 \fB\fB-a\fR, \fB-\fR\fB-autofailback\fR on | off\fR
258 Set \fBautofailback\fR. Applicable only when mpath-support provides auto
265 \fB\fB-p\fR, \fB-\fR\fB-autoprobe\fR on | off\fR
269 Set \fBautoprobing\fR. Applicable only when mpath-support provides auto probing
276 \fB\fB-b\fR, \fB-\fR\fB-loadbalance\fR loadbalance-type\fR
280 Change the default load balance type. The \fBloadbalance\fR type is one of the
281 supported types listed in the \fBshow mpath-support\fR output.
289 \fB{\fBlogical-unit\fR | \fBlu\fR} [\fIoptions\fR]
290 \fIlogical-unit-name\fR, ...\fR
294 Configuration management of a logical unit. Options to modify
295 \fBlogical-unit\fR are as follows:
299 \fB\fB-a\fR, \fB-\fR\fB-autofailback\fR on | off\fR
303 Set \fBautofailback\fR. Applicable only when \fBmpath-support\fR provides auto
310 \fB\fB-p\fR, \fB-\fR\fB-autoprobe\fR on | off\fR
314 Set \fBautoprobing\fR. Applicable only when \fBmpath-support\fR provides auto
321 \fB\fB-b\fR, \fB-\fR\fB-loadbalance\fR loadbalance-type\fR
325 Set load balance type for the logical unit. Applicable only when load balance
326 configuration is supported at the logical unit level.
331 .SS "\fBenable\fR Subcommand"
334 The syntax for the \fBenable\fR subcommand is:
338 # mpathadm disable [\fIoptions\fR]
344 The \fBenable\fR subcommand supports the following direct-objects to be
349 \fB\fBpath\fR \fB-i\fR \fIinitiator-port-name\fR \fB-t\fR
350 \fItarget-port-name\fR\fR
354 \fB\fB-l\fR \fIlogical-unit-name\fR\fR
358 The path that consists of the specified initiator port, target port, and
359 logical unit will be enabled.
362 .SS "\fBdisable\fR Subcommand"
365 The syntax for the \fBdisable\fR subcommand is:
369 # mpathadm disable [\fIoptions\fR]
375 The \fBdisable\fR subcommand supports the following direct-objects to be
380 \fB\fBpath\fR \fB-i\fR \fIinitiator-port-name\fR \fB-t\fR
381 \fItarget-port-name\fR\fR
385 \fB\fB-l\fR \fIlogical-unit-name\fR\fR
389 The path that consists of the specified initiator port, target port, and
390 logical unit will be disabled.
393 .SS "\fBfailover\fR Subcommand"
396 The syntax for the \fBfailover\fR subcommand is:
400 # mpathadm failover \fIdirect-object\fR [\fIoperand\fR]
406 The \fBfailover\fR subcommand supports failover for the following
411 \fB{\fBlogical-unit\fR | \fBlu\fR} \fIlogical-unit-name\fR\fR
415 The target port group will failover when the given logical-unit is asymmetric
416 and supports explicit state change. The currently active target port group will
417 be changed to the standby state and the standby target port group will be
421 .SS "\fBoverride\fR Subcommand"
424 The syntax for the \fBoverride\fR subcommand is:
428 # mpathadm override [\fIoptions\fR]
434 The \fBoverride\fR subcommand controls whether or not the following
435 direct-objects override another:
439 \fBpath {\fB-i\fR \fIinitiator-port-name\fR \fB-t\fR \fItarget-port-name\fR |
444 \fB\fB-l\fR \fIlogical-unit-name\fR\fR
448 Cause a path that consists of the specified initiator port, target port, and
449 logical unit to override other paths on the logical unit. Once a path overrides
450 other paths, the mpath-support uses only that path regardless of any other path
451 selection configuration. The \fB-c\fR option cancels the setting. The path that
452 consists of the specified initiator port, target port, and logical unit will be
455 Options for override path are as follows:
459 \fB\fB-i\fR, \fB-\fR\fB-initiator-port\fR \fIinitiator-port-name\fR\fR
463 Represent the initiator port element of a path. Options \fB-t\fR and \fB-l\fR
464 must also be included.
470 \fB\fB-t\fR, \fB-\fR\fB-target-port\fR \fItarget-port-name\fR\fR
474 Represent the target port element of a path. Options \fB-i\fR and \fB-l\fR must
481 \fB\fB-l\fR, \fB-\fR\fB-logical-unit\fR \fIlogical-unit\fR\fR
485 Represent the logical unit element of a path. Options \fB-i\fR and \fB-t\fR
486 must also be included.
492 \fB\fB-c\fR, \fB-\fR\fB-cancel\fR\fR
496 Cancels overriding setting for the given logical unit. Option \fB-l\fR must
505 The following options are supported:
509 \fB\fB-V\fR, \fB-\fR\fB-version\fR\fR
512 Display the version information.
518 \fB\fB-?\fR, \fB-\fR\fB-help\fR\fR
521 Display context help. Can be used following an \fBmpathadm\fR command with no
522 arguments, following a subcommand, or following a subcommand direct-object
523 combination. Responds with help information appropriate for your entry. For
524 example, if you enter:
528 # \fBmpathadm add mpath-support-help\fR
533 \&... \fBmpathadm\fR responds with a display of the options available for that
534 combination of subcommand and direct-object.
539 \fBExample 1 \fRObtaining a List of Multipathing Support
542 The following command uses the \fBlist\fR subcommand to list all currently
543 registered \fBmpath-support\fR libraries.
548 # \fBmpathadm list mpath-support\fR
549 mpath-support: libmpscsi_vhci.so
555 \fBExample 2 \fRDisplaying the Properties of a Particular Multipathing Support
558 The following command uses the \fBshow\fR subcommand to display the properties
559 for a currently registered \fBmpath-support\fR library.
564 # \fBmpathadm show mpath-support libmpscsi_vhci.so\fR
565 mpath-support: libmpscsi_vhci.so
566 Vendor: Sun Microsystems
567 Driver Name: scsi_vhci
568 Default Load Balance: round-robin
569 Supported Load Balance Types:
572 Allows To Activate Target Port Group Access: yes
573 Allows Path Override: no
574 Supported Auto Failback Config: 1
576 Failback Polling Rate (current/max): 0/0
577 Supported Auto Probing Config: 0
579 Probing Polling Rate (current/max): NA/NA
584 Supported Load Balance Types:
589 Supported Load Balance Types:
596 \fBExample 3 \fRObtaining a List of Initiator Ports Discovered Through the
597 \fBmpath-support\fR Libraries
600 The following command uses the \fBlist initiator-port\fR subcommand to display
601 a list of initiator ports discovered by the currently registered
602 \fBmpath-support\fR libraries.
607 # \fBmpathadm list initiator-port\fR
608 Initiator-Port: iqn.1986-03.com.sun:01:080020b7ac2b.437a3b3e,4000002a0000
609 Initiator-Port: 2000000173018713
610 Initiator-Port: 2000000173818713
616 \fBExample 4 \fRDisplaying the Properties of a Particular Initiator Port
619 The following command uses the \fBshow initiator-port\fR subcommand to display
620 the properties of a particular initiator port discovered using the \fBlist
621 initiator-port\fR subcommand in an example above.
626 # \fBmpathadm show initiator-port 2000000173018713\fR
627 initiator-port: 2000000173018713
628 Transport Type: Fibre Channel
629 OS device File: devices/pci@1f,4000/pci@2/SUNW,qlca@5/fp@0,0:fc
635 \fBExample 5 \fRDisplaying the Properties of a Particular Logical Unit
638 The following command uses the \fBshow logical-unit\fR subcommand to display
639 the properties of the logical unit with the specified name.
644 # \fBmpathadm show lu /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2\fR
645 Logical Unit: /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2
646 mpath-support libmpscsi_vhci.so
650 Name Type: SCSI Inquiry VPD Page 83 type 3
651 Name: 60003ba27d2120004204ac2b000dab00
653 Current Load Balance: round-robin
654 Logical Unit Group ID: NA
659 Initiator Port Name: 2000000173818713
660 Target Port Name: 20030003ba27d212
665 Initiator Port Name: 2000000173018713
666 Target Port Name: 20030003ba27d095
673 Explicit Failover: yes
674 Access State: standby
676 Name: 20030003ba27d212
680 Explicit Failover: yes
683 Name: 20030003ba27d095
690 \fBExample 6 \fREnabling a Path
693 The following command uses the \fBenable path\fR subcommand to enable the path
694 with the specified initiator port, target port, and logical unit.
699 # \fBmpathadm enable path -i 2000000173018713 -t 20030003ba27d095 \e
700 -l /dev/rdsk/c4t60003BA27D2120004204AC2B000DAB00d0s2\fR
706 \fBExample 7 \fRModifying \fBmpath-support\fR To Turn On \fBautofailback\fR
710 # \fBmpathadm modify mpath-support -a on libmpscsi_vhci.so\fR
718 See \fBattributes\fR(5) for descriptions of the following attributes:
726 ATTRIBUTE TYPE ATTRIBUTE VALUE
728 Interface Stability Evolving
734 \fBstmsboot\fR(1M), \fBlibMPAPI\fR(3LIB), \fBexec_attr\fR(4),