mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
conf: add metadata/record_lvs_history configuration setting
The metadata/record_lvs_history is global switch which enables or disables recording historical LVs in metadata. If both metadata/record_lvs_history=1 lvm.conf option and --nohistory command switch is used at the same time, the --nohistory prevails.
This commit is contained in:
parent
b1399090cd
commit
ccebf3100d
@ -1360,6 +1360,13 @@ cfg(metadata_check_pv_device_sizes_CFG, "check_pv_device_sizes", metadata_CFG_SE
|
||||
"less than corresponding PV size. You should not disable this unless\n"
|
||||
"you are absolutely sure about what you are doing!\n")
|
||||
|
||||
cfg(metadata_record_lvs_history_CFG, "record_lvs_history", metadata_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, DEFAULT_RECORD_LVS_HISTORY, vsn(2, 2, 145), NULL, 0, NULL,
|
||||
"When enabled, LVM keeps history records about removed LVs in\n"
|
||||
"metadata. The information that is recorded in metadata for\n"
|
||||
"historical LVs is reduced when compared to original\n"
|
||||
"information kept in metadata for live LVs. Currently, this\n"
|
||||
"feature is supported for thin and thin snapshot LVs only.\n")
|
||||
|
||||
cfg(metadata_pvmetadatacopies_CFG, "pvmetadatacopies", metadata_CFG_SECTION, CFG_ADVANCED | CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_PVMETADATACOPIES, vsn(1, 0, 0), NULL, 0, NULL,
|
||||
"Number of copies of metadata to store on each PV.\n"
|
||||
"The --pvmetadatacopies option overrides this setting.\n"
|
||||
|
@ -128,6 +128,7 @@
|
||||
#define DEFAULT_FORMAT "lvm2"
|
||||
|
||||
#define DEFAULT_STRIPESIZE 64 /* KB */
|
||||
#define DEFAULT_RECORD_LVS_HISTORY 0
|
||||
#define DEFAULT_PVMETADATAIGNORE 0
|
||||
#define DEFAULT_PVMETADATASIZE 255
|
||||
#define DEFAULT_PVMETADATACOPIES 1
|
||||
|
@ -1102,8 +1102,8 @@ static int _get_settings(struct cmd_context *cmd)
|
||||
cmd->include_foreign_vgs = arg_is_set(cmd, foreign_ARG) ? 1 : 0;
|
||||
cmd->include_shared_vgs = arg_is_set(cmd, shared_ARG) ? 1 : 0;
|
||||
cmd->include_historical_lvs = arg_is_set(cmd, history_ARG) ? 1 : 0;
|
||||
cmd->include_historical_lvs = arg_is_set(cmd, history_ARG) ? 1 : 0;
|
||||
cmd->record_historical_lvs = arg_is_set(cmd, nohistory_ARG) ? 0 : 1;
|
||||
cmd->record_historical_lvs = find_config_tree_bool(cmd, metadata_record_lvs_history_CFG, NULL) ?
|
||||
(arg_is_set(cmd, nohistory_ARG) ? 0 : 1) : 0;
|
||||
|
||||
/*
|
||||
* This is set to zero by process_each which wants to print errors
|
||||
|
Loading…
Reference in New Issue
Block a user