diff options
author | David Teigland <teigland@redhat.com> | 2018-12-07 14:35:22 -0600 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2019-01-15 10:23:47 -0600 |
commit | 6620dc9475d55207bfcd5e666f0379bcdf11831a (patch) | |
tree | a0bc324a818ff3cd99f38de51ccac3df2c5a4cc0 /lib/config | |
parent | 81b3b71dae7775c93adebdea60308e11057a4ee8 (diff) | |
download | lvm2-6620dc9475d55207bfcd5e666f0379bcdf11831a.tar.gz |
add device hints to reduce scanning
Save the list of PVs in /run/lvm/hints. These hints
are used to reduce scanning in a number of commands
to only the PVs on the system, or only the PVs in a
requested VG (rather than all devices on the system.)
Diffstat (limited to 'lib/config')
-rw-r--r-- | lib/config/config_settings.h | 14 | ||||
-rw-r--r-- | lib/config/defaults.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h index f1d282645..e15494d5b 100644 --- a/lib/config/config_settings.h +++ b/lib/config/config_settings.h @@ -255,6 +255,20 @@ cfg(devices_external_device_info_source_CFG, "external_device_info_source", devi " compiled with udev support.\n" "#\n") +cfg(devices_hints_CFG, "hints", devices_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_HINTS, vsn(2, 3, 2), NULL, 0, NULL, + "Use a local file to remember which devices have PVs on them.\n" + "Some commands will use this as an optimization to reduce device\n" + "scanning, and will only scan the listed PVs. Removing the hint file\n" + "will cause lvm to generate a new one. Disable hints if PVs will\n" + "be copied onto devices using non-lvm commands, like dd.\n" + "#\n" + "Accepted values:\n" + " all\n" + " Use all hints.\n" + " none\n" + " 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, "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" diff --git a/lib/config/defaults.h b/lib/config/defaults.h index b45324b09..06a5ecf16 100644 --- a/lib/config/defaults.h +++ b/lib/config/defaults.h @@ -312,4 +312,6 @@ #define DEFAULT_SCAN_LVS 1 +#define DEFAULT_HINTS "all" + #endif /* _LVM_DEFAULTS_H */ |