summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarian Csontos <mcsontos@redhat.com>2019-01-03 13:49:08 +0100
committerMarian Csontos <mcsontos@redhat.com>2021-05-19 09:54:54 +0200
commita0abac99657854d43e48f08aa6b7792302672956 (patch)
treed57864e7285a5dcdc053ae4e6727ebb093b07817
parent3c93b7585f622e31c3f4880fa230a8dfcd4dcafd (diff)
downloadlvm2-a0abac99657854d43e48f08aa6b7792302672956.tar.gz
lvm2: set default preferred_names
-rw-r--r--conf/example.conf.in5
-rw-r--r--lib/config/config_settings.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/conf/example.conf.in b/conf/example.conf.in
index b4a55ae6a..aaf73a4f9 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -121,8 +121,9 @@ devices {
#
# Example
# preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
- #
- # This configuration option does not have a default value defined.
+ #
+ # This configuration option has an automatic default value.
+ # preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
# Configuration option devices/use_devicesfile.
# Enable or disable the use of a devices file.
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index d3a42a153..f5dac4d1e 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -269,7 +269,7 @@ cfg(devices_hints_CFG, "hints", devices_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_
" Use no hints.\n"
"#\n")
-cfg_array(devices_preferred_names_CFG, "preferred_names", devices_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED , CFG_TYPE_STRING, NULL, vsn(1, 2, 19), NULL, 0, NULL,
+cfg_array(devices_preferred_names_CFG, "preferred_names", devices_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, "#S^/dev/mpath/#S^/dev/mapper/mpath#S^/dev/[hs]d", vsn(1, 2, 19), NULL, 0, NULL,
"Select which path name to display for a block device.\n"
"If multiple path names exist for a block device, and LVM needs to\n"
"display a name for the device, the path names are matched against\n"