1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-02-24 17:57:48 +03:00

vdo: complete matching with thin syntax

Just like we support for thin-pool syntax:

lvcreate --thinpool new_tpoolname -L Size vg

add same support logic with for vdo-poo:

lvcreate --vdopool new_vpoolname -L Size vg

Also move description of syntax bellow thin-pool, so it's
correctly ordered in generated man page.
This commit is contained in:
Zdenek Kabelac 2019-01-28 20:32:42 +01:00
parent b64021ee5f
commit 87864f09f6
2 changed files with 30 additions and 26 deletions

View File

@ -769,31 +769,6 @@ FLAGS: SECONDARY_SYNTAX
---
lvcreate --type vdo --size SizeMB VG
OO: --vdo, OO_LVCREATE, OO_LVCREATE_VDO, --virtualsize SizeMB, --stripes Number, --stripesize SizeKB,
OP: PV ...
IO: --mirrors 0
ID: lvcreate_vdo_vol
DESC: Create an LV that returns VDO when used.
lvcreate --vdo --size SizeMB VG
OO: OO_LVCREATE, OO_LVCREATE_VDO, --virtualsize SizeMB, --stripes Number, --stripesize SizeKB
OP: PV ...
IO: --mirrors 0
ID: lvcreate_vdo_vol
DESC: Create an VDO LV with VDO pool.
FLAGS: SECONDARY_SYNTAX
lvcreate --vdopool LV --virtualsize SizeMB VG
OO: --vdo, --type vdo
OP: PV ...
IO: --mirrors 0
ID: lvcreate_vdo_vol
DESC: Create an VDO LV using existing VDO pool.
FLAGS: SECONDARY_SYNTAX
---
lvcreate --type zero --size SizeMB VG
OO: OO_LVCREATE
ID: lvcreate_zero_vol
@ -1068,6 +1043,34 @@ FLAGS: SECONDARY_SYNTAX
---
lvcreate --type vdo --size SizeMB VG
OO: --vdo, --vdopool LV_new, OO_LVCREATE, OO_LVCREATE_VDO,
--virtualsize SizeMB, --stripes Number, --stripesize SizeKB,
OP: PV ...
IO: --mirrors 0
ID: lvcreate_vdo_vol
DESC: Create a LV that returns VDO when used.
lvcreate --vdo --size SizeMB VG
OO: --vdopool LV_new, OO_LVCREATE, OO_LVCREATE_VDO,
--virtualsize SizeMB, --stripes Number, --stripesize SizeKB
OP: PV ...
IO: --mirrors 0
ID: lvcreate_vdo_vol
DESC: Create a VDO LV with VDO pool.
FLAGS: SECONDARY_SYNTAX
lvcreate --vdopool LV_new --size SizeMB VG
OO: --vdo, --type vdo, OO_LVCREATE, OO_LVCREATE_VDO,
--virtualsize SizeMB, --stripes Number, --stripesize SizeKB
OP: PV ...
IO: --mirrors 0
ID: lvcreate_vdo_vol
DESC: Create a VDO LV with VDO pool.
FLAGS: SECONDARY_SYNTAX
---
# stripes option is not intuitive when creating a thin LV,
# but here it applies to creating the new thin pool that
# is used for the thin LV

View File

@ -773,7 +773,7 @@ static int _lvcreate_params(struct cmd_context *cmd,
segtype_str = SEG_TYPE_NAME_CACHE;
else if (arg_is_set(cmd, thin_ARG) || arg_is_set(cmd, thinpool_ARG))
segtype_str = SEG_TYPE_NAME_THIN;
else if (arg_is_set(cmd, vdo_ARG))
else if (arg_is_set(cmd, vdo_ARG) || arg_is_set(cmd, vdopool_ARG))
segtype_str = SEG_TYPE_NAME_VDO;
else if (arg_is_set(cmd, virtualsize_ARG)) {
if (arg_is_set(cmd, virtualoriginsize_ARG))
@ -862,6 +862,7 @@ static int _lvcreate_params(struct cmd_context *cmd,
thinpool_ARG
#define VDO_POOL_ARGS \
vdopool_ARG,\
compression_ARG,\
deduplication_ARG