lvm2/lvm2-set-default-preferred_names.patch

38 lines
1.7 KiB
Diff
Raw Normal View History

2019-07-30 14:33:40 +00:00
conf/example.conf.in | 7 ++++---
2015-07-01 07:10:41 +00:00
lib/config/config_settings.h | 2 +-
2019-07-30 14:33:40 +00:00
2 files changed, 5 insertions(+), 4 deletions(-)
2015-05-04 12:47:56 +00:00
diff --git a/conf/example.conf.in b/conf/example.conf.in
2019-07-30 14:33:40 +00:00
index a5eba01..8fa126b 100644
2015-05-04 12:47:56 +00:00
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
2019-07-30 14:33:40 +00:00
@@ -118,11 +118,12 @@ devices {
# Prefer the name with the least number of slashes.
# Prefer a name that is a symlink.
# Prefer the path with least value in lexicographical order.
- #
- # Example
+ #
+ # Example:
2015-05-04 12:47:56 +00:00
# preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
2015-08-27 08:24:34 +00:00
#
2015-07-01 07:10:41 +00:00
- # This configuration option does not have a default value defined.
2019-07-30 14:33:40 +00:00
+ # This configuration option has an automatic default value.
+ # preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
2015-05-04 12:47:56 +00:00
# Configuration option devices/filter.
# Limit the block devices that are used by LVM commands.
2015-07-01 07:10:41 +00:00
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
2019-07-30 14:33:40 +00:00
index efa86e7..b3b6c77 100644
2015-07-01 07:10:41 +00:00
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
2019-07-30 14:33:40 +00:00
@@ -269,7 +269,7 @@ cfg(devices_hints_CFG, "hints", devices_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_
" Use no hints.\n"
2015-08-27 08:24:34 +00:00
"#\n")
2015-07-01 07:10:41 +00:00
-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_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"
2015-08-27 08:24:34 +00:00
"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"