mirror of
git://sourceware.org/git/lvm2.git
synced 2024-10-27 18:55:19 +03:00
man/help: poolmetadatasize option can take relative value
In lvcreate/lvconvert, --poolmetdatasize can only be an absolute value, but in lvresize/lvextend, --poolmetadatasize can be given a + relative value. The val types only currently support relative values that go in both directions +|-. Further work is needed to add val types that can be relative in only one direction, and switching various option values to one those depending on the command name. Then poolmetdatasize will not appear with a +|- option in lvcreate/lvconvert, and will appear with only the + option in lvresize/lvextend.
This commit is contained in:
parent
c5b6c9ad44
commit
b6c4b7cfb0
11
tools/args.h
11
tools/args.h
@ -414,8 +414,15 @@ arg(pooldatasize_ARG, '\0', "pooldatasize", sizemb_VAL, 0, 0, NULL)
|
||||
arg(poolmetadata_ARG, '\0', "poolmetadata", lv_VAL, 0, 0,
|
||||
"The name of a an LV to use for storing pool metadata.\n")
|
||||
|
||||
arg(poolmetadatasize_ARG, '\0', "poolmetadatasize", sizemb_VAL, 0, 0,
|
||||
"The size of the pool metadata LV created by the command.\n")
|
||||
arg(poolmetadatasize_ARG, '\0', "poolmetadatasize", ssizemb_VAL, 0, 0,
|
||||
"#lvcreate\n"
|
||||
"#lvconvert\n"
|
||||
"Specifies the size of the new pool metadata LV.\n"
|
||||
"#lvresize\n"
|
||||
"#lvextend\n"
|
||||
"Specifies the new size of the pool metadata LV.\n"
|
||||
"The plus prefix \\fB+\\fP can be used, in which case\n"
|
||||
"the value is added to the current size.\n")
|
||||
|
||||
arg(poolmetadataspare_ARG, '\0', "poolmetadataspare", bool_VAL, 0, 0,
|
||||
"Enable or disable the automatic creation and management of a\n"
|
||||
|
@ -307,7 +307,7 @@ RULE: all not LV_thinpool LV_cachepool
|
||||
OO_LVCONVERT_RAID: --mirrors SNumber, --stripes_long Number,
|
||||
--stripesize SizeKB, --regionsize RegionSize, --interval Number
|
||||
|
||||
OO_LVCONVERT_POOL: --poolmetadata LV, --poolmetadatasize SizeMB,
|
||||
OO_LVCONVERT_POOL: --poolmetadata LV, --poolmetadatasize SSizeMB,
|
||||
--poolmetadataspare Bool, --readahead Readahead, --chunksize SizeKB
|
||||
|
||||
OO_LVCONVERT_CACHE: --cachemode CacheMode, --cachepolicy String,
|
||||
@ -702,7 +702,7 @@ OO_LVCREATE: --addtag Tag, --alloc Alloc, --autobackup Bool, --activate Active,
|
||||
OO_LVCREATE_CACHE: --cachemode CacheMode, --cachepolicy String, --cachesettings String,
|
||||
--chunksize SizeKB
|
||||
|
||||
OO_LVCREATE_POOL: --poolmetadatasize SizeMB, --poolmetadataspare Bool, --chunksize SizeKB
|
||||
OO_LVCREATE_POOL: --poolmetadatasize SSizeMB, --poolmetadataspare Bool, --chunksize SizeKB
|
||||
|
||||
OO_LVCREATE_THIN: --discards Discards, --errorwhenfull Bool
|
||||
|
||||
@ -1148,7 +1148,7 @@ ID: lvdisplay_general
|
||||
lvextend --size SSizeMB LV
|
||||
OO: --alloc Alloc, --autobackup Bool, --force, --mirrors SNumber,
|
||||
--nofsck, --nosync, --noudevsync, --reportformat ReportFmt, --resizefs,
|
||||
--stripes Number, --stripesize SizeKB, --poolmetadatasize SizeMB,
|
||||
--stripes Number, --stripesize SizeKB, --poolmetadatasize SSizeMB,
|
||||
--type SegType
|
||||
OP: PV ...
|
||||
ID: lvextend_by_size
|
||||
@ -1162,7 +1162,7 @@ OO: --alloc Alloc, --autobackup Bool, --force, --mirrors SNumber,
|
||||
ID: lvextend_by_pv
|
||||
DESC: Extend an LV by specified PV extents.
|
||||
|
||||
lvextend --poolmetadatasize SizeMB LV_thinpool
|
||||
lvextend --poolmetadatasize SSizeMB LV_thinpool
|
||||
OO: --alloc Alloc, --autobackup Bool, --force, --mirrors SNumber,
|
||||
--nofsck, --nosync, --noudevsync,
|
||||
--reportformat ReportFmt, --stripes Number, --stripesize SizeKB,
|
||||
@ -1220,7 +1220,7 @@ ID: lvrename_lv_lv
|
||||
lvresize --size SSizeMB LV
|
||||
OO: --alloc Alloc, --autobackup Bool, --force,
|
||||
--nofsck, --nosync, --noudevsync, --reportformat ReportFmt, --resizefs,
|
||||
--stripes Number, --stripesize SizeKB, --poolmetadatasize SizeMB,
|
||||
--stripes Number, --stripesize SizeKB, --poolmetadatasize SSizeMB,
|
||||
--type SegType
|
||||
OP: PV ...
|
||||
ID: lvresize_by_size
|
||||
@ -1234,7 +1234,7 @@ OO: --alloc Alloc, --autobackup Bool, --force,
|
||||
ID: lvresize_by_pv
|
||||
DESC: Resize an LV by specified PV extents.
|
||||
|
||||
lvresize --poolmetadatasize SizeMB LV_thinpool
|
||||
lvresize --poolmetadatasize SSizeMB LV_thinpool
|
||||
OO: --alloc Alloc, --autobackup Bool, --force,
|
||||
--nofsck, --nosync, --noudevsync,
|
||||
--reportformat ReportFmt, --stripes Number, --stripesize SizeKB,
|
||||
|
@ -1596,6 +1596,10 @@ static void print_val_usage(struct command *cmd, int val_enum)
|
||||
* lvcreate does not take a relative [+|-] value
|
||||
* for --size or --extents.
|
||||
* Should we also squash - for lvextend and + for lvreduce?
|
||||
*
|
||||
* Should also squash +|- in front of poolmetadatasize value
|
||||
* in lvcreate and lvconvert, and squash - in front of
|
||||
* poolmetadatasize value in lvresize/lvextend.
|
||||
*/
|
||||
squash_sign_prefix = !strcmp(cmd->name, "lvcreate");
|
||||
|
||||
@ -2070,6 +2074,10 @@ static void print_val_man(struct command_name *cname, int val_enum)
|
||||
* lvcreate does not take a relative [+|-] value
|
||||
* for --size or --extents.
|
||||
* Should we also squash - for lvextend and + for lvreduce?
|
||||
*
|
||||
* Should also squash +|- in front of poolmetadatasize value
|
||||
* in lvcreate and lvconvert, and squash - in front of
|
||||
* poolmetadatasize value in lvresize/lvextend.
|
||||
*/
|
||||
squash_sign_prefix = !strcmp(cname->name, "lvcreate");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user