mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-24 14:50:34 +03:00
conf: add report/{vgs,pvs,lvs,pvsegs,segs}_{cols,sort}_full config settings
This commit is contained in:
parent
26c43c6ce5
commit
9c37b7ed7c
@ -1,5 +1,6 @@
|
||||
Version 2.02.158 -
|
||||
=================================
|
||||
Add report/{pvs,vgs,lvs,pvsegs,segs}_{cols,sort}_full to lvm.conf.
|
||||
Add lvm fullreport command for joined PV, VG, LV and segment report per VG.
|
||||
Integrate report group handling and cmd log report into cmd processing code.
|
||||
Add log/report_command_log to lvm.conf to enable or disable cmd log report.
|
||||
|
@ -1900,6 +1900,66 @@ activation {
|
||||
# This configuration option has an automatic default value.
|
||||
# pvsegs_cols_verbose = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size,lv_name,seg_start_pe,segtype,seg_pe_ranges"
|
||||
|
||||
# Configuration option report/vgs_cols_full.
|
||||
# List of columns to report for lvm fullreport's 'vgs' subreport.
|
||||
# See 'vgs -o help' for the list of possible fields.
|
||||
# This configuration option has an automatic default value.
|
||||
# vgs_cols_full = "vg_all"
|
||||
|
||||
# Configuration option report/pvs_cols_full.
|
||||
# List of columns to report for lvm fullreport's 'vgs' subreport.
|
||||
# See 'pvs -o help' for the list of possible fields.
|
||||
# This configuration option has an automatic default value.
|
||||
# pvs_cols_full = "pv_all"
|
||||
|
||||
# Configuration option report/lvs_cols_full.
|
||||
# List of columns to report for lvm fullreport's 'lvs' subreport.
|
||||
# See 'lvs -o help' for the list of possible fields.
|
||||
# This configuration option has an automatic default value.
|
||||
# lvs_cols_full = "lv_all"
|
||||
|
||||
# Configuration option report/pvsegs_cols_full.
|
||||
# List of columns to report for lvm fullreport's 'pvseg' subreport.
|
||||
# See 'pvs --segments -o help' for the list of possible fields.
|
||||
# This configuration option has an automatic default value.
|
||||
# pvsegs_cols_full = "pvseg_all,pv_uuid,lv_uuid"
|
||||
|
||||
# Configuration option report/segs_cols_full.
|
||||
# List of columns to report for lvm fullreport's 'seg' subreport.
|
||||
# See 'lvs --segments -o help' for the list of possible fields.
|
||||
# This configuration option has an automatic default value.
|
||||
# segs_cols_full = "seg_all,lv_uuid"
|
||||
|
||||
# Configuration option report/vgs_sort_full.
|
||||
# List of columns to sort by when reporting lvm fullreport's 'vgs' subreport.
|
||||
# See 'vgs -o help' for the list of possible fields.
|
||||
# This configuration option has an automatic default value.
|
||||
# vgs_sort_full = "vg_name"
|
||||
|
||||
# Configuration option report/pvs_sort_full.
|
||||
# List of columns to sort by when reporting lvm fullreport's 'vgs' subreport.
|
||||
# See 'pvs -o help' for the list of possible fields.
|
||||
# This configuration option has an automatic default value.
|
||||
# pvs_sort_full = "pv_name"
|
||||
|
||||
# Configuration option report/lvs_sort_full.
|
||||
# List of columns to sort by when reporting lvm fullreport's 'lvs' subreport.
|
||||
# See 'lvs -o help' for the list of possible fields.
|
||||
# This configuration option has an automatic default value.
|
||||
# lvs_sort_full = "vg_name,lv_name"
|
||||
|
||||
# Configuration option report/pvsegs_sort_full.
|
||||
# List of columns to sort by when reporting for lvm fullreport's 'pvseg' subreport.
|
||||
# See 'pvs --segments -o help' for the list of possible fields.
|
||||
# This configuration option has an automatic default value.
|
||||
# pvsegs_sort_full = "pv_uuid,pvseg_start"
|
||||
|
||||
# Configuration option report/segs_sort_full.
|
||||
# List of columns to sort by when reporting lvm fullreport's 'seg' subreport.
|
||||
# See 'lvs --segments -o help' for the list of possible fields.
|
||||
# This configuration option has an automatic default value.
|
||||
# segs_sort_full = "lv_uuid,seg_start"
|
||||
|
||||
# Configuration option report/mark_hidden_devices.
|
||||
# Use brackets [] to mark hidden devices.
|
||||
# This configuration option has an automatic default value.
|
||||
|
@ -1743,6 +1743,46 @@ cfg(report_pvsegs_cols_verbose_CFG, "pvsegs_cols_verbose", report_CFG_SECTION, C
|
||||
"List of columns to sort by when reporting 'pvs --segments' command in verbose mode.\n"
|
||||
"See 'pvs --segments -o help' for the list of possible fields.\n")
|
||||
|
||||
cfg(report_vgs_cols_full_CFG, "vgs_cols_full", report_CFG_SECTION, CFG_PROFILABLE | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_VGS_COLS_FULL, vsn(2, 2, 158), NULL, 0, NULL,
|
||||
"List of columns to report for lvm fullreport's 'vgs' subreport.\n"
|
||||
"See 'vgs -o help' for the list of possible fields.\n")
|
||||
|
||||
cfg(report_pvs_cols_full_CFG, "pvs_cols_full", report_CFG_SECTION, CFG_PROFILABLE | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_PVS_COLS_FULL, vsn(2, 2, 158), NULL, 0, NULL,
|
||||
"List of columns to report for lvm fullreport's 'vgs' subreport.\n"
|
||||
"See 'pvs -o help' for the list of possible fields.\n")
|
||||
|
||||
cfg(report_lvs_cols_full_CFG, "lvs_cols_full", report_CFG_SECTION, CFG_PROFILABLE | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_LVS_COLS_FULL, vsn(2, 2, 158), NULL, 0, NULL,
|
||||
"List of columns to report for lvm fullreport's 'lvs' subreport.\n"
|
||||
"See 'lvs -o help' for the list of possible fields.\n")
|
||||
|
||||
cfg(report_pvsegs_cols_full_CFG, "pvsegs_cols_full", report_CFG_SECTION, CFG_PROFILABLE | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_PVSEGS_COLS_FULL, vsn(2, 2, 158), NULL, 0, NULL,
|
||||
"List of columns to report for lvm fullreport's 'pvseg' subreport.\n"
|
||||
"See 'pvs --segments -o help' for the list of possible fields.\n")
|
||||
|
||||
cfg(report_segs_cols_full_CFG, "segs_cols_full", report_CFG_SECTION, CFG_PROFILABLE | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_SEGS_COLS_FULL, vsn(2, 2, 158), NULL, 0, NULL,
|
||||
"List of columns to report for lvm fullreport's 'seg' subreport.\n"
|
||||
"See 'lvs --segments -o help' for the list of possible fields.\n")
|
||||
|
||||
cfg(report_vgs_sort_full_CFG, "vgs_sort_full", report_CFG_SECTION, CFG_PROFILABLE | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_VGS_SORT_FULL, vsn(2, 2, 158), NULL, 0, NULL,
|
||||
"List of columns to sort by when reporting lvm fullreport's 'vgs' subreport.\n"
|
||||
"See 'vgs -o help' for the list of possible fields.\n")
|
||||
|
||||
cfg(report_pvs_sort_full_CFG, "pvs_sort_full", report_CFG_SECTION, CFG_PROFILABLE | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_PVS_SORT_FULL, vsn(2, 2, 158), NULL, 0, NULL,
|
||||
"List of columns to sort by when reporting lvm fullreport's 'vgs' subreport.\n"
|
||||
"See 'pvs -o help' for the list of possible fields.\n")
|
||||
|
||||
cfg(report_lvs_sort_full_CFG, "lvs_sort_full", report_CFG_SECTION, CFG_PROFILABLE | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_LVS_SORT_FULL, vsn(2, 2, 158), NULL, 0, NULL,
|
||||
"List of columns to sort by when reporting lvm fullreport's 'lvs' subreport.\n"
|
||||
"See 'lvs -o help' for the list of possible fields.\n")
|
||||
|
||||
cfg(report_pvsegs_sort_full_CFG, "pvsegs_sort_full", report_CFG_SECTION, CFG_PROFILABLE | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_PVSEGS_SORT_FULL, vsn(2, 2, 158), NULL, 0, NULL,
|
||||
"List of columns to sort by when reporting for lvm fullreport's 'pvseg' subreport.\n"
|
||||
"See 'pvs --segments -o help' for the list of possible fields.\n")
|
||||
|
||||
cfg(report_segs_sort_full_CFG, "segs_sort_full", report_CFG_SECTION, CFG_PROFILABLE | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_SEGS_SORT_FULL, vsn(2, 2, 158), NULL, 0, NULL,
|
||||
"List of columns to sort by when reporting lvm fullreport's 'seg' subreport.\n"
|
||||
"See 'lvs --segments -o help' for the list of possible fields.\n")
|
||||
|
||||
cfg(report_mark_hidden_devices_CFG, "mark_hidden_devices", report_CFG_SECTION, CFG_PROFILABLE | CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, 1, vsn(2, 2, 140), NULL, 0, NULL,
|
||||
"Use brackets [] to mark hidden devices.\n")
|
||||
|
||||
|
@ -1055,11 +1055,11 @@ out:
|
||||
return r;
|
||||
}
|
||||
|
||||
#define _set_full_report_single(args,type,name) \
|
||||
#define _set_full_report_single(cmd,args,type,name) \
|
||||
do { \
|
||||
args->single_args[REPORT_IDX_FULL_ ## type].report_type = type; \
|
||||
args->single_args[REPORT_IDX_FULL_ ## type].keys = DEFAULT_ ## type ## _SORT_FULL; \
|
||||
args->single_args[REPORT_IDX_FULL_ ## type].options = DEFAULT_ ## type ## _COLS_FULL; \
|
||||
args->single_args[REPORT_IDX_FULL_ ## type].keys = find_config_tree_str(cmd, report_ ## name ## _sort_full_CFG, NULL); \
|
||||
args->single_args[REPORT_IDX_FULL_ ## type].options = find_config_tree_str(cmd, report_ ## name ## _cols_full_CFG, NULL); \
|
||||
if (!_set_report_prefix_and_name(&args->single_args[REPORT_IDX_FULL_ ## type])) \
|
||||
return_0; \
|
||||
} while (0)
|
||||
@ -1125,11 +1125,11 @@ static int _config_report(struct cmd_context *cmd, struct report_args *args, str
|
||||
single_args->options = find_config_tree_str(cmd, report_pvsegs_cols_verbose_CFG, NULL);
|
||||
break;
|
||||
case FULL:
|
||||
_set_full_report_single(args, VGS, vgs);
|
||||
_set_full_report_single(args, LVS, lvs);
|
||||
_set_full_report_single(args, PVS, pvs);
|
||||
_set_full_report_single(args, PVSEGS, pvsegs);
|
||||
_set_full_report_single(args, SEGS, segs);
|
||||
_set_full_report_single(cmd, args, VGS, vgs);
|
||||
_set_full_report_single(cmd, args, LVS, lvs);
|
||||
_set_full_report_single(cmd, args, PVS, pvs);
|
||||
_set_full_report_single(cmd, args, PVSEGS, pvsegs);
|
||||
_set_full_report_single(cmd, args, SEGS, segs);
|
||||
break;
|
||||
case CMDLOG:
|
||||
single_args->keys = find_config_tree_str(cmd, log_command_log_sort_CFG, NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user