1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4
<!ENTITY % globalent SYSTEM "../../../../libs/global.ent">
6
<!ENTITY % gnome-menus-C SYSTEM "../../../../libs/gnome-menus-C.ent">
8
<!ENTITY % xinclude SYSTEM "../../../../libs/xinclude.mod">
10
<!ENTITY language "&EnglishAmerican;">
11
<!ENTITY DMM "DM-Multipath">
12
<!ENTITY multipath_c "<command>multipath</command>">
13
<!ENTITY multipathd_c "<command>multipathd</command>">
14
<!ENTITY udev_c "<command>udev</command>">
15
<!ENTITY multipath-conf "<filename>multipath.conf</filename>">
16
<!ENTITY multipath-conf-full "<filename>/etc/multipath.conf</filename>">
18
<!-- This will be a sub-chapter on the [Storage] heading -->
19
<!-- This work was signifigantly enabled by a tool called XMLmind:
20
http://www.xmlmind.com/xmleditor/
21
and is approved for open source use. It will dramatically increase
22
your productivity. -->
23
<chapter id="dm-multipath-chapter" status="writing">
26
<sect1 id="device-mapper-multipathing" status="review">
27
<title>Device Mapper Multipathing</title>
29
<para>Device mapper multipathing (DM-Multipath) allows you to configure
30
multiple I/O paths between server nodes and storage arrays into a single
31
device. These I/O paths are physical SAN connections that can include
32
separate cables, switches, and controllers. Multipathing aggregates the
33
I/O paths, creating a new device that consists of the aggregated paths.
34
This chapter provides a summary of the features of DM-Multipath that are
35
new for the initial release of Ubuntu Server 12.04. Following that, this
36
chapter provides a high-level overview of DM Multipath and its components,
37
as well as an overview of DM-Multipath setup.</para>
39
<sect2 id="multipath-new-and-changed-features">
40
<title>New and Changed Features for Ubuntu Server 12.04</title>
42
<para>Migrated from multipath-0.4.8 to multipath-0.4.9</para>
44
<sect3 id="multipath-migration-from-previous-release">
45
<title>Migration from 0.4.8</title>
47
<para>The priority checkers are no longer run as standalone binaries,
48
but as shared libraries. The key value name for this feature has also
49
slightly changed. Copy the attribute named <emphasis
50
role="bold">prio_callout</emphasis> to <emphasis
51
role="bold">prio</emphasis>, also modify the argument the name of the
52
priority checker, a system path is no longer necessary. Example
53
conversion:<screen>device {
56
prio_callout mpath_prio_alua /dev/%n
61
linkend="priority-checker-conversion-table">"Priority Checker
62
Conversion"</link> for a complete listing</para>
65
<title id="priority-checker-conversion-table">Priority Checker
71
<entry align="center">v0.4.8</entry>
73
<entry align="center">v0.4.9</entry>
79
<entry><emphasis role="bold">prio_callout mpath_prio_emc
80
/dev/%n</emphasis></entry>
82
<entry><emphasis role="bold">prio emc</emphasis></entry>
86
<entry><emphasis role="bold">prio_callout mpath_prio_alua
87
/dev/%n</emphasis></entry>
89
<entry><emphasis role="bold">prio alua</emphasis></entry>
93
<entry><emphasis role="bold">prio_callout mpath_prio_netapp
94
/dev/%n</emphasis></entry>
96
<entry><emphasis role="bold">prio netapp</emphasis></entry>
100
<entry><emphasis role="bold">prio_callout mpath_prio_rdac
101
/dev/%n</emphasis></entry>
103
<entry><emphasis role="bold">prio rdac</emphasis></entry>
107
<entry><emphasis role="bold">prio_callout mpath_prio_hp_sw
108
/dev/%n</emphasis></entry>
110
<entry><emphasis role="bold">prio hp_sw</emphasis></entry>
114
<entry><emphasis role="bold">prio_callout
115
mpath_prio_hds_modular %b</emphasis></entry>
117
<entry><emphasis role="bold">prio hds</emphasis></entry>
123
<para>Since the multipath config file parser essentially parses all
124
key/value pairs it finds and then makes use of them, it is safe for
125
both <emphasis role="bold">prio_callout</emphasis> and <emphasis
126
role="bold">prio</emphasis> to coexist and is recommended that the
127
<emphasis role="bold">prio</emphasis> attribute be inserted before
128
beginning migration. After which you can safely delete the legacy
129
<emphasis role="bold">prio_calliout</emphasis> attribute without
130
interrupting service.</para>
134
<sect2 id="multipath-overview">
135
<title>Overview</title>
137
<para>DM-Multipath can be used to provide:</para>
141
<para><emphasis> Redundancy </emphasis> DM-Multipath can provide
142
failover in an active/passive configuration. In an active/passive
143
configuration, only half the paths are used at any time for I/O. If
144
any element of an I/O path (the cable, switch, or controller) fails,
145
DM-Multipath switches to an alternate path.</para>
149
<para><emphasis> Improved Performance </emphasis> Performance
150
DM-Multipath can be configured in active/active mode, where I/O is
151
spread over the paths in a round-robin fashion. In some
152
configurations, DM-Multipath can detect loading on the I/O paths and
153
dynamically re-balance the load.</para>
158
<sect2 id="multipath-storage-array-support">
159
<title>Storage Array Overview</title>
161
<para>By default, DM-Multipath includes support for the most common
162
storage arrays that support DM-Multipath. The supported devices can be
163
found in the multipath.conf.defaults file. If your storage array
164
supports DM-Multipath and is not configured by default in this file, you
165
may need to add them to the DM-Multipath configuration file,
166
multipath.conf. For information on the DM-Multipath configuration file,
167
see Section, <link linkend="multipath-dm-multipath-config-file">The
168
DM-Multipath Configuration File</link>. Some storage arrays require
169
special handling of I/O errors and path switching. These require
170
separate hardware handler kernel modules.</para>
173
<sect2 id="multipath-dm-multipath-components">
174
<title>&DMM; components</title>
176
<para>Table “<link linkend="multipath-components-table">DM-Multipath
177
Components”</link> describes the components of the DM-Multipath package.
178
<xi:include href="multipath-components-table.xml"
179
xmlns:xi="http://www.w3.org/2001/XInclude"/></para>
182
<sect2 id="multipath-dm-multipath-setup-overview">
183
<title>&DMM; Setup Overview</title>
185
<para>DM-Multipath includes compiled-in default settings that are
186
suitable for common multipath configurations. Setting up DM-multipath is
187
often a simple procedure. The basic procedure for configuring your
188
system with DM-Multipath is as follows: <orderedlist>
190
<para>Install the <emphasis role="bold">multipath-tools</emphasis>
191
and <emphasis role="bold">multipath-tools-boot</emphasis>
196
<para>Create an empty config file, &multipath-conf-full;, that
198
linkend="multipath-skel-config">following</link></para>
202
<para>If necessary, edit the <emphasis
203
role="bold">multipath.conf</emphasis> configuration file to modify
204
default values and save the updated file.</para>
208
<para>Start the multipath daemon</para>
212
<para>Update initial ramdisk</para>
214
</orderedlist> For detailed setup instructions for multipath
215
configuration see Section, <link
216
linkend="multipath-setup-overview">Setting Up
217
DM-Multipath</link>.</para>
221
<sect1 id="multipath-devices">
222
<title>Multipath Devices</title>
224
<para>Without DM-Multipath, each path from a server node to a storage
225
controller is treated by the system as a separate device, even when the
226
I/O path connects the same server node to the same storage controller.
227
DM-Multipath provides a way of organizing the I/O paths logically, by
228
creating a single multipath device on top of the underlying
231
<sect2 id="multipath-device-identifiers">
232
<title>Multipath Device Identifiers</title>
234
<para>Each multipath device has a World Wide Identifier (WWID), which is
235
guaranteed to be globally unique and unchanging. By default, the name of
236
a multipath device is set to its WWID. Alternately, you can set the
237
<emphasis role="bold"><link
238
linkend="attribute-user_friendly_names">user_friendly_names</link>
239
</emphasis>option in the multipath configuration file, which causes
240
DM-Multipath to use a node-unique alias of the form <emphasis
241
role="bold">mpathn</emphasis> as the name. For example, a node with two
242
HBAs attached to a storage controller with two ports via a single
243
unzoned FC switch sees four devices: <emphasis
244
role="bold">/dev/sda</emphasis>, <emphasis
245
role="bold">/dev/sdb</emphasis>, <emphasis
246
role="bold">/dev/sdc</emphasis>, and <emphasis
247
role="bold">/dev/sdd</emphasis>. DM-Multipath creates a single device
248
with a unique WWID that reroutes I/O to those four underlying devices
249
according to the multipath configuration. When the <emphasis
251
linkend="attribute-user_friendly_names">user_friendly_names</link></emphasis>
252
configuration option is set to <emphasis role="bold">yes</emphasis>, the
253
name of the multipath device is set to <emphasis
254
role="bold">mpathn</emphasis>. When new devices are brought under the
255
control of DM-Multipath, the new devices may be seen in two different
256
places under the <emphasis role="bold">/dev</emphasis> directory:
257
<emphasis role="bold">/dev/mapper/mpathn</emphasis> and <emphasis
258
role="bold">/dev/dm-n</emphasis>. <itemizedlist>
260
<para>The devices in <emphasis role="bold">/dev/mapper</emphasis>
261
are created early in the boot process. Use these devices to access
262
the multipathed devices, for example when creating logical
267
<para>Any devices of the form <emphasis
268
role="bold">/dev/dm-n</emphasis> are for internal use only and
269
should never be used.</para>
271
</itemizedlist>For information on the multipath configuration
272
defaults, including the <emphasis role="bold"><link
273
linkend="attribute-user_friendly_names">user_friendly_names</link></emphasis>
274
configuration option, see Section , <link
275
linkend="multipath-config-defaults">“Configuration File
276
Defaults”</link>. You can also set the name of a multipath device to a
277
name of your choosing by using the <emphasis role="bold"><link
278
linkend="attribute-alias">alias</link></emphasis> option in the
279
<emphasis role="bold">multipaths</emphasis> section of the multipath
280
configuration file. For information on the <emphasis
281
role="bold">multipaths</emphasis> section of the multipath configuration
282
file, see Section, <link
283
linkend="multipath-config-multipath">“Multipaths Device Configuration
284
Attributes”</link>.</para>
287
<sect2 id="multipath-device-names-in-cluster">
288
<title>Consistent Multipath Device Names in a Cluster</title>
290
<para>When the <emphasis role="bold">user_friendly_names</emphasis>
291
configuration option is set to yes, the name of the multipath device is
292
unique to a node, but it is not guaranteed to be the same on all nodes
293
using the multipath device. Similarly, if you set the <emphasis
294
role="bold">alias</emphasis> option for a device in the <emphasis
295
role="bold">multipaths</emphasis> section of the &multipath-conf;
296
configuration file, the name is not automatically consistent across all
297
nodes in the cluster. This should not cause any difficulties if you use
298
LVM to create logical devices from the multipath device, but if you
299
require that your multipath device names be consistent in every node it
300
is recommended that you leave the <emphasis
301
role="bold">user_friendly_names</emphasis> option set to <emphasis
302
role="bold">no</emphasis> and that you not configure aliases for the
303
devices. By default, if you do not set <emphasis
304
role="bold">user_friendly_names</emphasis> to yes or configure an alias
305
for a device, a device name will be the WWID for the device, which is
306
always the same. If you want the system-defined user-friendly names to
307
be consistent across all nodes in the cluster, however, you can follow
308
this procedure:</para>
312
<para>Set up all of the multipath devices on one machine.</para>
316
<para>Disable all of your multipath devices on your other machines
317
by running the following commands:</para>
319
<screen># service multipath-tools stop
325
<para>Copy the <filename>/etc/multipath/bindings</filename> file
326
from the first machine to all the other machines in the
331
<para>Re-enable the multipathd daemon on all the other machines in
332
the cluster by running the following command:</para>
334
<screen># service multipath-tools start</screen>
338
<para>If you add a new device, you will need to repeat this
341
<para>Similarly, if you configure an alias for a device that you would
342
like to be consistent across the nodes in the cluster, you should ensure
343
that the <filename>/etc/multipath.conf</filename> file is the same for
344
each node in the cluster by following the same procedure:</para>
348
<para>Configure the aliases for the multipath devices in the in the
349
<filename>multipath.conf</filename> file on one machine.</para>
353
<para>Disable all of your multipath devices on your other machines
354
by running the following commands:</para>
356
<screen># service multipath-tools stop
362
<para>Copy the &multipath-conf; file from the first machine to all
363
the other machines in the cluster.</para>
367
<para>Re-enable the multipathd daemon on all the other machines in
368
the cluster by running the following command:</para>
370
<screen># service multipath-tools start</screen>
374
<para>When you add a new device you will need to repeat this
378
<sect2 id="multipath-devices-attributes">
379
<title>Multipath Device attributes</title>
381
<para>In addition to the <emphasis
382
role="bold">user_friendly_names</emphasis> and <emphasis
383
role="bold">alias</emphasis> options, a multipath device has numerous
384
attributes. You can modify these attributes for a specific multipath
385
device by creating an entry for that device in the <emphasis
386
role="bold">multipaths</emphasis> section of the <emphasis
387
role="bold">multipath</emphasis> configuration file. For information on
388
the <emphasis role="bold">multipaths</emphasis> section of the multipath
389
configuration file, see Section, "<link endterm="config-multipath-title"
390
linkend="multipath-config-multipath"/>".</para>
393
<sect2 id="multipath-devices-in-logical-volumes">
394
<title>Multipath Devices in Logical Volumes</title>
396
<para>After creating multipath devices, you can use the multipath device
397
names just as you would use a physical device name when creating an LVM
398
physical volume. For example, if /dev/mapper/mpatha is the name of a
399
multipath device, the following command will mark /dev/mapper/mpatha as
400
a physical volume. <screen># pvcreate /dev/mapper/mpatha</screen> You
401
can use the resulting LVM physical device when you create an LVM volume
402
group just as you would use any other LVM physical device.</para>
405
<para>If you attempt to create an LVM physical volume on a whole
406
device on which you have configured partitions, the pvcreate command
410
<para>When you create an LVM logical volume that uses active/passive
411
multipath arrays as the underlying physical devices, you should include
412
filters in the <emphasis role="bold">lvm.conf</emphasis> to exclude the
413
disks that underlie the multipath devices. This is because if the array
414
automatically changes the active path to the passive path when it
415
receives I/O, multipath will failover and failback whenever LVM scans
416
the passive path if these devices are not filtered. For active/passive
417
arrays that require a command to make the passive path active, LVM
418
prints a warning message when this occurs. To filter all SCSI devices in
419
the LVM configuration file (lvm.conf), include the following filter in
420
the devices section of the file. <screen>filter = [ "r/block/", "r/disk/", "r/sd.*/", "a/.*/" ]</screen>After
421
updating <filename>/etc/lvm.conf</filename>, it's necessary to update
422
the <emphasis role="bold">initrd</emphasis> so that this file will be
423
copied there, where the filter matters the most, during boot.
424
Perform:<screen>update-initramfs -u -k all</screen><note>
425
<para>Every time either <filename>/etc/lvm.conf</filename> or
426
<filename>/etc/multipath.conf</filename> is updated, the initrd
427
should be rebuilt to reflect these changes. This is imperative when
428
blacklists and filters are necessary to maintain a stable storage
429
configuration.</para>
434
<sect1 id="multipath-setting-up-dm-multipath">
435
<title>Setting up &DMM; Overview</title>
437
<para>This section provides step-by-step example procedures for
438
configuring &DMM;. It includes the following procedures:</para>
442
<para>Basic &DMM; setup</para>
446
<para>Ignoring local disks</para>
450
<para>Adding more devices to the configuration file</para>
454
<sect2 id="multipath-setup-overview">
455
<title>Setting Up &DMM;</title>
457
<para>Before setting up &DMM; on your system, ensure that your system
458
has been updated and includes the <emphasis
459
role="bold"><application>multipath-tools</application></emphasis> package. If
460
boot from SAN is desired, then the <emphasis
461
role="bold"><application>multipath-tools-boot</application></emphasis> package
462
is also required.</para>
464
<para>A basic <emphasis role="bold">/etc/multipath.conf </emphasis> need
465
not even exist, when <emphasis role="bold">multpath</emphasis> is run
466
without an accompanying <filename>/etc/multipath.conf</filename>, it
467
draws from it's internal database to find a suitable configuration, it
468
also draws from it's internal blacklist. If after running <emphasis
469
role="bold">multipath -ll</emphasis> without a config file, no
470
multipaths are discovered. One must proceed to increase the verbosity to
471
discover why a multipath was not created. Consider referencing the SAN
472
vendor's documentation, the multipath example config files found in
473
<filename>/usr/share/doc/multipath-tools/examples</filename>, and the
474
live multipathd database:<screen id="multipath-skel-config"># echo 'show config' | multipathd -k > multipath.conf-live</screen><note>
475
<para>To work around a quirk in multipathd, when an
476
<filename>/etc/multipath.conf</filename> doesn't exist, the previous
477
command will return nothing, as it is the result of a
478
<emphasis>merge</emphasis> between the
479
<filename>/etc/multipath.conf</filename> and the database in memory.
480
To remedy this, either define an empty
481
<filename>/etc/multipath.conf</filename>, by using <emphasis
482
role="bold">touch</emphasis>, or create one that redefines a default
483
value like:<screen>defaults {
484
user_friendly_names no
486
</screen>and restart multipathd:<screen># service multipath-tools restart</screen>Now
487
the "show config" command will return the live database.</para>
492
<title>Installing with Multipath Support</title>
494
<para>To enable <ulink
495
url="http://wiki.debian.org/DebianInstaller/MultipathSupport">multipath
496
support during installation</ulink> use<screen>install disk-detect/multipath/enable=true</screen>at
497
the installer prompt. If multipath devices are found these will show up
498
as <emphasis role="bold">/dev/mapper/mpath<X></emphasis> during
502
<sect2 id="multipath-ignore-local-disks">
503
<title>Ignoring Local Disks When Generating Multipath Devices</title>
505
<para>Some machines have local SCSI cards for their internal disks.
506
DM-Multipath is not recommended for these devices. The following
507
procedure shows how to modify the multipath configuration file to ignore
508
the local disks when configuring multipath.</para>
512
<para>Determine which disks are the internal disks and mark them as
513
the ones to blacklist. In this example, <emphasis
514
role="bold"><filename>/dev/sda</filename></emphasis> is the internal
515
disk. Note that as originally configured in the default multipath
516
configuration file, executing the <emphasis role="bold">multipath
517
-v2</emphasis> shows the local disk, <emphasis
518
role="bold">/dev/sda</emphasis>, in the multipath map. For further
519
information on the <emphasis role="bold">multipath</emphasis>
520
command output, see Section <link
521
linkend="multipath-command-output">“Multipath Command
522
Output”</link>.</para>
526
create: SIBM-ESXSST336732LC____F3ET0EP0Q000072428BX1 undef WINSYS,SF2372
527
size=33 GB features="0" hwhandler="0" wp=undef
528
`-+- policy='round-robin 0' prio=1 status=undef
529
|- 0:0:0:0 sda 8:0 [---------
531
device-mapper ioctl cmd 9 failed: Invalid argument
532
device-mapper ioctl cmd 14 failed: No such device or address
533
create: 3600a0b80001327d80000006d43621677 undef WINSYS,SF2372
534
size=12G features='0' hwhandler='0' wp=undef
535
`-+- policy='round-robin 0' prio=1 status=undef
536
|- 2:0:0:0 sdb 8:16 undef ready running
537
`- 3:0:0:0 sdf 8:80 undef ready running
539
create: 3600a0b80001327510000009a436215ec undef WINSYS,SF2372
540
size=12G features='0' hwhandler='0' wp=undef
541
`-+- policy='round-robin 0' prio=1 status=undef
542
|- 2:0:0:1 sdc 8:32 undef ready running
543
`- 3:0:0:1 sdg 8:96 undef ready running
545
create: 3600a0b80001327d800000070436216b3 undef WINSYS,SF2372
546
size=12G features='0' hwhandler='0' wp=undef
547
`-+- policy='round-robin 0' prio=1 status=undef
548
|- 2:0:0:2 sdd 8:48 undef ready running
549
`- 3:0:0:2 sdg 8:112 undef ready running
551
create: 3600a0b80001327510000009b4362163e undef WINSYS,SF2372
552
size=12G features='0' hwhandler='0' wp=undef
553
`-+- policy='round-robin 0' prio=1 status=undef
554
|- 2:0:0:3 sdd 8:64 undef ready running
555
`- 3:0:0:3 sdg 8:128 undef ready running
560
<para>In order to prevent the device mapper from mapping <emphasis
561
role="bold">/dev/sda</emphasis> in its multipath maps, edit the
562
blacklist section of the &multipath-conf-full; file to include this
563
device. Although you could blacklist the <emphasis
564
role="bold">sda</emphasis> device using a <emphasis
565
role="bold">devnode</emphasis> type, that would not be safe
566
procedure since <emphasis role="bold">/dev/sda</emphasis> is not
567
guaranteed to be the same on reboot. To blacklist individual
568
devices, you can blacklist using the WWID of that device. Note that
569
in the output to the <emphasis role="bold">multipath -v2</emphasis>
570
command, the WWID of the <filename>/dev/sda</filename> device is
571
SIBM-ESXSST336732LC____F3ET0EP0Q000072428BX1. To blacklist this
572
device, include the following in the &multipath-conf-full;
577
wwid SIBM-ESXSST336732LC____F3ET0EP0Q000072428BX1
583
<para>After you have updated the &multipath-conf-full; file, you
584
must manually tell the <emphasis role="bold">multipathd</emphasis>
585
daemon to reload the file. The following command reloads the updated
586
&multipath-conf-full; file.</para>
588
<screen># service multipath-tools reload</screen>
592
<para>Run the following command to remove the multipath
596
# multipath -f SIBM-ESXSST336732LC____F3ET0EP0Q000072428BX1
601
<para>To check whether the device removal worked, you can run the
602
<command>multipath -ll</command> command to display the current
603
multipath configuration. For information on the <command>multipath
604
-ll</command> command, see Section <link
605
linkend="multipath-queries-and-commands">“Multipath Queries with
606
multipath Command”</link>. To check that the blacklisted device was
607
not added back, you can run the multipath command, as in the
608
following example. The multipath command defaults to a verbosity
609
level of <emphasis role="bold">v2</emphasis> if you do not specify a
610
<emphasis role="bold">-v</emphasis> option.</para>
615
create: 3600a0b80001327d80000006d43621677 undef WINSYS,SF2372
616
size=12G features='0' hwhandler='0' wp=undef
617
`-+- policy='round-robin 0' prio=1 status=undef
618
|- 2:0:0:0 sdb 8:16 undef ready running
619
`- 3:0:0:0 sdf 8:80 undef ready running
621
create: 3600a0b80001327510000009a436215ec undef WINSYS,SF2372
622
size=12G features='0' hwhandler='0' wp=undef
623
`-+- policy='round-robin 0' prio=1 status=undef
624
|- 2:0:0:1 sdc 8:32 undef ready running
625
`- 3:0:0:1 sdg 8:96 undef ready running
627
create: 3600a0b80001327d800000070436216b3 undef WINSYS,SF2372
628
size=12G features='0' hwhandler='0' wp=undef
629
`-+- policy='round-robin 0' prio=1 status=undef
630
|- 2:0:0:2 sdd 8:48 undef ready running
631
`- 3:0:0:2 sdg 8:112 undef ready running
633
create: 3600a0b80001327510000009b4362163e undef WINSYS,SF2372
634
size=12G features='0' hwhandler='0' wp=undef
635
`-+- policy='round-robin 0' prio=1 status=undef
636
|- 2:0:0:3 sdd 8:64 undef ready running
637
`- 3:0:0:3 sdg 8:128 undef ready running
643
<sect2 id="multipath-config-storage-devices">
644
<title>Configuring Storage Devices</title>
646
<para>By default, DM-Multipath includes support for the most common
647
storage arrays that support DM-Multipath. The default configuration
648
values, including supported devices, can be found in the
649
<filename>multipath.conf.defaults</filename> file.</para>
651
<para>If you need to add a storage device that is not supported by
652
default as a known multipath device, edit the &multipath-conf-full; file
653
and insert the appropriate device information.</para>
655
<para>For example, to add information about the HP Open-V series the
656
entry looks like this, where <emphasis role="bold">%n</emphasis> is the
663
getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n"
668
<para>For more information on the devices section of the configuration
669
file, see Section <xref endterm="config-device-title"
670
linkend="multipath-config-device"/>.</para>
674
<sect1 id="multipath-dm-multipath-config-file">
675
<title>The &DMM; Configuration File</title>
677
<para>By default, DM-Multipath provides configuration values for the most
678
common uses of multipathing. In addition, DM-Multipath includes support
679
for the most common storage arrays that support DM-Multipath. The default
680
configuration values and the supported devices can be found in the
681
<filename>multipath.conf.defaults</filename> file.</para>
683
<para>You can override the default configuration values for DM-Multipath
684
by editing the &multipath-conf-full; configuration file. If necessary, you
685
can also add a storage array that is not supported by default to the
686
configuration file. This chapter provides information on parsing and
687
modifying the &multipath-conf; file. It contains sections on the following
688
topics: <itemizedlist>
690
<para><xref endterm="config-overview-title"
691
linkend="multipath-config-overview"/></para>
695
<para><xref endterm="config-blacklist-title"
696
linkend="multipath-config-blacklist"/></para>
700
<para><xref endterm="config-defaults-title"
701
linkend="multipath-config-defaults"/></para>
705
<para><xref endterm="config-multipath-title"
706
linkend="multipath-config-multipath"/></para>
710
<para><xref endterm="config-device-title"
711
linkend="multipath-config-device"/></para>
713
</itemizedlist></para>
715
<para>In the multipath configuration file, you need to specify only the
716
sections that you need for your configuration, or that you wish to change
717
from the default values specified in the
718
<filename>multipath.conf.defaults</filename> file. If there are sections
719
of the file that are not relevant to your environment or for which you do
720
not need to override the default values, you can leave them commented out,
721
as they are in the initial file.</para>
723
<para>The configuration file allows regular expression description
726
<para>An annotated version of the configuration file can be found in
727
<filename><filename>/usr/share/doc/multipath-tools/examples/multipath.conf.annotated.gz</filename></filename>.</para>
729
<sect2 id="multipath-config-overview">
730
<title id="config-overview-title">Configuration File Overview</title>
732
<para>The multipath configuration file is divided into the following
737
<term><emphasis role="bold">blacklist</emphasis></term>
740
<para>Listing of specific devices that will not be considered for
746
<term><emphasis role="bold">blacklist_exceptions</emphasis></term>
749
<para>Listing of multipath candidates that would otherwise be
750
blacklisted according to the parameters of the blacklist
756
<term><emphasis role="bold">defaults</emphasis></term>
759
<para>General default settings for DM-Multipath.</para>
764
<term><emphasis role="bold">multipath</emphasis></term>
767
<para>Settings for the characteristics of individual multipath
768
devices. These values overwrite what is specified in the <emphasis
769
role="bold">defaults</emphasis> and <emphasis
770
role="bold">devices</emphasis> sections of the configuration
776
<term><emphasis role="bold">devices</emphasis></term>
779
<para>Settings for the individual storage controllers. These
780
values overwrite what is specified in the <emphasis
781
role="bold">defaults</emphasis> section of the configuration file.
782
If you are using a storage array that is not supported by default,
783
you may need to create a devices subsection for your array.</para>
788
<para>When the system determines the attributes of a multipath device,
789
first it checks the multipath settings, then the per devices settings,
790
then the multipath system defaults.</para>
793
<sect2 id="multipath-config-blacklist">
794
<title id="config-blacklist-title">Configuration File Blacklist</title>
796
<para>The blacklist section of the multipath configuration file
797
specifies the devices that will not be used when the system configures
798
multipath devices. Devices that are blacklisted will not be grouped into
799
a multipath device.</para>
803
<para>If you do need to blacklist devices, you can do so according
804
to the following criteria:</para>
808
<para>By WWID, as described <xref
809
endterm="config-blacklist-by-wwid-title"
810
linkend="multipath-config-blacklist-by-wwid"/></para>
814
<para>By device name, as described in <xref
815
endterm="config-blacklist-by-device-name-title"
816
linkend="multipath-config-blacklist-by-device-name"/></para>
820
<para>By device type, as described in <xref
821
endterm="config-blacklist-by-device-type-title"
822
linkend="multipath-config-blacklist-by-device-type"/></para>
826
<para>By default, a variety of device types are blacklisted, even
827
after you comment out the initial blacklist section of the
828
configuration file. For information, see <xref
829
endterm="config-blacklist-by-device-name-title"
830
linkend="multipath-config-blacklist-by-device-name"/></para>
834
<sect3 id="multipath-config-blacklist-by-wwid">
835
<title id="config-blacklist-by-wwid-title">Blacklisting By
838
<para>You can specify individual devices to blacklist by their
839
World-Wide IDentification with a <emphasis role="bold">wwid</emphasis>
840
entry in the <emphasis role="bold">blacklist</emphasis> section of the
841
configuration file.</para>
843
<para>The following example shows the lines in the configuration file
844
that would blacklist a device with a WWID of 26353900f02796769.</para>
848
wwid 26353900f02796769
853
<sect3 id="multipath-config-blacklist-by-device-name">
854
<title id="config-blacklist-by-device-name-title">Blacklisting By
857
<para>You can blacklist device types by device name so that they will
858
not be grouped into a multipath device by specifying a <emphasis
859
role="bold">devnode</emphasis> entry in the <emphasis
860
role="bold">blacklist</emphasis> section of the configuration
863
<para>The following example shows the lines in the configuration file
864
that would blacklist all SCSI devices, since it blacklists all sd*
870
<para>You can use a <emphasis role="bold">devnode</emphasis> entry in
871
the <emphasis role="bold">blacklist</emphasis> section of the
872
configuration file to specify individual devices to blacklist rather
873
than all devices of a specific type. This is not recommended, however,
874
since unless it is statically mapped by udev rules, there is no
875
guarantee that a specific device will have the same name on reboot.
876
For example, a device name could change from
877
<filename>/dev/sda</filename> to <filename>/dev/sdb</filename> on
880
<para>By default, the following <emphasis
881
role="bold">devnode</emphasis> entries are compiled in the default
882
blacklist; the devices that these entries blacklist do not generally
883
support DM-Multipath. To enable multipathing on any of these devices,
884
you would need to specify them in the <emphasis
885
role="bold">blacklist_exceptions</emphasis> section of the
886
configuration file, as described in <xref
887
endterm="config-blacklist-exceptions-title"
888
linkend="multipath-config-blacklist-exceptions"/> <screen>
890
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
896
<sect3 id="multipath-config-blacklist-by-device-type">
897
<title id="config-blacklist-by-device-type-title">Blacklisting By
900
<para>You can specify specific device types in the <emphasis
901
role="bold">blacklist</emphasis> section of the configuration file
902
with a device section. The following example blacklists all IBM DS4200
903
and HP devices. <screen>
907
product "3S42" #DS4200 Product 10
917
<sect3 id="multipath-config-blacklist-exceptions">
918
<title id="config-blacklist-exceptions-title">Blacklist
921
<para>You can use the <emphasis
922
role="bold">blacklist_exceptions</emphasis> section of the
923
configuration file to enable multipathing on devices that have been
924
blacklisted by default.</para>
926
<para>For example, if you have a large number of devices and want to
927
multipath only one of them (with the WWID of
928
3600d0230000000000e13955cc3757803), instead of individually
929
blacklisting each of the devices except the one you want, you could
930
instead blacklist all of them, and then allow only the one you want by
931
adding the following lines to the &multipath-conf-full; file. <screen>
936
blacklist_exceptions {
937
wwid "3600d0230000000000e13955cc3757803"
941
<para>When specifying devices in the <emphasis
942
role="bold">blacklist_exceptions</emphasis> section of the
943
configuration file, you must specify the exceptions in the same way
944
they were specified in the <emphasis role="bold">blacklist</emphasis>.
945
For example, a WWID exception will not apply to devices specified by a
946
<emphasis role="bold">devnode</emphasis> blacklist entry, even if the
947
blacklisted device is associated with that WWID. Similarly, devnode
948
exceptions apply only to devnode entries, and device exceptions apply
949
only to device entries.</para>
953
<sect2 id="multipath-config-defaults">
954
<title id="config-defaults-title">Configuration File Defaults</title>
956
<para>The &multipath-conf-full; configuration file includes a <emphasis
957
role="bold">defaults</emphasis> section that sets the <emphasis
958
role="bold">user_friendly_names</emphasis> parameter to <emphasis
959
role="bold">yes</emphasis>, as follows.</para>
963
user_friendly_names yes
967
<para>This overwrites the default value of the <emphasis
968
role="bold">user_friendly_names</emphasis> parameter.</para>
970
<para>The configuration file includes a template of configuration
971
defaults. This section is commented out, as follows.</para>
977
# selector "round-robin 0"
978
# path_grouping_policy failover
979
# getuid_callout "/lib/dev/scsi_id --whitelisted --device=/dev/%n"
981
# path_checker directio
986
# user_friendly_names no
990
<para>To overwrite the default value for any of the configuration
991
parameters, you can copy the relevant line from this template into the
992
<emphasis role="bold">defaults</emphasis> section and uncomment it. For
993
example, to overwrite the <emphasis
994
role="bold">path_grouping_policy</emphasis> parameter so that it is
995
<emphasis role="bold">multibus</emphasis> rather than the default value
996
of <emphasis role="bold">failover</emphasis>, copy the appropriate line
997
from the template to the initial <emphasis
998
role="bold">defaults</emphasis> section of the configuration file, and
999
uncomment it, as follows.</para>
1003
user_friendly_names yes
1004
path_grouping_policy multibus
1008
<para>Table <xref endterm="config-defaults-table-title"
1009
linkend="multipath-config-defaults-table"/> describes the attributes
1010
that are set in the <emphasis role="bold">defaults</emphasis> section of
1011
the <filename>multipath.conf</filename> configuration file. These values
1012
are used by DM-Multipath unless they are overwritten by the attributes
1013
specified in the <emphasis role="bold">devices</emphasis> and <emphasis
1014
role="bold">multipaths</emphasis> sections of the &multipath-conf;
1017
<xi:include href="multipath-config-defaults-table.xml"
1018
xmlns:xi="http://www.w3.org/2001/XInclude"/>
1021
<sect2 id="multipath-config-multipath">
1022
<title id="config-multipath-title">Configuration File Multipath
1025
<para>Table <xref endterm="attributes-table-title"
1026
linkend="multipath-attributes-table"/> shows the attributes that you can
1027
set in the <emphasis role="bold">multipaths</emphasis> section of the
1028
<filename>multipath.conf</filename> configuration file for each specific
1029
multipath device. These attributes apply only to the one specified
1030
multipath. These defaults are used by DM-Multipath and override
1031
attributes set in the <emphasis role="bold">defaults</emphasis> and
1032
<emphasis role="bold">devices</emphasis> sections of the multipath.conf
1035
<xi:include href="multipath-attributes-table.xml"
1036
xmlns:xi="http://www.w3.org/2001/XInclude"/>
1038
<para>In addition, the following parameters may be overridden in this
1039
<emphasis role="bold">multipath</emphasis> section</para>
1043
<para><link linkend="attribute-path_grouping_policy">
1044
<parameter>path_grouping_policy</parameter> </link></para>
1048
<para><link linkend="attribute-path_selector">
1049
<parameter>path_selector</parameter> </link></para>
1053
<para><link linkend="attribute-failback">
1054
<parameter>failback</parameter> </link></para>
1058
<para><link linkend="attribute-prio"> <parameter>prio</parameter>
1063
<para><link linkend="attribute-prio_args"><parameter>prio_args</parameter></link></para>
1067
<para><link linkend="attribute-no_path_retry">
1068
<parameter>no_path_retry</parameter> </link></para>
1072
<para><link linkend="attribute-rr_min_io">
1073
<parameter>rr_min_io</parameter> </link></para>
1077
<para><link linkend="attribute-rr_weight">
1078
<parameter>rr_weight</parameter> </link></para>
1082
<para><link linkend="attribute-flush_on_last_del">
1083
<parameter>flush_on_last_del</parameter> </link></para>
1087
<para>The following example shows multipath attributes specified in the
1088
configuration file for two specific multipath devices. The first device
1089
has a WWID of 3600508b4000156d70001200000b0000 and a symbolic name of
1092
<para>The second multipath device in the example has a WWID of
1093
1DEC_____321816758474 and a symbolic name of red. In this example, the
1094
<link linkend="attribute-rr_weight" role="bold">rr_weight</link>
1095
attributes is set to priorities.</para>
1100
wwid 3600508b4000156d70001200000b0000
1102
path_grouping_policy multibus
1103
path_selector "round-robin 0"
1105
rr_weight priorities
1109
wwid 1DEC_____321816758474
1111
rr_weight priorities
1117
<sect2 id="multipath-config-device">
1118
<title id="config-device-title">Configuration File Devices</title>
1120
<para>Table <xref endterm="device-attributes-table-title"
1121
linkend="multipath-device-attributes-table"/> shows the attributes that
1122
you can set for each individual storage device in the devices section of
1123
the multipath.conf configuration file. These attributes are used by
1124
DM-Multipath unless they are overwritten by the attributes specified in
1125
the <emphasis role="bold">multipaths</emphasis> section of the
1126
<filename>multipath.conf</filename> file for paths that contain the
1127
device. These attributes override the attributes set in the <emphasis
1128
role="bold">defaults</emphasis> section of the
1129
<filename>multipath.conf</filename> file.</para>
1131
<para>Many devices that support multipathing are included by default in
1132
a multipath configuration. The values for the devices that are supported
1133
by default are listed in the
1134
<filename>multipath.conf.defaults</filename> file. You probably will not
1135
need to modify the values for these devices, but if you do you can
1136
overwrite the default values by including an entry in the configuration
1137
file for the device that overwrites those values. You can copy the
1138
device configuration defaults from the
1139
<filename>multipath.conf.annotated.gz</filename> or if you wish to have
1140
a brief config file, <filename>multipath.conf.synthetic</filename> file
1141
for the device and override the values that you want to change.</para>
1143
<para>To add a device to this section of the configuration file that is
1144
not configured automatically by default, you must set the <emphasis
1145
role="bold">vendor</emphasis> and <emphasis
1146
role="bold">product</emphasis> parameters. You can find these values by
1147
looking at <emphasis
1148
role="bold">/sys/block/device_name/device/vendor</emphasis> and
1149
<emphasis role="bold">/sys/block/device_name/device/model</emphasis>
1150
where device_name is the device to be multipathed, as in the following
1154
# cat /sys/block/sda/device/vendor
1156
# cat /sys/block/sda/device/model
1160
<para>The additional parameters to specify depend on your specific
1161
device. If the device is active/active, you will usually not need to set
1162
additional parameters. You may want to set <link
1163
linkend="attribute-path_grouping_policy">path_grouping_policy</link> to
1164
<emphasis role="bold">multibus</emphasis>. Other parameters you may need
1165
to set are <link linkend="attribute-no_path_retry">no_path_retry</link>
1166
and <link linkend="attribute-rr_min_io">rr_min_io</link>, as described
1167
in Table <xref endterm="attributes-table-title"
1168
linkend="multipath-attributes-table"/>.</para>
1170
<para>If the device is active/passive, but it automatically switches
1171
paths with I/O to the passive path, you need to change the checker
1172
function to one that does not send I/O to the path to test if it is
1173
working (otherwise, your device will keep failing over). This almost
1174
always means that you set the <link
1175
linkend="attribute-path_checker">path_checker</link> to <emphasis
1176
role="bold">tur</emphasis>; this works for all SCSI devices that support
1177
the Test Unit Ready command, which most do.</para>
1179
<para>If the device needs a special command to switch paths, then
1180
configuring this device for multipath requires a hardware handler kernel
1181
module. The current available hardware handler is emc. If this is not
1182
sufficient for your device, you may not be able to configure the device
1183
for multipath.</para>
1185
<xi:include href="multipath-device-attributes-table.xml"
1186
xmlns:xi="http://www.w3.org/2001/XInclude"/>
1188
<para>In addition, the following parameters may be overridden in this
1189
<emphasis role="bold">device</emphasis> section</para>
1193
<para><link linkend="attribute-path_grouping_policy">
1194
<parameter>path_grouping_policy</parameter> </link></para>
1198
<para><link linkend="attribute-getuid_callout">
1199
<parameter>getuid_callout</parameter> </link></para>
1203
<para><link linkend="attribute-path_selector">
1204
<parameter>path_selector</parameter> </link></para>
1208
<para><link linkend="attribute-path_checker">
1209
<parameter>path_checker</parameter> </link></para>
1213
<para><link linkend="attribute-features">
1214
<parameter>features</parameter> </link></para>
1218
<para><link linkend="attribute-failback">
1219
<parameter>failback</parameter> </link></para>
1223
<para><link linkend="attribute-prio"> <parameter>prio</parameter>
1228
<para><link linkend="attribute-prio_args"><parameter>prio_args</parameter></link></para>
1232
<para><link linkend="attribute-no_path_retry">
1233
<parameter>no_path_retry</parameter> </link></para>
1237
<para><link linkend="attribute-rr_min_io">
1238
<parameter>rr_min_io</parameter> </link></para>
1242
<para><link linkend="attribute-rr_weight">
1243
<parameter>rr_weight</parameter> </link></para>
1247
<para><link linkend="attribute-fast_io_fail_tmo">
1248
<parameter>fast_io_fail_tmo</parameter> </link></para>
1252
<para><link linkend="attribute-dev_loss_tmo">
1253
<parameter>dev_loss_tmo</parameter> </link></para>
1257
<para><link linkend="attribute-flush_on_last_del">
1258
<parameter>flush_on_last_del</parameter> </link></para>
1263
<para>Whenever a hardware_handler is specified, it is your
1264
responsibility to ensure that the appropriate kernel module is loaded
1265
to support the specified interface. These modules can be found in
1266
<emphasis role="bold"><filename>/lib/modules/`uname
1267
-r`/kernel/drivers/scsi/device_handler/ </filename></emphasis>. The
1268
requisite module should be integrated into the initrd to ensure the
1269
necessary discovery and failover-failback capacity is available during
1270
boot time. Example,<screen># cat scsi_dh_alua >> /etc/initramfs-tools/modules ## append module to file
1271
# update-initramfs -u -k all</screen></para>
1274
<para>The following example shows a device entry in the multipath
1275
configuration file.</para>
1282
# product "MSA1000 "
1283
# path_grouping_policy multibus
1285
# rr_weight priorities
1290
<para>The spacing reserved in the <emphasis
1291
role="bold">vendor</emphasis>, <emphasis role="bold">product</emphasis>,
1292
and <emphasis role="bold">revision</emphasis> fields are significant as
1293
multipath is performing a direct match against these attributes, whose
1294
format is defined by the SCSI specification, specifically the <ulink
1295
url="http://en.wikipedia.org/wiki/SCSI_Inquiry_Command">Standard
1296
INQUIRY</ulink> command. When quotes are used, the vendor, product, and
1297
revision fields will be interpreted strictly according to the spec.
1298
Regular expressions may be integrated into the quoted strings. Should a
1299
field be defined without the requisite spacing, multipath will copy the
1300
string into the properly sized buffer and pad with the appropriate
1301
number of spaces. The specification expects the entire field to be
1302
populated by printable characters or spaces, as seen in the example
1307
<para>vendor: 8 characters</para>
1311
<para>product: 16 characters</para>
1315
<para>revision: 4 characters</para>
1319
<para>To create a more robust configuration file, regular expressions
1320
can also be used. Operators include <emphasis role="bold">^ $ [ ] . * ?
1321
+</emphasis>. Examples of functional regular expressions can be found by
1322
examining the live multipath database and <filename>multipath.conf
1323
</filename>example files found in
1324
<filename>/usr/share/doc/multipath-tools/examples:</filename></para>
1326
<para><screen># echo 'show config' | multipathd -k</screen></para>
1330
<sect1 id="multipath-admin-and-troubleshooting" status="done">
1331
<title>&DMM; Administration and Troubleshooting</title>
1333
<sect2 id="multipath-resize-an-online-multipath-device">
1334
<title>Resizing an Online Multipath Device</title>
1336
<para>If you need to resize an online multipath device, use the
1337
following procedure</para>
1341
<para>Resize your physical device. This is storage platform
1346
<para>Use the following command to find the paths to the LUN:</para>
1348
<screen># multipath -l</screen>
1352
<para>Resize your paths. For SCSI devices, writing 1 to the
1353
<filename>rescan</filename> file for the device causes the SCSI
1354
driver to rescan, as in the following command:</para>
1356
<screen># echo 1 > /sys/block/device_name/device/rescan</screen>
1360
<para>Resize your multipath device by running the multipathd resize
1363
<screen># multipathd -k 'resize map mpatha'</screen>
1367
<para>Resize the file system (assuming no LVM or DOS partitions are
1370
<screen># resize2fs /dev/mapper/mpatha</screen>
1375
<sect2 id="multipath-moving-rootfs-from-single-path-to-multipath-device">
1376
<title>Moving root File Systems from a Single Path Device to a Multipath
1379
<para>This is dramatically simplified by the use of UUIDs to identify
1380
devices as an intrinsic label. Simply install <emphasis
1381
role="bold">multipath-tools-boot</emphasis> and reboot. This will
1382
rebuild the initial ramdisk and afford multipath the opportunity to
1383
build it's paths before the root file system is mounted by UUID.</para>
1386
<para>Whenever <filename>multipath.conf</filename> is updated, so
1387
should the initrd by executing <command>update-initramfs -u -k
1388
all</command>. The reason being is <filename>multipath.conf</filename>
1389
is copied to the ramdisk and is integral to determining the available
1390
devices for grouping via it's blacklist and device sections.</para>
1394
<sect2 id="multipath-moving-swap-from-single-path-to-multipath-device">
1395
<title>Moving swap File Systems from a Single Path Device to a Multipath
1398
<para>The procedure is exactly the same as illustrated in the previous
1399
section called <link
1400
linkend="multipath-moving-rootfs-from-single-path-to-multipath-device">Moving
1401
root File Systems from a Single Path to a Multipath
1402
Device</link>.</para>
1405
<sect2 id="multipath-daemon-multipathd">
1406
<title>The Multipath Daemon</title>
1408
<para>If you find you have trouble implementing a multipath
1409
configuration, you should ensure the multipath daemon is running as
1410
described in <link linkend="multipath-setting-up-dm-multipath">"Setting
1411
up DM-Multipath"</link>. The &multipathd_c; daemon must be running in
1412
order to use multipathd devices. Also see section <link
1413
linkend="multipath-interacting-with-multipathd">Troubleshooting with the
1414
multipathd interactive console</link> concerning interacting with
1415
&multipathd_c; as a debugging aid.</para>
1418
<!--Removing this whole section for now as I think we depend
1419
on the udev scripts for simple discovery in the initramfs
1420
so by following these suggestions you would not get any mp
1421
devices on boot. We'll need a new solution for our infrastructure -->
1424
<sect2 id="multipath-large-number-of-luns-issue">
1425
<title>Issues with Large Number of LUNs</title>
1427
<para>When a large number of LUNs are added to a node, using multipathed
1428
devices can significantly increase the time it takes for the &udev_c;
1429
device manager to create device nodes for them. If you experience this
1430
problem, you can correct it by deleting the following line in
1431
<filename>/etc/udev/rules.d/40-multipath.rules</filename>: <emphasis
1432
role="bold">XXX VERIFY!</emphasis></para>
1434
<screen>KERNEL!="dm-[0-9]*", ACTION=="add", PROGRAM=="/bin/bash -c '/sbin/lsmod | /bin/grep ^dm_multipath'", RUN+="/sbin/multipath -v0 %M:%m"</screen>
1436
<para>This line causes the &udev_c; device manager to run &multipath_c;
1437
every time a block device is added to the node. Even with this line
1438
removed, the &multipathd_c; daemon will still automatically create
1439
multipathed devices, and &multipath_c; will still be called during the
1440
boot process for nodes with mutipathed root file systems. The only
1441
change is that multipathed devices will not be automatically created
1442
when the multipathd daemon is not running, which should not be a problem
1443
for the vast majority of multipath user.</para>
1447
<sect2 id="multipath-issues-with-queue_if_no_path">
1448
<title>Issues with queue_if_no_path</title>
1450
<para>If <emphasis role="bold">features "1 queue_if_no_path"</emphasis>
1451
is specified in the <filename>/etc/multipath.conf</filename> file, then
1452
any process that uses I/O will hang until one or more paths are
1453
restored. To avoid this, set the <emphasis role="bold"><link
1454
linkend="attribute-no_path_retry">no_path_retry</link> N</emphasis>
1455
parameter in the <filename>/etc/multipath.conf</filename>.</para>
1457
<para>When you set the <emphasis role="bold">no_path_retry</emphasis>
1458
parameter, remove the <emphasis role="bold">features "1
1459
queue_if_no_path"</emphasis> option from the
1460
<filename>/etc/multipath.conf</filename> file as well. If, however, you
1461
are using a multipathed device for which the <option>features "1
1462
queue_if_no_path"</option> option is set as a compiled in default, as it
1463
is for many SAN devices, you must add <option>features "0"</option> to
1464
override this default. You can do this by copying the existing <emphasis
1465
role="bold">devices</emphasis> section, and just that section (not the
1467
<filename>/usr/share/doc/multipath-tools/examples/multipath.conf.annotated.gz</filename>
1468
into <filename>/etc/multipath.conf</filename> and editing to suit your
1471
<para>If you need to use the <option>features "1
1472
queue_if_no_path"</option> option and you experience the issue noted
1473
here, use the <command>dmsetup</command> command to edit the policy at
1474
runtime for a particular LUN (that is, for which all the paths are
1475
unavailable). For example, if you want to change the policy on the
1476
multipath device <filename>mpathc</filename> from
1477
<option>"queue_if_no_path"</option> to <option>
1478
"fail_if_no_path"</option>, execute the following command.</para>
1480
<screen># dmsetup message mpathc 0 "fail_if_no_path"</screen>
1483
<para>You must specify the <filename>mpathN</filename> alias rather
1484
than the path</para>
1488
<sect2 id="multipath-command-output">
1489
<title>Multipath Command Output</title>
1491
<para>When you create, modify, or list a multipath device, you get a
1492
printout of the current device setup. The format is as follows. For each
1493
multipath device:</para>
1495
<screen> action_if_any: alias (wwid_if_different_from_alias) dm_device_name_if_known vendor,product
1496
size=size features='features' hwhandler='hardware_handler' wp=write_permission_if_known</screen>
1498
<para>For each path group:</para>
1500
<screen> -+- policy='scheduling_policy' prio=prio_if_known
1501
status=path_group_status_if_known</screen>
1503
<para>For each path:</para>
1505
<screen> `- host:channel:id:lun devnode major:minor dm_status_if_known path_status
1506
online_status</screen>
1508
<para>For example, the output of a multipath command might appear as
1511
<screen> 3600d0230000000000e13955cc3757800 dm-1 WINSYS,SF2372
1512
size=269G features='0' hwhandler='0' wp=rw
1513
|-+- policy='round-robin 0' prio=1 status=active
1514
| `- 6:0:0:0 sdb 8:16 active ready running
1515
`-+- policy='round-robin 0' prio=1 status=enabled
1516
`- 7:0:0:0 sdf 8:80 active ready running</screen>
1518
<para>If the path is up and ready for I/O, the status of the path is
1519
<emphasis role="bold">ready</emphasis> or <emphasis
1520
role="emphasis">ghost</emphasis>. If the path is down, the status is
1521
<emphasis role="bold">faulty</emphasis> or <emphasis
1522
role="bold">shaky</emphasis>. The path status is updated periodically by
1523
the &multipathd_c; daemon based on the polling interval defined in the
1524
<filename>/etc/multipath.conf</filename> file.</para>
1526
<para>The dm status is similar to the path status, but from the kernel's
1527
point of view. The dm status has two states: <emphasis
1528
role="bold">failed</emphasis>, which is analogous to <emphasis
1529
role="bold">faulty</emphasis>, and <emphasis
1530
role="bold">active</emphasis> which covers all other path states.
1531
Occasionally, the path state and the dm state of a device will
1532
temporarily not agree.</para>
1534
<para>The possible values for <emphasis
1535
role="bold">online_status</emphasis> are <emphasis
1536
role="bold">running</emphasis> and <emphasis
1537
role="bold">offline</emphasis>. A status of <emphasis
1538
role="emphasis">offline</emphasis> means that the SCSI device has been
1542
<para>When a multipath device is being created or modified , the path
1543
group status, the dm device name, the write permissions, and the dm
1544
status are not known. Also, the features are not always correct</para>
1548
<sect2 id="multipath-queries-and-commands">
1549
<title>Multipath Queries with multipath Command</title>
1551
<para>You can use the <emphasis role="bold">-l </emphasis>and <emphasis
1552
role="bold">-ll</emphasis> options of the <emphasis
1553
role="bold">multipath</emphasis> command to display the current
1554
multipath configuration. The <emphasis role="bold">-l</emphasis> option
1555
displays multipath topology gathered from information in sysfs and the
1556
device mapper. The <emphasis role="bold">-ll</emphasis> option displays
1557
the information the <emphasis role="bold">-l</emphasis> displays in
1558
addition to all other available components of the system.</para>
1560
<para>When displaying the multipath configuration, there are three
1561
verbosity levels you can specify with the <emphasis
1562
role="bold">-v</emphasis> option of the multipath command. Specifying
1563
<emphasis role="bold">-v0</emphasis> yields no output.
1564
Specifying<emphasis role="bold"> -v1</emphasis> outputs the created or
1565
updated multipath names only, which you can then feed to other tools
1566
such as kpartx. Specifying <emphasis role="bold">-v2</emphasis> prints
1567
all detected paths, multipaths, and device maps.</para>
1570
<para>The default <emphasis role="bold">verbosity</emphasis> level of
1571
multipath is <emphasis role="bold">2</emphasis> and can be globally
1572
modified by defining the <link linkend="attribute-verbosity">verbosity
1573
attribute</link> in the <emphasis role="bold">defaults</emphasis>
1574
section of <filename>multipath.conf</filename>.</para>
1577
<para>The following example shows the output of a <emphasis
1578
role="bold">multipath -l</emphasis> command.</para>
1580
<screen># multipath -l
1581
3600d0230000000000e13955cc3757800 dm-1 WINSYS,SF2372
1582
size=269G features='0' hwhandler='0' wp=rw
1583
|-+- policy='round-robin 0' prio=1 status=active
1584
| `- 6:0:0:0 sdb 8:16 active ready running
1585
`-+- policy='round-robin 0' prio=1 status=enabled
1586
`- 7:0:0:0 sdf 8:80 active ready running</screen>
1588
<para>The following example shows the output of a <emphasis
1589
role="bold">multipath -ll</emphasis> command.</para>
1591
<screen># multipath -ll
1592
3600d0230000000000e13955cc3757801 dm-10 WINSYS,SF2372
1593
size=269G features='0' hwhandler='0' wp=rw
1594
|-+- policy='round-robin 0' prio=1 status=enabled
1595
| `- 19:0:0:1 sdc 8:32 active ready running
1596
`-+- policy='round-robin 0' prio=1 status=enabled
1597
`- 18:0:0:1 sdh 8:112 active ready running
1598
3600d0230000000000e13955cc3757803 dm-2 WINSYS,SF2372
1599
size=125G features='0' hwhandler='0' wp=rw
1600
`-+- policy='round-robin 0' prio=1 status=active
1601
|- 19:0:0:3 sde 8:64 active ready running
1602
`- 18:0:0:3 sdj 8:144 active ready running</screen>
1605
<sect2 id="multipath-command-options">
1606
<title>Multipath Command Options</title>
1608
<para>Table <link linkend="useful-multipath-command-options">"Useful
1609
multipath Command Options"</link> describes some options of the
1610
<emphasis role="bold">multipath</emphasis> command that you find
1614
<title id="useful-multipath-command-options">Useful multipath Command
1618
<colspec colname="c1" colwidth="1.5*"/>
1619
<colspec colname="c2" colwidth="3.6*"/>
1623
<entry align="left">Option</entry>
1624
<entry align="left">Description</entry>
1630
<entry align="left"><emphasis role="bold">-l</emphasis></entry>
1631
<entry>Display the current multipath configuration gathered from
1632
<emphasis role="bold">sysfs</emphasis> and the device
1637
<entry align="left"><emphasis role="bold">-ll</emphasis></entry>
1638
<entry>Display the current multipath configuration gathered from
1639
<emphasis role="bold">sysfs</emphasis>, the device mapper, and
1640
all other available components on the system.</entry>
1644
<entry align="left"><emphasis role="bold">-f device</emphasis></entry>
1645
<entry>Remove the named multipath device.</entry>
1649
<entry align="left"><emphasis role="bold">-F</emphasis></entry>
1650
<entry>Remove all unused multipath devices.</entry>
1657
<sect2 id="device-mapper-entries-in-dmsetup">
1658
<title>Determining Device Mapper Entries with dmsetup Command</title>
1660
<para>You can use the <emphasis role="bold">dmsetup</emphasis> command
1661
to find out which device mapper entries match the <emphasis
1662
role="bold">multipathed</emphasis> devices.</para>
1664
<para>The following command displays all the device mapper devices and
1665
their major and minor numbers. The minor numbers determine the name of
1666
the dm device. For example, a minor number of <emphasis
1667
role="bold">3</emphasis> corresponds to the multipathed device <emphasis
1668
role="bold"><filename>/dev/dm-3</filename></emphasis>.</para>
1681
VolGroup00-LogVol01 (253, 1)
1683
VolGroup00-LogVol00 (253, 0)
1690
<sect2 id="multipath-interacting-with-multipathd">
1691
<title>Troubleshooting with the multipathd interactive console</title>
1693
<para>The <emphasis role="bold">multipathd -k</emphasis> command is an
1694
interactive interface to the <emphasis role="bold">multipathd</emphasis>
1695
daemon. Entering this command brings up an interactive multipath
1696
console. After entering this command, you can enter help to get a list
1697
of available commands, you can enter a interactive command, or you can
1698
enter <emphasis role="bold">CTRL-D</emphasis> to quit.</para>
1700
<para>The multipathd interactive console can be used to troubleshoot
1701
problems you may be having with your system. For example, the following
1702
command sequence displays the multipath configuration, including the
1703
defaults, before exiting the console. See the IBM article <ulink
1704
url="http://www-01.ibm.com/support/docview.wss?uid=isg3T1011985">"Tricks
1705
with Multipathd"</ulink> for more examples.</para>
1707
<screen># multipathd -k
1708
> > show config
1709
> > CTRL-D</screen>
1711
<para>The following command sequence ensures that multipath has picked
1712
up any changes to the multipath.conf,</para>
1716
> > reconfigure
1720
<para>Use the following command sequence to ensure that the path checker
1721
is working properly.</para>
1725
> > show paths
1729
<para>Commands can also be streamed into multipathd using stdin like
1730
so:<screen># echo 'show config' | multipathd -k</screen></para>
1734
<!-- end of entire chapter -->
1737
# vim: set ts=2 sw=2 expandtab: