]> sourceware.org Git - lvm2.git/commitdiff
Fix default preferred_names filter to use /dev/mapper/mpath devices.
authorDave Wysochanski <dwysocha@redhat.com>
Mon, 4 Feb 2008 20:26:14 +0000 (20:26 +0000)
committerDave Wysochanski <dwysocha@redhat.com>
Mon, 4 Feb 2008 20:26:14 +0000 (20:26 +0000)
If these devices exist, we should be using them for multipath rather than any
underlying device names.
Reference: http://kbase.redhat.com/faq/FAQ_96_11196.shtma
bz195685

doc/example.conf
man/lvm.conf.5

index d8cba0e0aa133c15d54f5da47aeb1d5b9fea12b6..73b69a97a7940b8e44a01d29f707e9e241d25dec 100644 (file)
@@ -23,9 +23,11 @@ devices {
     # same block device and the tools need to display a name for device,
     # all the pathnames are matched against each item in the following
     # list of regular expressions in turn and the first match is used.
-    preferred_names = [ ]
+    # If device-mapper multipath is used, we should always use the mpath
+    # devices rather than the underlying paths.
+    preferred_names = [ "^/dev/mapper/mpath" ]
 
-    # preferred_names = [ "^/dev/mpath/", "^/dev/[hs]d" ]
+    # preferred_names = [ "^/dev/mapper/mpath", "^/dev/[hs]d" ]
 
     # A filter that tells LVM2 to only use a restricted set of devices.
     # The filter consists of an array of regular expressions.  These
index c67ce94bc541b689294d96d7fd4c30daefdfe7e6..aa92da975e91a81468406695847adf5e81d997bc 100644 (file)
@@ -84,7 +84,10 @@ Defaults to "/dev".
 \fBpreferred_names\fP \(em List of patterns compared in turn against
 all the pathnames referencing the same device in in the scanned directories.
 The pathname that matches the earliest pattern in the list is the
-one used in any output.
+one used in any output.  As an example, if device mapper multipathing
+is used, the following will select multipath device names:
+.br
+\fBdevices { preferred_names = [ "^/dev/mapper/mpath" ] }\fP
 .IP
 \fBfilter\fP \(em List of patterns to apply to devices found by a scan.
 Patterns are regular expressions delimited by any character and preceded
@@ -98,6 +101,7 @@ in /dev), if any name matches any \fBa\fP pattern, the
 device is accepted; otherwise if any name matches any \fBr\fP
 pattern it is rejected; otherwise it is accepted.
 As an example, to ignore /dev/cdrom you could use:
+.br
 \fBdevices { filter=["r|cdrom|"] }\fP 
 .IP
 \fBcache_dir\fP \(em Persistent filter cache file directory.
This page took 0.031004 seconds and 5 git commands to generate.