diff options
Diffstat (limited to 'tools/command-lines.in')
-rw-r--r-- | tools/command-lines.in | 1503 |
1 files changed, 1503 insertions, 0 deletions
diff --git a/tools/command-lines.in b/tools/command-lines.in new file mode 100644 index 000000000..701c51aa9 --- /dev/null +++ b/tools/command-lines.in @@ -0,0 +1,1503 @@ +# +# When this file is changed, tools/command-lines.h +# and tools/command-lines-count.h must be regenerated +# with: +# +# scripts/create-commands --output count scripts/command-lines.in > tools/command-lines-count.h +# scripts/create-commands --output struct scripts/command-lines.in > tools/command-lines.h +# + +# +# Syntax +# +# A new command has a unique combination of: +# command name, required option args and required +# positional args. +# +# To define a new command, begin a single line with a +# command name, followed by required options/args, +# (e.g. --foo, or --foo val), followed by required +# positional args, (e.g. VG) +# +# After the single line of required elements are lines +# of optional elements: +# OO: <optional --option args> +# OP: <optional positional args> +# +# command_name required_opt_arg ... required_pos_arg ... +# OO: optional_opt_arg, ... +# OP: optional_pos_arg ... +# +# required_opt_arg/optional_opt_arg must begin with the +# long form option name, e.g. --foo. If the option name +# takes a value, then the type of value is specified, +# e.g. --foo String. +# +# Possible option names are listed in args.h +# +# Use --foo_long to specify that only the long form of +# --foo is accepted by the command. (This is uncommon.) +# +# Possible option arg types are shown in tools/vals.h, +# e.g. Bool, String, VG, SizeMB. +# +# --option args outside the list of types in vals.h are treated +# as literal (non-variable) strings or numbers. +# +# positional args can be multiple types separated by |, e.g. VG|LV|Tag +# +# If a positional arg is repeatable, it is followed by ..., e.g. VG|LV|Tag ... +# +# LV can have a suffix indicating the LV type, e.g. LV_linear, LV_thinpool. +# LV_raid represents any raidN. LV_type1_type2_type3 when the LV is +# limited to multiple specific types. +# +# Note that two commands whose required paramters differ only by +# the LV types they accept are ambiguous. That is, they cannot be +# distinguished by just looking at the command, but require reading +# the VG to find the LV type. So, command definitions that differ +# only in accepted LV types are not allowed. It would be best to +# distinguish them by using different option names. +# There are FIXME's below for some of these cases. +# +# VG, LV can have the suffix _new, indicating the named VG or LV +# does not yet exist. +# +# If Select is included in pos_arg, it means that the pos_arg +# may be empty if the --select option is used. +# +# --size and --extents are interchangable, but only --size is used +# in these definitions to keep them simpler. --extents is +# automatically included and recognized as an alternative to --size. +# +# lvcreate generally requires a VG arg in position 1 and does not +# require the --name option (when --name is omitted, a name is +# generated). But, all commands of that form have a variant which +# is not defined here, but which is automatically recognized as +# being equivalent. That variant allows the required VG arg to +# be omitted when --name VG/LV is specified, or when the +# LVM_VG_NAME env var is set and --name LV is specified. +# The lvcreate variants with --name and without a VG arg are +# automatically recognized as an alternative to the defined +# command forms requiring the VG and no --name. +# Also, --thinpool VG/LV or --cachepool VG/LV can be used in +# place of --name to provide the VG name instead of pos 1. +# +# Some options have multiple names, but only one form of the name +# is used in these definitions. Synonyms will be recognized when +# matching a command to a command definition. +# +# used in definitions below (equivalent but not used in definitions) +# mirrorlog core (not corelog) +# resizeable (resizable or allocation) +# allocatable (allocation) +# activate (available) +# rebuild (raidrebuild) +# syncaction (raidsyncaction) +# writemostly (raidwritemostly) +# minrecoveryrate (raidminrecoveryrate) +# maxrecoveryrate (raidmaxrecoveryrate) +# writebehind (raidwritebehind) +# virtualsize (virtualoriginsize) +# vgmetadatacopies (metadatacopies) +# pvmetadatacopies (metadatacopies) +# +# "---" is like a comment line, used to separate text for readability +# +# ID: A unique string identifying the command. Two commands that do +# the same thing, but are alternate syntaxes can share the same ID, +# in which case the implementation would have to sort out which +# args to look at for the required parameters. Or, the two commands +# could use differnet IDs, in which case the implementation would +# know where to look for each parameter. +# +# DESC: A description of the command. The "DESC:" tags will be +# included in the text as indicators of new lines when printing +# the descriptions for help/man output. +# +# Note that one the most difficult aspect of these definitions is +# the variants of --thin / --type thin / --type thin-pool, +# --cache / --type cache / --type cache-pool. +# There are no consistent rules to follow and the behaviors are +# unpredictable; each possible variation and combination needs +# to be tested individually to see what it means. +# + +# +# Another capability we might want to add here is a way to express +# rules, per definition, of what arg combinations are allowed or +# required, e.g. +# +# if --foo is set, then --bar cannot be set could be encoded as: +# RULE_OPT_INVALID_OPT: --foo --bar +# +# if --foo is set, then --bar is required could be encoded as: +# RULE_OPT_REQUIRES_OPT: --foo --bar +# +# if --foo is set, then positional arg 1 is required +# (the type of value in that arg is specified by the command def): +# RULE_OPT_REQUIRES_POS: --foo 1 +# +# +# The rules could also specify validation for positional LV args: +# +# if --foo is set, then specified lv checks must pass: +# RULE_OPT_REQUIRES_LV_CHECK: --foo lv_is_merging_origin +# +# if --foo is set, then specified lv checks must not pass: +# RULE_OPT_INVALID_LV_CHECK: --foo lv_is_merging_origin +# +# command def requires specified lv checks must pass: +# RULE_OPT_REQUIRES_LV_CHECK: * lv_is_merging_origin +# +# command def requires specified lv checks must not pass: +# RULE_OPT_INVALID_LV_CHECK: * lv_is_merging_origin +# +# +# To implement would require a rule structure, and an array of +# rule structures would be added to struct command, to be filled +# in like the args arrays are. +# + +# +# For efficiency, sets of options can be defined and reused +# in multiple command definitions. +# +# To define a common set of options: +# OO_NAME: --foo, --bar String +# +# To use this set of options, include it on the OO: line, e.g. +# OO: --example, OO_NAME +# +# which is expaneded to +# OO: --example, --foo, --bar String +# +# Including OO_NAME after a command name on the required line +# means that any one of the options is required and the rest +# are optional. The usage syntax for this case is printed as: +# command (--foo A, --bar B) +# + +# +# OO_ALL is included in every command automatically. +# +OO_ALL: --commandprofile String, --config String, --debug, +--driverloaded Bool, --help, --profile String, --quiet, +--verbose, --version, --yes, --test + +# +# This list only applies to printing the usage text. +# These common options are displayed once at the end of +# a given command's usage. This is done to avoid excessive +# repetition of common options, which may obscure the more +# interesting and relevant parts of a common prototype. +# This definition is *only* used when generating the command +# usage strings, and is the basis for the division between +# the "usage" and "usage_common" strings. This OO defn does +# not relate to which optional opts are accepted by commands, +# which is defined by the OO line. +# +OO_USAGE_COMMON: OO_ALL, --force, --noudevsync + +# +# options for pvs, lvs, vgs, fullreport +# +OO_REPORT: --aligned, --all, --binary, --configreport ConfigReport, --foreign, +--ignorelockingfailure, --ignoreskippedcluster, --logonly, +--nameprefixes, --noheadings, --nolocking, --nosuffix, +--options String, --partial, --readonly, --reportformat ReportFmt, --rows, +--select String, --separator String, --shared, --sort String, +--trustcache, --unbuffered, --units Units, --unquoted + +# +# options for config, dumpconfig, lvmconfig +# +OO_CONFIG: --atversion String, --typeconfig ConfigType, --file String, --ignoreadvanced, +--ignoreunsupported, --ignorelocal, --list, --mergedconfig, --metadataprofile String, +--sinceversion String, --showdeprecated, --showunsupported, --validate, --withsummary, +--withcomments, --withspaces, --unconfigured, --withversions + +--- + +# None of these can function as a required option for lvchange. + +OO_LVCHANGE: --autobackup Bool, --force, --ignorelockingfailure, +--ignoremonitoring, --ignoreskippedcluster, --noudevsync, +--reportformat ReportFmt, --sysinit, --select String + +# Any of these can function as a required option for lvchange. +# profile is also part of OO_ALL, but is repeated in OO_LVCHANGE_META +# because it can function as a required opt. + +OO_LVCHANGE_META: --addtag Tag, --deltag Tag, +--alloc Alloc, --contiguous Bool, +--detachprofile, --metadataprofile String, --profile String, +--permission Permission, --readahead Readahead, --setactivationskip Bool, +--errorwhenfull Bool, --discards Discards, --zero Bool, +--cachemode CacheMode, --cachepolicy String, --cachesettings String, +--minrecoveryrate SizeKB, --maxrecoveryrate SizeKB, +--writebehind Number, --writemostly WriteMostlyPV + +lvchange OO_LVCHANGE_META VG|LV|Tag|Select ... +OO: OO_LVCHANGE +ID: lvchange_properties +DESC: Change a general LV property. + +lvchange --resync VG|LV_raid_mirror|Tag|Select ... +OO: OO_LVCHANGE +ID: lvchange_resync +DESC: Resyncronize a mirror or raid LV. + +lvchange --syncaction SyncAction VG|LV_raid|Tag|Select ... +OO: OO_LVCHANGE +ID: lvchange_syncaction +DESC: Resynchronize or check a raid LV. + +lvchange --rebuild PV VG|LV_raid|Tag|Select ... +OO: OO_LVCHANGE +ID: lvchange_rebuild +DESC: Reconstruct data on specific PVs of a raid LV. + +lvchange --activate Active VG|LV|Tag|Select ... +OO: --activationmode ActivationMode, --partial, --ignoreactivationskip, OO_LVCHANGE_META, OO_LVCHANGE +ID: lvchange_activate +DESC: Activate or deactivate an LV. + +lvchange --refresh VG|LV|Tag|Select ... +OO: --partial, OO_LVCHANGE +ID: lvchange_refresh +DESC: Reactivate an LV using the latest metadata. + +lvchange --monitor Bool VG|LV|Tag|Select ... +OO: --poll Bool, OO_LVCHANGE +ID: lvchange_monitor +DESC: Start or stop monitoring an LV from dmeventd. + +lvchange --poll Bool VG|LV|Tag|Select ... +OO: --monitor Bool, OO_LVCHANGE +ID: lvchange_poll +DESC: Start or stop processing an LV conversion. + +lvchange --persistent Bool VG|LV|Tag|Select ... +OO: --minor Number, --major Number, OO_LVCHANGE +ID: lvchange_persistent +DESC: Make the minor device number persistent for an LV. + +--- + +OO_LVCONVERT_RAID: --mirrors SNumber, --stripes_long Number, +--stripesize SizeKB, --regionsize SizeMB, --interval Number + +OO_LVCONVERT_POOL: --poolmetadata LV, --poolmetadatasize SizeMB, +--poolmetadataspare Bool, --readahead Readahead, --chunksize SizeKB + +OO_LVCONVERT: --alloc Alloc, --background, --force, --noudevsync + +--- + +# These cover all the core, raid-related type conversions. +# They are all routed into the core raid conversion code. + +lvconvert --type linear LV +OO: OO_LVCONVERT_RAID, OO_LVCONVERT +OP: PV ... +ID: lvconvert_raid_types +DESC: Convert LV to linear. + +lvconvert --type striped LV +OO: OO_LVCONVERT_RAID, OO_LVCONVERT +OP: PV ... +ID: lvconvert_raid_types +DESC: Convert LV to striped. + +lvconvert --type mirror LV +OO: OO_LVCONVERT_RAID, OO_LVCONVERT, --mirrorlog MirrorLog +OP: PV ... +ID: lvconvert_raid_types +DESC: Convert LV to type mirror (also see type raid1). + +lvconvert --type raid LV +OO: OO_LVCONVERT_RAID, OO_LVCONVERT +OP: PV ... +ID: lvconvert_raid_types +DESC: Convert LV to raid. + +lvconvert --mirrors SNumber LV +OO: OO_LVCONVERT_RAID, OO_LVCONVERT +OP: PV ... +ID: lvconvert_raid_types +DESC: Convert LV to raid1 or mirror, or change number of mirror images. + +--- + +# lvconvert raid-related utilities +# Create a new command set for these and migrate them out of lvconvert? + +lvconvert --splitmirrors Number --name LV_new LV_raid1_mirror_cache +OO: OO_LVCONVERT +OP: PV ... +ID: lvconvert_split_mirror_images +DESC: Split images from a raid1 or mirror LV and use them to create a new LV. + +lvconvert --splitmirrors Number --trackchanges LV_raid1_cache +OO: OO_LVCONVERT +OP: PV ... +ID: lvconvert_split_mirror_images +DESC: Split images from a raid1 LV and track changes to origin. + +lvconvert --mirrorlog MirrorLog LV_mirror +OO: OO_LVCONVERT +OP: PV ... +ID: lvconvert_change_mirrorlog +DESC: Change the type of mirror log used by a mirror LV. + +--- + +# lvconvert utilities for creating/maintaining thin and cache objects. +# Create a new command set for these and migrate them out of lvconvert? + +lvconvert --type thin --thinpool LV LV_linear_striped_raid +OO: --thin, --originname LV_new, --zero Bool, OO_LVCONVERT_POOL, OO_LVCONVERT +ID: lvconvert_to_thin_with_external +DESC: Convert LV to type thin with an external origin. + +# alternate form of lvconvert --type thin +lvconvert --thin --thinpool LV LV_linear_striped_raid +OO: --type thin, --originname LV_new, --zero Bool, OO_LVCONVERT_POOL, OO_LVCONVERT +ID: lvconvert_to_thin_with_external +DESC: Convert LV to type thin with an external origin +DESC: (variant, infers --type thin). +FLAGS: SECONDARY_SYNTAX + +--- + +lvconvert --type cache --cachepool LV LV_linear_striped_raid_thinpool +OO: --cache, --cachemode CacheMode, --cachepolicy String, +--cachesettings String, --zero Bool, OO_LVCONVERT_POOL, OO_LVCONVERT +ID: lvconvert_to_cache_vol +DESC: Convert LV to type cache. + +# alternate form of lvconvert --type cache +lvconvert --cache --cachepool LV LV_linear_striped_raid_thinpool +OO: --type cache, --cachemode CacheMode, --cachepolicy String, +--cachesettings String, --zero Bool, OO_LVCONVERT_POOL, OO_LVCONVERT +ID: lvconvert_to_cache_vol +DESC: Convert LV to type cache (variant, infers --type cache). +FLAGS: SECONDARY_SYNTAX + +--- + +lvconvert --type thin-pool LV_linear_striped_raid_cache +OO: --stripes_long Number, --stripesize SizeKB, +--discards Discards, --zero Bool, OO_LVCONVERT_POOL, OO_LVCONVERT +ID: lvconvert_to_thinpool +DESC: Convert LV to type thin-pool. + +# alternate form of lvconvert --type thin-pool +# deprecated because of non-standard syntax (missing positional arg) +lvconvert --thinpool LV_linear_striped_raid_cache +OO: --type thin-pool, --stripes_long Number, --stripesize SizeKB, +--discards Discards, --zero Bool, OO_LVCONVERT_POOL, OO_LVCONVERT +ID: lvconvert_to_thinpool +DESC: Convert LV to type thin-pool (variant, use --type thin-pool). +FLAGS: SECONDARY_SYNTAX + +--- + +lvconvert --type cache-pool LV_linear_striped_raid +OO: OO_LVCONVERT_POOL, OO_LVCONVERT, +--cachemode CacheMode, --cachepolicy String, --cachesettings String +ID: lvconvert_to_cachepool +DESC: Convert LV to type cache-pool. + +# alternate form of lvconvert --type cache-pool +# deprecated because of non-standard syntax (missing positional arg) +lvconvert --cachepool LV_linear_striped_raid +OO: --type cache-pool, OO_LVCONVERT_POOL, OO_LVCONVERT, +--cachemode CacheMode, --cachepolicy String, --cachesettings String +ID: lvconvert_to_cachepool +DESC: Convert LV to type cache-pool (variant, use --type cache-pool). +FLAGS: SECONDARY_SYNTAX + +--- + +lvconvert --splitcache LV_cachepool_cache_thinpool +OO: OO_LVCONVERT +ID: lvconvert_split_and_keep_cachepool +DESC: Separate and keep the cache pool from a cache LV. + +--- + +lvconvert --uncache LV_cache_thinpool +OO: OO_LVCONVERT +ID: lvconvert_split_and_delete_cachepool +DESC: Separate and delete the cache pool from a cache LV. + +--- + +# FIXME: add a new option defining this operation, e.g. --swapmetadata + +lvconvert --poolmetadata LV LV_thinpool_cachepool +OO: OO_LVCONVERT +ID: lvconvert_swap_pool_metadata +DESC: Swap metadata LV in a thin pool or cache pool (temporary command). +FLAGS: SECONDARY_SYNTAX + +--- + +# lvconvert utilities related to snapshots and repair. +# Create a new command set for these and migrate them out of lvconvert? + +# FIXME: lvconvert --merge is an extremely ambiguous command. +# It can do very different operations, but which one depends +# on knowing the LV type. So, the command doesn't know what +# it's actually doing until quite late, when processing a +# single LV. +# +# Use different option names for different merge operations +# so that we can have different command definitions, +# different behaviors, different optional options, etc: +# +# lvconvert --merge-mirror LV_linear_striped_raid ... +# DESC: Merge LV that was previously split from a mirror. +# +# lvconvert --merge-thin LV_thin +# DESC: Merge thin LV into its origin LV. +# +# lvconvert --merge-snapshot LV_snapshot +# DESC: Merge COW snapshot LV into its origin. +# +# Then we could add VG|Tag to --merge-mirror arg pos 1, because +# "lvconvert --merge VG|Tag" is a terrible command. It will do +# different operations on each LV it finds, depending on the +# current LV type. + +lvconvert --merge LV_linear_striped_raid_thin_snapshot|VG|Tag ... +OO: --background, --interval Number, OO_LVCONVERT +ID: lvconvert_merge +DESC: Merge LV that was previously split from a mirror. +DESC: Merge thin LV into its origin LV. +DESC: Merge COW snapshot LV into its origin. + +--- + +# FIXME: by using two different positional args, this is the +# single violation of the standard method of using process_each_lv(). +# Before calling process_each, it steals the first positional arg +# and adjusts argv/argc so it's not seen by process_each. + +# alternate form of lvconvert --snapshot +lvconvert --type snapshot LV_linear_striped_raid LV_snapshot +OO: --snapshot, --chunksize SizeKB, --zero Bool, OO_LVCONVERT +ID: lvconvert_combine_split_snapshot +DESC: Combine LV with a previously split snapshot LV. +FLAGS: SECONDARY_SYNTAX + +lvconvert --snapshot LV_linear_striped_raid LV_snapshot +OO: --type snapshot, --chunksize SizeKB, --zero Bool, OO_LVCONVERT +ID: lvconvert_combine_split_snapshot +DESC: Combine LV with a previously split snapshot LV. + +--- + +# FIXME: use specific option names to distinguish these two +# very different commands, e.g. +# +# lvconvert --repair-pvs LV_raid_mirror +# DESC: Replace failed PVs in a raid or mirror LV. +# +# lvconvert --repair-thinpool LV_thinpool +# DESC: Repair a thin pool. +# +# lvm may want to do different things, or allow different options +# depending on which operation is being run, but as it stands, it +# cannot do anything operation-specific until after the VG is read +# and the LV type is known. + +lvconvert --repair LV_raid_mirror_thinpool +OO: --usepolicies, OO_LVCONVERT +OP: PV ... +ID: lvconvert_repair_pvs_or_thinpool +DESC: Replace failed PVs in a raid or mirror LV. +DESC: Repair a thin pool. + +--- + +lvconvert --replace PV LV_raid +OO: OO_LVCONVERT +OP: PV ... +ID: lvconvert_replace_pv +DESC: Replace specific PV(s) in a raid* LV with another PV. + +--- + +lvconvert --splitsnapshot LV_snapshot +OO: OO_LVCONVERT +ID: lvconvert_split_cow_snapshot +DESC: Separate a COW snapshot from its origin LV. + +--- + +# FIXME: add a new option defining this operation, e.g. --poll-mirror +# The purpose of this command is not entirely clear. + +lvconvert LV_mirror +OO: OO_LVCONVERT +ID: lvconvert_poll_start +DESC: Poll mirror LV to collapse resync layers. +FLAGS: SECONDARY_SYNTAX + +--- + +# --extents is not specified; it's an automatic alternative for --size + +OO_LVCREATE: --addtag Tag, --alloc Alloc, --autobackup Bool, --activate Active, +--contiguous Bool, --ignoreactivationskip, --ignoremonitoring, --major Number, +--metadataprofile String, --minor Number, --monitor Bool, --name String, --nosync, +--noudevsync, --permission Permission, --persistent Bool, --readahead Readahead, +--reportformat ReportFmt, --setactivationskip Bool, --wipesignatures Bool, +--zero Bool + +OO_LVCREATE_CACHE: --cachemode CacheMode, --cachepolicy String, --cachesettings String + +OO_LVCREATE_POOL: --poolmetadatasize SizeMB, --poolmetadataspare Bool, --chunksize SizeKB + +# FIXME: it's silly to include --mirrors 0 here. Fix the tests to not use +# --mirrors 0 in commands that do not accept any non-zero --mirrors +# option, and then remove this. Accepting an option, only so that the +# option's value can invalidate the use of the option is not advisable. + +OO_LVCREATE_THIN: --discards Discards, --errorwhenfull Bool, --mirrors 0 + +OO_LVCREATE_RAID: --mirrors SNumber, --stripes Number, --stripesize SizeKB, +--regionsize SizeMB, --minrecoveryrate SizeKB, --maxrecoveryrate SizeKB + +--- + +lvcreate --type error --size SizeMB VG +OO: OO_LVCREATE +ID: lvcreate_error_vol +DESC: Create an LV that returns errors when used. +FLAGS: SECONDARY_SYNTAX + +--- + +lvcreate --type zero --size SizeMB VG +OO: OO_LVCREATE +ID: lvcreate_zero_vol +DESC: Create an LV that returns zeros when read. +FLAGS: SECONDARY_SYNTAX + +--- + +# FIXME: consider removing the --mirrors 0, --stripes 1 options +# and just reporting an error (or ignoring) if mirrors or stripes +# options are given. Same reasoning as above: it's confusing to +# advertise an option when the only value accepted for the option +# makes the option do nothing. + +lvcreate --type linear --size SizeMB VG +OO: --mirrors 0, --stripes 1, OO_LVCREATE +OP: PV ... +ID: lvcreate_linear +DESC: Create a linear LV. +FLAGS: SECONDARY_SYNTAX + +# This is the one place we mention the optional --name +# because it's the most common case and may be confusing +# to people to not see the name parameter. + +lvcreate --size SizeMB VG +OO: --type linear, --mirrors 0, --stripes 1, OO_LVCREATE +OP: PV ... +ID: lvcreate_linear +DESC: Create a linear LV (default --type linear). +DESC: When --name is omitted, the name is generated. + +--- + +lvcreate --type striped --size SizeMB VG +OO: --stripes Number, --stripesize SizeKB, OO_LVCREATE +OP: PV ... +ID: lvcreate_striped +DESC: Create a striped LV. + +lvcreate --stripes Number --size SizeMB VG +OO: --type striped, --stripesize SizeKB, OO_LVCREATE +OP: PV ... +ID: lvcreate_striped +DESC: Create a striped LV (infers --type striped). + +--- + +lvcreate --type mirror --size SizeMB VG +OO: --mirrors SNumber, --mirrorlog MirrorLog, --regionsize SizeMB, --stripes Number, OO_LVCREATE +OP: PV ... +ID: lvcreate_mirror +DESC: Create a mirror LV (also see --type raid1). + +# alternate form of lvcreate --type raid1|mirror +lvcreate --mirrors SNumber --size SizeMB VG +OO: --type raid1, --type mirror, --mirrorlog MirrorLog, --stripes Number, OO_LVCREATE_RAID, OO_LVCREATE +OP: PV ... +ID: lvcreate_mirror_or_raid1 +DESC: Create a raid1 or mirror LV (variant, infers --type raid1|mirror). + +--- + +lvcreate --type raid --size SizeMB VG +OO: OO_LVCREATE_RAID, OO_LVCREATE +OP: PV ... +ID: lvcreate_raid_any +DESC: Create a raid LV (a specific raid level must be used, e.g. raid1.) + +--- + +# FIXME: the LV created by these commands actually has type linear or striped, +# not snapshot as specified by the command. If LVs never have type +# snapshot, perhaps "snapshot" should not be considered an LV type, but +# another new LV property? +# +# This is the one case where the --type variant is the unpreferred, +# secondary syntax, because the LV type is not actually "snapshot". + +# alternate form of lvcreate --snapshot +lvcreate --type snapshot --size SizeMB LV +OO: --snapshot, --stripes Number, --stripesize SizeKB, +--chunksize SizeKB, OO_LVCREATE +OP: PV ... +ID: lvcreate_cow_snapshot +DESC: Create a COW snapshot LV from an origin LV. +FLAGS: SECONDARY_SYNTAX + +lvcreate --snapshot --size SizeMB LV +OO: --type snapshot, --stripes Number, --stripesize SizeKB, +--chunksize SizeKB, OO_LVCREATE +OP: PV ... +ID: lvcreate_cow_snapshot +DESC: Create a COW snapshot LV from an origin LV. + +--- + +# alternate form of lvcreate --snapshot +lvcreate --type snapshot --size SizeMB --virtualsize SizeMB VG +OO: --snapshot, --chunksize SizeKB, OO_LVCREATE +OP: PV ... +ID: lvcreate_cow_snapshot_with_virtual_origin +DESC: Create a sparse COW snapshot LV of a virtual origin LV. +FLAGS: SECONDARY_SYNTAX + +lvcreate --snapshot --size SizeMB --virtualsize SizeMB VG +OO: --type snapshot, --chunksize SizeKB, OO_LVCREATE +OP: PV ... +ID: lvcreate_cow_snapshot_with_virtual_origin +DESC: Create a sparse COW snapshot LV of a virtual origin LV. + +--- + +lvcreate --type thin-pool --size SizeMB VG +OO: --thinpool LV_new, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE, +--stripes Number, --stripesize SizeKB +OP: PV ... +ID: lvcreate_thinpool +DESC: Create a thin pool. + +# alternate form of lvcreate --type thin-pool +lvcreate --thin --size SizeMB VG +OO: --type thin-pool, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE, +--stripes Number, --stripesize SizeKB +OP: PV ... +ID: lvcreate_thinpool +DESC: Create a thin pool (variant, infers --type thin-pool). +FLAGS: SECONDARY_SYNTAX + +# alternate form of lvcreate --type thin-pool +lvcreate --size SizeMB --thinpool LV_new VG +OO: --thin, --type thin-pool, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE, +--stripes Number, --stripesize SizeKB +OP: PV ... +ID: lvcreate_thinpool +DESC: Create a thin pool named by the --thinpool arg +DESC: (variant, infers --type thin-pool). +FLAGS: SECONDARY_SYNTAX + +--- + +# NB. there are no alternate forms of these commands that +# use --cache in place of --type cache-pool, but --cache +# still needs to be listed as an optional addition to +# --type cache-pool. + +lvcreate --type cache-pool --size SizeMB VG +OO: --cache, OO_LVCREATE_POOL, OO_LVCREATE_CACHE, OO_LVCREATE +OP: PV ... +ID: lvcreate_cachepool +DESC: Create a cache pool. + +# alternate form of lvcreate --type cache-pool +lvcreate --type cache-pool --size SizeMB --cachepool LV_new VG +OO: --cache, OO_LVCREATE_POOL, OO_LVCREATE_CACHE, OO_LVCREATE +OP: PV ... +ID: lvcreate_cachepool +DESC: Create a cache pool named by the --cachepool arg +DESC: (variant, uses --cachepool in place of --name). +FLAGS: SECONDARY_SYNTAX + +--- + +lvcreate --type thin --virtualsize SizeMB --thinpool LV_thinpool VG +OO: --thin, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE +ID: lvcreate_thin_vol +DESC: Create a thin LV in a thin pool. + +# alternate form of lvcreate --type thin +lvcreate --type thin --virtualsize SizeMB LV_thinpool +OO: --thin, OO_LVCREATE_THIN, OO_LVCREATE +ID: lvcreate_thin_vol +DESC: Create a thin LV in a thin pool named in the first arg +DESC: (variant, also see --thinpool for naming pool). +FLAGS: SECONDARY_SYNTAX + +# NB. this is the variant which can substitute +# --thin for --type thin, even though --thin is in OO. + +# alternate form of lvcreate --type thin +lvcreate --virtualsize SizeMB --thinpool LV_thinpool VG +OO: --type thin, --thin, OO_LVCREATE_THIN, OO_LVCREATE +ID: lvcreate_thin_vol +DESC: Create a thin LV in a thin pool (variant, infers --type thin). +FLAGS: SECONDARY_SYNTAX + +# alternate form of lvcreate --type thin +lvcreate --virtualsize SizeMB LV_thinpool +OO: --type thin, --thin, OO_LVCREATE_THIN, OO_LVCREATE +ID: lvcreate_thin_vol +DESC: Create a thin LV in the thin pool named in the first arg +DESC: (variant, infers --type thin, also see --thinpool for +DESC: naming pool.) +FLAGS: SECONDARY_SYNTAX + +--- + +lvcreate --type thin LV_thin +OO: --thin, OO_LVCREATE_THIN, OO_LVCREATE +ID: lvcreate_thin_snapshot +DESC: Create a thin LV that is a snapshot of an existing thin LV. + +# alternate form of lvcreate --type thin +lvcreate --thin LV_thin +OO: --type thin, OO_LVCREATE_THIN, OO_LVCREATE +ID: lvcreate_thin_snapshot +DESC: Create a thin LV that is a snapshot of an existing thin LV +DESC: (infers --type thin). +FLAGS: SECONDARY_SYNTAX + +# alternate form of lvcreate --type thin +lvcreate --snapshot LV_thin +OO: --type thin, OO_LVCREATE_THIN, OO_LVCREATE +ID: lvcreate_thin_snapshot +DESC: Create a thin LV that is a snapshot of an existing thin LV +DESC: (infers --type thin). + +lvcreate --type thin --thinpool LV_thinpool LV +OO: --thin, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE +ID: lvcreate_thin_snapshot_of_external +DESC: Create a thin LV that is a snapshot of an external origin LV. + +# alternate form of lvcreate --type thin --thinpool LV_thinpool LV +lvcreate --snapshot --thinpool LV_thinpool LV +OO: --type thin, OO_LVCREATE_THIN, OO_LVCREATE +ID: lvcreate_thin_snapshot_of_external +DESC: Create a thin LV that is a snapshot of an external origin LV +DESC: (infers --type thin). + +--- + +# 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 + +# FIXME: there are commands here that differ only in that +# one takes LV_new in arg pos 1, and the other takes a VG name +# in arg pos 1. The commands that take LV_new use that +# name as the new name of the pool, but the commands that +# take a VG automatically generate the LV name. The problem +# is that currently the command matching function cannot +# distinguish between an LV name and a VG name being used +# in arg pos 1, so a user-entered command would just match +# the first it finds and not necessarily the correct +# definition. Note that when LV_new is used in arg pos 1, +# it needs to include a VG name, i.e. VG/LV_new + +lvcreate --type thin --virtualsize SizeMB --size SizeMB --thinpool LV_new +OO: --thin, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE, +--stripes Number, --stripesize SizeKB +OP: PV ... +ID: lvcreate_thin_vol_and_thinpool +DESC: Create a thin LV, first creating a thin pool for it, +DESC: where the new thin pool is named by the --thinpool arg. + +# alternate form of lvcreate --type thin +lvcreate --thin --virtualsize SizeMB --size SizeMB --thinpool LV_new +OO: --type thin, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE, +--stripes Number, --stripesize SizeKB +OP: PV ... +ID: lvcreate_thin_vol_and_thinpool +DESC: Create a thin LV, first creating a thin pool for it, +DESC: where the new thin pool is named by the --thinpool arg +DESC: (variant, infers --type thin). +FLAGS: SECONDARY_SYNTAX + +# alternate form of lvcreate --type thin +lvcreate --type thin --virtualsize SizeMB --size SizeMB LV_new|VG +OO: --thin, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE, +--stripes Number, --stripesize SizeKB +OP: PV ... +ID: lvcreate_thin_vol_and_thinpool +DESC: Create a thin LV, first creating a thin pool for it, +DESC: where the new thin pool is named in the first arg, +DESC: or the new thin pool name is generated when the first +DESC: arg is a VG name. +FLAGS: SECONDARY_SYNTAX + +# alternate form of lvcreate --type thin +lvcreate --thin --virtualsize SizeMB --size SizeMB LV_new|VG +OO: --type thin, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE, +--stripes Number, --stripesize SizeKB +OP: PV ... +ID: lvcreate_thin_vol_and_thinpool +DESC: Create a thin LV, first creating a thin pool for it, +DESC: where the new thin pool is named in the first arg, +DESC: or the new thin pool name is generated when the first +DESC: arg is a VG name (variant, infers --type thin). +FLAGS: SECONDARY_SYNTAX + +--- + +lvcreate --size SizeMB --virtualsize SizeMB VG +OO: --type thin, --type snapshot, --thin, --snapshot, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE, +--stripes Number, --stripesize SizeKB +OP: PV ... +ID: lvcreate_thin_vol_with_thinpool_or_sparse_snapshot +DESC: Create a thin LV, first creating a thin pool for it +DESC: (infers --type thin). +DESC: Create a sparse snapshot of a virtual origin LV +DESC: (infers --type snapshot). +DESC: Chooses --type thin or --type snapshot according to +DESC: config setting sparse_segtype_default. +FLAGS: SECONDARY_SYNTAX + +--- + +# stripes option is not intuitive when creating a cache LV, +# but here it applies to creating the new origin that +# is used to create the cache LV + +lvcreate --type cache --size SizeMB --cachepool LV_cachepool VG +OO: --cache, OO_LVCREATE_POOL, OO_LVCREATE_CACHE, OO_LVCREATE, +--stripes Number, --stripesize SizeKB +OP: PV ... +ID: lvcreate_cache_vol_with_new_origin +DESC: Create a cache LV, first creating a new origin LV, +DESC: then combining it with the existing cache pool named +DESC: by the --cachepool arg. + +# alternate form of lvcreate --type cache +lvcreate --size SizeMB --cachepool LV_cachepool VG +OO: --type cache, --cache, OO_LVCREATE_CACHE, OO_LVCREATE, +--stripes Number, --stripesize SizeKB +OP: PV ... +ID: lvcreate_cache_vol_with_new_origin +DESC: Create a cache LV, first creating a new origin LV, +DESC: then combining it with the existing cache pool named +DESC: by the --cachepool arg (variant, infers --type cache). +FLAGS: SECONDARY_SYNTAX + +# alternate form of lvcreate --type cache +lvcreate --type cache --size SizeMB LV_cachepool +OO: --cache, OO_LVCREATE_POOL, OO_LVCREATE_CACHE, OO_LVCREATE, +--stripes Number, --stripesize SizeKB +OP: PV ... +ID: lvcreate_cache_vol_with_new_origin +DESC: Create a cache LV, first creating a new origin LV, +DESC: then combining it with the existing cache pool named +DESC: in the first arg (variant, also use --cachepool). +FLAGS: SECONDARY_SYNTAX + +# This is a ridiculously crazy command which nobody could +# understand. It should be be eliminated. It does two different +# things depending on whether LV in pos 1 is a cachepool LV +# or not. Both variations are unnecessary. +# +# 1. If LV is a cachepool, then it's an alternate form of +# an already complicated command above. +# +# # alternate form for lvcreate_cache_vol_with_new_origin +# lvcreate --cache --size SizeMB LV_cachepool +# OO: --type cache, --cache, OO_LVCREATE_CACHE, OO_LVCREATE, --stripes Number, --stripesize SizeKB +# OP: PV ... +# ID: lvcreate_cache_vol_with_new_origin +# DESC: Create a cache LV, first creating a new origin LV, +# DESC: then combining it with the existing cache pool named +# DESC: in the first arg (variant, infers --type cache, +# DESC: also use --cachepool). +# +# 2. If LV is not a cachepool, then it's a disguised lvconvert. +# +# # FIXME: this should be done by lvconvert, and this command removed +# lvcreate --type cache --size SizeMB LV +# OO: OO_LVCREATE_POOL, OO_LVCREATE_CACHE, OO_LVCREATE +# OP: PV ... +# ID: lvcreate_convert_to_cache_vol_with_cachepool +# DESC: Convert the specified LV to type cache after creating a new +# DESC: cache pool LV to use (use lvconvert). +# +# Note that stripes are accepted by the first and not by the +# second, but it's not possible to validate this until after +# the LV type is known. +# +# So, to define this syntax we have to combine both of +# those variants, each crazy on it's own, into one +# ridiculous command. + +# def1: alternate form of lvcreate --type cache, or +# def2: it should be done by lvconvert. +lvcreate --cache --size SizeMB LV +OO: OO_LVCREATE_CACHE, OO_LVCREATE_POOL, OO_LVCREATE, +--stripes Number, --stripesize SizeKB +OP: PV ... +ID: lvcreate_cache_vol_with_new_origin_or_convert_to_cache_vol_with_cachepool +DESC: When LV is a cache pool, create a cache LV, +DESC: first creating a new origin LV, then combining it with +DESC: the existing cache pool named in the first arg +DESC: (variant, infers --type cache, also use --cachepool). +DESC: When LV is not a cache pool, convert the specified LV +DESC: to type cache after creating a new cache pool LV to use +DESC: (use lvconvert). +FLAGS: SECONDARY_SYNTAX + +--- + +lvdisplay +OO: --aligned, --all, --binary, --colon, --columns, +--configreport ConfigReport, --foreign, --history, --ignorelockingfailure, +--ignoreskippedcluster, --logonly, --maps, --noheadings, +--nosuffix, --options String, --sort String, --partial, --readonly, +--reportformat ReportFmt, --segments, --select String, --separator String, +--shared, --unbuffered, --units Units +OP: VG|LV|Tag ... +ID: lvdisplay_general + +--- + +# --extents is not specified; it's an automatic alternative for --size + +lvextend --size SizeMB LV +OO: --alloc Alloc, --autobackup Bool, --force, --mirrors SNumber, +--nofsck, --nosync, --noudevsync, --reportformat ReportFmt, --resizefs, +--stripes Number, --stripesize SizeKB, --poolmetadatasize SizeMB +OP: PV ... +ID: lvextend_by_size +DESC: Extend an LV by a specified size. + +lvextend LV PV ... +OO: --alloc Alloc, --autobackup Bool, --force, --mirrors SNumber, +--nofsck, --nosync, --noudevsync, +--reportformat ReportFmt, --resizefs, --stripes Number, --stripesize SizeKB +ID: lvextend_by_pv +DESC: Extend an LV by specified PV extents. +FLAGS: SECONDARY_SYNTAX + +lvextend --poolmetadatasize SizeMB LV_thinpool +OO: --alloc Alloc, --autobackup Bool, --force, --mirrors SNumber, +--nofsck, --nosync, --noudevsync, +--reportformat ReportFmt, --stripes Number, --stripesize SizeKB +OP: PV ... +ID: lvextend_pool_metadata_by_size +DESC: Extend a pool metadata SubLV by a specified size. + +lvextend --usepolicies LV_thinpool_snapshot +OO: --alloc Alloc, --autobackup Bool, --force, --mirrors SNumber, +--nofsck, --nosync, --noudevsync, +--reportformat ReportFmt, --resizefs +ID: lvextend_by_policy +DESC: Extend an LV according to a predefined policy. + +--- + +lvmconfig +OO: OO_CONFIG +ID: lvmconfig_general + +--- + +lvreduce --size SizeMB LV +OO: --autobackup Bool, --force, --nofsck, --noudevsync, +--reportformat ReportFmt, --resizefs +ID: lvreduce_general + +--- + +lvremove VG|LV|Tag|Select ... +OO: --autobackup Bool, --force, --nohistory, --noudevsync, +--reportformat ReportFmt, --select String +ID: lvremove_general + +--- + +lvrename VG LV LV_new +OO: --autobackup Bool, --noudevsync, --reportformat ReportFmt +ID: lvrename_vg_lv_lv + +lvrename LV LV_new +OO: --autobackup Bool, --noudevsync, --reportformat ReportFmt +ID: lvrename_lv_lv + +--- + +lvresize --size SizeMB LV +OO: --alloc Alloc, --autobackup Bool, --force, +--nofsck, --nosync, --noudevsync, --reportformat ReportFmt, --resizefs, +--stripes Number, --stripesize SizeKB, --poolmetadatasize SizeMB +OP: PV ... +ID: lvresize_by_size +DESC: Resize an LV by a specified size. + +lvresize LV PV ... +OO: --alloc Alloc, --autobackup Bool, --force, +--nofsck, --nosync, --noudevsync, +--reportformat ReportFmt, --resizefs, --stripes Number, --stripesize SizeKB +ID: lvresize_by_pv +DESC: Resize an LV by specified PV extents. +FLAGS: SECONDARY_SYNTAX + +lvresize --poolmetadatasize SizeMB LV_thinpool +OO: --alloc Alloc, --autobackup Bool, --force, +--nofsck, --nosync, --noudevsync, +--reportformat ReportFmt, --stripes Number, --stripesize SizeKB +OP: PV ... +ID: lvresize_pool_metadata_by_size +DESC: Resize a pool metadata SubLV by a specified size. + +--- + +lvs +OO: --history, --segments, OO_REPORT +OP: VG|LV|Tag ... +ID: lvs_general + +--- + +lvscan +OO: --all, --blockdevice, --ignorelockingfailure, --partial, +--readonly, --reportformat ReportFmt, --cache_long +ID: lvscan_general + +--- + +# None of these can function as a required option for pvchange. +OO_PVCHANGE: --autobackup Bool, --force, --ignoreskippedcluster, +--reportformat ReportFmt, --uuid + +# Any of these can function as a required option for pvchange. +OO_PVCHANGE_META: --allocatable Bool, --addtag Tag, --deltag Tag, +--uuid, --metadataignore Bool + +pvchange OO_PVCHANGE_META --all +OO: OO_PVCHANGE +ID: pvchange_properties_all +DESC: Change properties of all PVs. + +pvchange OO_PVCHANGE_META PV|Select ... +OO: --select String, OO_PVCHANGE +ID: pvchange_properties_some +DESC: Change properties of specified PVs. + +--- + +pvresize PV ... +OO: --setphysicalvolumesize SizeMB, --reportformat ReportFmt +ID: pvresize_general + +--- + +pvck PV ... +OO: --labelsector Number +ID: pvck_general + +--- + +# Use --uuidstr here which will be converted to uuidstr_ARG +# which is actually --uuid string on the command line. + +pvcreate PV ... +OO: --dataalignment SizeKB, --dataalignmentoffset SizeKB, --bootloaderareasize SizeMB, +--force, --labelsector Number, --metadatatype MetadataType, +--pvmetadatacopies MetadataCopiesPV, --metadatasize SizeMB, +--metadataignore Bool, --norestorefile, --setphysicalvolumesize SizeMB, +--reportformat ReportFmt, --restorefile String, --uuidstr String, --zero Bool +ID: pvcreate_general + +--- + +pvdisplay +OO: --aligned, --all, --binary, --colon, --columns, --configreport ConfigReport, +--foreign, --ignorelockingfailure, --ignoreskippedcluster, +--logonly, --maps, --noheadings, --nosuffix, --options String, +--readonly, --reportformat ReportFmt, --select String, --separator String, --shared, +--short, --sort String, --unbuffered, --units Units +OP: PV|Tag ... +ID: pvdisplay_general + +--- + +pvmove PV +OO: --abort, --alloc Alloc, --atomic, --autobackup Bool, --background, +--interval Number, --name LV, --noudevsync, --reportformat ReportFmt +OP: PV ... +ID: pvmove_one +DESC: Move PV extents. + +pvmove +OO: --abort, --background +ID: pvmove_any +DESC: Continue or abort existing pvmove operations. + +--- + +pvremove PV ... +OO: --force, --reportformat ReportFmt +ID: pvremove_general + +--- + +pvs +OO: --segments, OO_REPORT +OP: PV|Tag ... +ID: pvs_general + +--- + +pvscan +OO: --ignorelockingfailure, --reportformat ReportFmt, --exported, --novolumegroup, +--short, --uuid +ID: pvscan_show +DESC: Display PV information. + +pvscan --cache_long +OO: --ignorelockingfailure, --reportformat ReportFmt, --background, +--activate Active, --major Number, --minor Number, +OP: PV|String ... +ID: pvscan_cache +DESC: Populate the lvmetad cache by scanning PVs. + +--- + +vgcfgbackup +OO: --file String, --foreign, --ignorelockingfailure, --partial, --readonly, +--reportformat ReportFmt +OP: VG ... +ID: vgcfgbackup_general + +--- + +vgcfgrestore VG +OO: --file String, --force_long, --list, --metadatatype MetadataType +ID: vgcfgrestore_by_vg + +vgcfgrestore --list --file String +ID: vgcfgrestore_by_file + +--- + +# None of these can function as a required option for vgchange. + +OO_VGCHANGE: --autobackup Bool, --ignoremonitoring, --ignoreskippedcluster, +--noudevsync, --reportformat ReportFmt, --select String, --force + +# Any of these can function as a required option for vgchange. +# profile is also part of OO_ALL, but is repeated in OO_VGCHANGE_META +# because it can function as a required opt. + +OO_VGCHANGE_META: --addtag Tag, --deltag Tag, +--logicalvolume Number, --maxphysicalvolumes Number, --alloc Alloc, --uuid, +--clustered Bool, --pvmetadatacopies MetadataCopiesPV, --vgmetadatacopies MetadataCopiesVG, +--physicalextentsize SizeMB, --resizeable Bool, --systemid String, --locktype LockType, +--profile String, --detachprofile, --metadataprofile String, + +vgchange OO_VGCHANGE_META +OO: OO_VGCHANGE +OP: VG|Tag|Select ... +ID: vgchange_properties +DESC: Change a general VG property. + +vgchange --monitor Bool +OO: --sysinit, --ignorelockingfailure, --poll Bool, OO_VGCHANGE +OP: VG|Tag|Select ... +ID: vgchange_monitor +DESC: Start or stop monitoring LVs from dmeventd. + +vgchange --poll Bool +OO: --ignorelockingfailure, OO_VGCHANGE +OP: VG|Tag|Select ... +ID: vgchange_poll +DESC: Start or stop processing LV conversions. + +vgchange --activate Active +OO: --activationmode ActivationMode, --ignoreactivationskip, --partial, --sysinit, +--ignorelockingfailure, --monitor Bool, --poll Bool, OO_VGCHANGE +OP: VG|Tag|Select ... +ID: vgchange_activate +DESC: Activate or deactivate LVs. + +vgchange --refresh +OO: --sysinit, --ignorelockingfailure, --monitor Bool, --poll Bool, OO_VGCHANGE +OP: VG|Tag|Select ... +ID: vgchange_refresh +DESC: Reactivate LVs using the latest metadata. + +vgchange --lockstart +OO: --lockopt String, OO_VGCHANGE +OP: VG|Tag|Select ... +ID: vgchange_lockstart +DESC: Start the lockspace of a shared VG in lvmlockd. + +vgchange --lockstop +OO: --lockopt String, OO_VGCHANGE +OP: VG|Tag|Select ... +ID: vgchange_lockstop +DESC: Stop the lockspace of a shared VG in lvmlockd. + +--- + +vgck +OO: --reportformat ReportFmt +OP: VG|Tag ... +ID: vgck_general + +--- + +vgconvert VG ... +OO: --force, --labelsector Number, --bootloaderareasize SizeMB, +--metadatatype MetadataType, --pvmetadatacopies MetadataCopiesPV, +--metadatasize SizeMB, --reportformat ReportFmt +ID: vgconvert_general + +--- + +vgcreate VG_new PV ... +OO: --addtag Tag, --alloc Alloc, --autobackup Bool, --clustered Bool, --maxlogicalvolumes Number, +--maxphysicalvolumes Number, --metadataprofile String, --metadatatype MetadataType, +--physicalextentsize SizeMB, --force, --zero Bool, --labelsector Number, +--metadatasize SizeMB, --pvmetadatacopies MetadataCopiesPV, --vgmetadatacopies MetadataCopiesVG, +--reportformat ReportFmt, --dataalignment SizeKB, --dataalignmentoffset SizeKB, +--shared, --systemid String, --locktype LockType, --lockopt String +ID: vgcreate_general + +--- + +vgdisplay +OO: --activevolumegroups, --aligned, --binary, --colon, --columns, +--configreport ConfigReport, --foreign, --ignorelockingfailure, +--ignoreskippedcluster, --logonly, --noheadings, --nosuffix, +--options String, --partial, --readonly, --reportformat ReportFmt, --select String, +--shared, --short, --separator String, --sort String, --unbuffered, --units Units +OP: VG|Tag ... +ID: vgdisplay_general + +--- + +OO_VGEXPORT: --reportformat ReportFmt + +vgexport VG|Tag|Select ... +OO: --select String, OO_VGEXPORT +ID: vgexport_some +DESC: Export specified VGs. + +vgexport --all +OO: OO_VGEXPORT +ID: vgexport_all +DESC: Export all VGs. +FLAGS: SECONDARY_SYNTAX + +--- + +vgextend VG PV ... +OO: --autobackup Bool, +--force, --zero Bool, --labelsector Number, --metadatatype MetadataType, +--metadatasize SizeMB, --pvmetadatacopies MetadataCopiesPV, +--metadataignore Bool, --dataalignment SizeKB, --dataalignmentoffset SizeKB, +--reportformat ReportFmt, --restoremissing +ID: vgextend_general + +--- + +OO_VGIMPORT: --force, --reportformat ReportFmt + +vgimport VG|Tag|Select ... +OO: --select String, OO_VGIMPORT +ID: vgimport_some +DESC: Import specified VGs. + +vgimport --all +OO: OO_VGIMPORT +ID: vgimport_all +DESC: Import all VGs. + +--- + +vgimportclone PV ... +OO: --basevgname VG, --import +ID: vgimportclone_general + +--- + +vgmerge VG VG +OO: --autobackup Bool, --list +ID: vgmerge_general + +--- + +vgmknodes +OO: --ignorelockingfailure, --refresh, --reportformat ReportFmt +OP: VG|LV|Tag ... +ID: vgmknodes_general + +--- + +OO_VGREDUCE: --autobackup Bool, --force, --reportformat ReportFmt + +vgreduce VG PV ... +OO: OO_VGREDUCE +ID: vgreduce_by_pv +DESC: Remove a PV from a VG. + +vgreduce --all VG +OO: OO_VGREDUCE +ID: vgreduce_all +DESC: Remove all unused PVs from a VG. + +vgreduce --removemissing VG +OO: --mirrorsonly, OO_VGREDUCE +ID: vgreduce_missing +DESC: Remove all missing PVs from a VG. + +--- + +vgremove VG|Tag|Select ... +OO: --force, --noudevsync, --reportformat ReportFmt, --select String +ID: vgremove_general + +--- + +vgrename VG VG_new +OO: --autobackup Bool, --force, --reportformat ReportFmt +ID: vgrename_by_name +DESC: Rename a VG. + +vgrename String VG_new +OO: --autobackup Bool, --force, --reportformat ReportFmt +ID: vgrename_by_uuid +DESC: Rename a VG by specifying the VG UUID. + +--- + +vgs +OO: OO_REPORT +OP: VG|Tag ... +ID: vgs_general + +--- + +vgscan +OO: --cache_long, --ignorelockingfailure, --mknodes, --notifydbus, +--partial, --reportformat ReportFmt +ID: vgscan_general + +--- + +OO_VGSPLIT: --autobackup Bool + +# used only when the destination VG is new +OO_VGSPLIT_NEW: --alloc Alloc, --clustered Bool, +--maxlogicalvolumes Number, --maxphysicalvolumes Number, +--metadatatype MetadataType, --vgmetadatacopies MetadataCopiesVG + +vgsplit VG VG PV ... +OO: OO_VGSPLIT, OO_VGSPLIT_NEW +ID: vgsplit_by_pv +DESC: Split a VG by specified PVs. + +vgsplit --name LV VG VG +OO: OO_VGSPLIT, OO_VGSPLIT_NEW +ID: vgsplit_by_lv +DESC: Split a VG by PVs in a specified LV. + +--- + +# built-in and deprecated commands + +config +OO: OO_CONFIG +OP: String ... +ID: lvmconfig_general + +dumpconfig +OO: OO_CONFIG +OP: String ... +ID: lvmconfig_general + +devtypes +OO: --aligned, --binary, --nameprefixes, --noheadings, +--nosuffix, --options String, --reportformat ReportFmt, --rows, +--select String, --separator String, --sort String, --unbuffered, --unquoted +ID: devtypes_general + +fullreport +OO: OO_REPORT +OP: VG ... +ID: fullreport_general + +lastlog +OO: --reportformat ReportFmt, --select String +ID: lastlog_general + +lvpoll --polloperation PollOp LV ... +OO: --abort, --autobackup Bool, --handlemissingpvs, --interval Number +ID: lvpoll_general + +formats +ID: formats_general + +help +ID: help_general + +version +ID: version_general + +pvdata +ID: pvdata_general + +segtypes +ID: segtypes_general + +systemid +ID: systemid_general + +tags +ID: tags_general + +lvmchange +ID: lvmchange_general + +lvmdiskscan +OO: --lvmpartition, --readonly +ID: lvmdiskscan_general + +lvmsadc +ID: lvmsadc_general + +lvmsar +OO: --full, --stdin +ID: lvmsar_general + |