diff options
-rw-r--r-- | lib/commands/toolcontext.h | 3 | ||||
-rw-r--r-- | scripts/command-lines.in | 1278 | ||||
-rw-r--r-- | scripts/create-commands.c | 2167 | ||||
-rw-r--r-- | tools/args.h | 405 | ||||
-rw-r--r-- | tools/command-lines-count.h | 133 | ||||
-rw-r--r-- | tools/command-lines.h | 8121 | ||||
-rw-r--r-- | tools/command.h | 169 | ||||
-rw-r--r-- | tools/commands.h | 1428 | ||||
-rw-r--r-- | tools/lvchange.c | 283 | ||||
-rw-r--r-- | tools/lvm.c | 32 | ||||
-rw-r--r-- | tools/lvm2cmdline.h | 9 | ||||
-rw-r--r-- | tools/lvmcmdline.c | 1057 | ||||
-rw-r--r-- | tools/toollib.c | 64 | ||||
-rw-r--r-- | tools/tools.h | 48 | ||||
-rw-r--r-- | tools/vals.h | 136 |
15 files changed, 13543 insertions, 1790 deletions
diff --git a/lib/commands/toolcontext.h b/lib/commands/toolcontext.h index c6d938d8b..87a7c2c2e 100644 --- a/lib/commands/toolcontext.h +++ b/lib/commands/toolcontext.h @@ -88,9 +88,10 @@ struct cmd_context { * Command line and arguments. */ const char *cmd_line; + const char *name; /* needed before cmd->command is set */ struct command *command; char **argv; - struct arg_values *arg_values; + struct arg_values *opt_arg_values; struct dm_list arg_value_groups; /* diff --git a/scripts/command-lines.in b/scripts/command-lines.in new file mode 100644 index 000000000..fb3dbaa70 --- /dev/null +++ b/scripts/command-lines.in @@ -0,0 +1,1278 @@ +# +# 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. +# +# 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 (corelog) +# resizeable (resizable) +# allocatable (allocation) +# resizeable (allocation) +# activate (available) +# rebuild (raidrebuild) +# syncaction (raidsyncaction) +# writemostly (raidwritemostly) +# minrecoveryrate (raidminrecoveryrate) +# maxrecoveryrate (raidmaxrecoveryrate) +# writebehind (raidwritebehind) +# +# +# "---" 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. +# + +# +# 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. +# FIXME: add --force and --test to OO_ALL so that all commands will +# accept them even if they are not used? +# +OO_ALL: --commandprofile String, --config String, --debug, +--driverloaded Bool, --help, --profile String, --quiet, +--verbose, --version, --yes + +# +# 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, --test, --noudevsync + +# +# options for pvs, lvs, vgs, fullreport +# +OO_REPORT: --aligned, --all, --binary, --configreport String, --foreign, +--ignorelockingfailure, --ignoreskippedcluster, --logonly, +--nameprefixes, --noheadings, --nolocking, --nosuffix, +--options String, --partial, --readonly, --reportformat String, --rows, +--select String, --separator String, --shared, --sort String, +--trustcache, --unbuffered, --units Units, --unquoted + +# +# options for config, dumpconfig, lvmconfig +# +OO_CONFIG: --atversion String, --typeconfig String, --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 String, --sysinit, --test, --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 PV + +lvchange OO_LVCHANGE_META VG|LV|Tag|Select ... +OO: OO_LVCHANGE +ID: lvchange_properties +DESC: Change a general LV property. + +lvchange --resync VG|LV|Tag|Select ... +OO: OO_LVCHANGE +ID: lvchange_resync + +lvchange --syncaction String VG|LV|Tag|Select ... +OO: OO_LVCHANGE +ID: lvchange_syncaction + +lvchange --rebuild PV VG|LV|Tag|Select ... +OO: OO_LVCHANGE +ID: lvchange_rebuild + +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: OO_LVCHANGE +ID: lvchange_refresh + +lvchange --monitor Bool VG|LV|Tag|Select ... +OO: --poll Bool, OO_LVCHANGE +ID: lvchange_monitor +DESC: Monitor or unmonitor an LV. + +lvchange --poll Bool VG|LV|Tag|Select ... +OO: --monitor Bool, OO_LVCHANGE +ID: lvchange_poll + +lvchange --persistent Bool VG|LV|Tag|Select ... +OO: --minor Number, --major Number, OO_LVCHANGE +ID: lvchange_persistent + +--- + +OO_LVCONVERT_RAID: --mirrors SNumber, --stripes_long Number, +--stripesize SizeKB, --regionsize SizeMB + +OO_LVCONVERT_POOL: --poolmetadata LV, --poolmetadatasize SizeMB, +--poolmetadataspare Bool, --readahead Readahead, --chunksize SizeKB + +OO_LVCONVERT: --alloc Alloc, --background, --force, --noudevsync, +--test, --usepolicies + +--- + +# 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 +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. + +lvconvert --type snapshot LV_linear_striped_raid LV_snapshot +OO: --chunksize SizeKB, --zero Bool, OO_LVCONVERT +ID: lvconvert_combine_split_snapshot +DESC: Combine LV with a previously split snapshot LV. + +--- + +lvconvert --type thin --thinpool LV LV_linear_striped_raid +OO: --thin, --originname LV_new, 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, 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). + +--- + +# FIXME: I don't think --zero applies when creating cache LV, +# but it's used in a test. Should the test be fixed and +# --zero removed here? + +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). + +--- + +lvconvert --type thin-pool LV_linear_striped_raid_cache +OO: --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 +OO: OO_LVCONVERT_POOL, OO_LVCONVERT +ID: lvconvert_to_thinpool +DESC: Convert LV to type thin-pool (variant, use --type thin-pool). + +--- + +# FIXME: I don't think that --cachemode, --cachepolicy, --cachesettings +# are meant to be used when creating a cache pool, but they are used +# in one test. Should that test be fixed and these options removed? + +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). + +--- + +lvconvert --type mirror --mirrors SNumber LV_linear_striped +OO: OO_LVCONVERT_RAID, OO_LVCONVERT +OP: PV ... +ID: lvconvert_to_mirror +DESC: Convert LV to type mirror, adding mirror images. + +# alternate form of lvconvert --type raid1|mirror +lvconvert --mirrors SNumber LV_linear_striped +OO: --type raid1, --type mirror, OO_LVCONVERT_RAID, OO_LVCONVERT +OP: PV ... +ID: lvconvert_to_mirror_or_raid1 +DESC: Convert LV to type raid1 or mirror +DESC: (variant, infers --type raid1|mirror). + +--- + +lvconvert --type mirror LV_raid1 +OO: OO_LVCONVERT_RAID, OO_LVCONVERT +ID: lvconvert_raid1_to_mirror +DESC: Convert LV to type mirror, keeping mirror images. + +lvconvert --type raid1 LV_mirror +OO: OO_LVCONVERT_RAID, OO_LVCONVERT +ID: lvconvert_mirror_to_raid1 +DESC: Convert LV to type raid1, keeping mirror images. + +--- + +# FIXME: by using specific raid levels, e.g. raid1, we could +# specify other required options, e.g. --mirrors. This may +# help the second fixme... +# +# FIXME: there are two different operations here, and it would +# be nice to split them into to unambiguous command lines: +# +# 1. lvconvert --type raid LV_linear_striped +# DESC: Convert LV to type raid. +# +# 2. lvconvert --type raid LV_raid +# DESC: Change LV raid type. + +lvconvert --type raid LV_linear_striped_raid +OO: OO_LVCONVERT_RAID, OO_LVCONVERT +OP: PV ... +ID: lvconvert_general_to_raid +DESC: Convert LV to type raid. +DESC: Change LV raid type. + +--- + +lvconvert --mirrors SNumber LV_raid_mirror +OO: OO_LVCONVERT +OP: PV ... +ID: lvconvert_change_mirror_images +DESC: Change the number of mirror images in the LV. + +--- + +lvconvert --type striped LV_raid +OO: OO_LVCONVERT_RAID, OO_LVCONVERT +OP: PV ... +ID: lvconvert_raid_to_striped +DESC: Convert LV to type striped. + +--- + +lvconvert --type linear LV_raid_mirror +OO: OO_LVCONVERT +ID: lvconvert_raid_or_mirror_to_linear +DESC: Convert LV to type linear. + +--- + +lvconvert --splitmirrors Number --name LV_new LV_raid1_mirror_cache +OO: OO_LVCONVERT +ID: lvconvert_split_mirror_images_to_new +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 +ID: lvconvert_split_mirror_images_and_track +DESC: Split images from a raid1 LV and track changes to origin. + +--- + +# 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: OO_LVCONVERT +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 --mirrorlog MirrorLog LV_mirror +OO: OO_LVCONVERT +ID: lvconvert_change_mirrorlog +DESC: Change the type of log used by LV. + +--- + +lvconvert --splitcache LV_cachepool_cache_thinpool +OO: OO_LVCONVERT +ID: lvconvert_split_and_keep_cachepool +DESC: Separate and preserve a cache pool from a cache LV. + +--- + +lvconvert --uncache LV_cache_thinpool +OO: OO_LVCONVERT +ID: lvconvert_split_and_delete_cachepool +DESC: Separate and remove a cache pool from a cache LV. + +--- + +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 +ID: lvconvert_poll_mirror +DESC: Poll LV to collapse resync layers. + +--- + +# FIXME: add a new option defining this operation, e.g. --swapmetadata + +lvconvert --poolmetadata LV LV_thinpool_cachepool +ID: lvconvert_swap_pool_metadata +DESC: Swap metadata LV in a thin pool or cache pool (temporary command). + +--- + +# --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 String, --setactivationskip Bool, --test, --wipesignatures Bool, +--zero Bool + +OO_LVCREATE_CACHE: --cachemode CacheMode, --cachepolicy String, --cachesettings String + +OO_LVCREATE_POOL: --poolmetadatasize SizeMB, --poolmetadataspare Bool, --chunksize SizeKB + +OO_LVCREATE_THIN: --discards Discards, --errorwhenfull Bool + +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. + +--- + +lvcreate --type zero --size SizeMB VG +OO: OO_LVCREATE +ID: lvcreate_zero_vol +DESC: Create an LV that returns zeros when read. + +--- + +lvcreate --type linear --size SizeMB VG +OO: OO_LVCREATE +OP: PV ... +ID: lvcreate_linear +DESC: Create a linear LV. + +lvcreate --size SizeMB VG +OO: --type linear, 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, --corelog, --regionsize SizeMB, OO_LVCREATE +OP: PV ... +ID: lvcreate_mirror +DESC: Create a mirror LV. + +# alternate form of lvcreate --type raid1|mirror +lvcreate --mirrors SNumber --size SizeMB VG +OO: --type raid1, --type mirror, --mirrorlog MirrorLog, --corelog, OO_LVCREATE_RAID, OO_LVCREATE +OP: PV ... +ID: lvcreate_mirror +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.) + +--- + +lvcreate --type snapshot --size SizeMB LV +OO: --snapshot, OO_LVCREATE +OP: PV ... +ID: lvcreate_cow_snapshot +DESC: Create a COW snapshot LV from an origin LV. + +# alternate form of lvcreate --type snapshot +lvcreate --snapshot --size SizeMB LV +OO: --type snapshot, OO_LVCREATE +OP: PV ... +ID: lvcreate_cow_snapshot +DESC: Create a COW snapshot LV from an origin LV +DESC: (infers --type snapshot). + +--- + +lvcreate --type snapshot --size SizeMB --virtualsize SizeMB VG +OO: --snapshot, --virtualoriginsize SizeMB, 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: OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE +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 +OP: PV ... +ID: lvcreate_thinpool +DESC: Create a thin pool (variant, infers --type thin-pool). + +--- + +lvcreate --type cache-pool --size SizeMB VG +OO: 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 --cache --size SizeMB VG +OO: --type cache-pool, OO_LVCREATE_POOL, OO_LVCREATE_CACHE, OO_LVCREATE +OP: PV ... +ID: lvcreate_cachepool +DESC: Create a cache pool (variant, infers --type cache-pool). + +--- + +lvcreate --type thin --virtualsize SizeMB --thinpool LV_thinpool +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 --virtualsize SizeMB --thinpool LV_thinpool +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). + +# 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 arg pos 1 +DESC: (variant, infers --type thin). + +--- + +lvcreate --type thin LV_thin +OO: 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 LV_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: 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). + +--- + +lvcreate --type thin --virtualsize SizeMB --size SizeMB --thinpool LV_new +OO: OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE +OP: PV ... +ID: lvcreate_thin_vol_with_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 +OP: PV ... +ID: lvcreate_thin_vol_with_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). + +lvcreate --type thin --virtualsize SizeMB --size SizeMB LV_new +OO: OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE +OP: PV ... +ID: lvcreate_thin_vol_with_thinpool +DESC: Create a thin LV, first creating a thin pool for it, +DESC: where the new thin pool is named in arg pos 1. + +lvcreate --thin --virtualsize SizeMB --size SizeMB LV_new +OO: --type thin, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE +OP: PV ... +ID: lvcreate_thin_vol_with_thinpool +DESC: Create a thin LV, first creating a thin pool for it, +DESC: where the new thin pool is named in arg pos 1, +DESC: (variant, infers --type thin). + +lvcreate --type thin --virtualsize SizeMB --size SizeMB VG +OO: OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE +OP: PV ... +ID: lvcreate_thin_vol_with_thinpool +DESC: Create a thin LV, first creating a thin pool for it. + +--- + +lvcreate --size SizeMB --virtualsize SizeMB VG +OO: --type thin, --type snapshot, --thin, --snapshot, +--virtualoriginsize SizeMB, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE +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: Infers --type thin or --type snapshot according to +DESC: confing setting sparse_segtype_default. + +--- + +# FIXME: this should be done by lvconvert, and this command deprecated + +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. + +--- + +lvcreate --type cache --size SizeMB --cachepool LV_cachepool +OO: --cache, OO_LVCREATE_POOL, OO_LVCREATE_CACHE, OO_LVCREATE +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 in arg pos 1. + +lvcreate --size SizeMB --cachepool LV_cachepool +OO: --type cache, --cache, OO_LVCREATE_CACHE, OO_LVCREATE +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 in arg pos 1. +DESC: (variant, infers --type cache). + +--- + +lvdisplay +OO: --aligned, --all, --binary, --colon, --columns, +--configreport String, --foreign, --history, --ignorelockingfailure, +--ignoreskippedcluster, --logonly, --maps, --noheadings, +--nosuffix, --options String, --sort String, --partial, --readonly, +--reportformat String, --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 String, --resizefs, +--stripes Number, --stripesize SizeKB, --test, --poolmetadatasize SizeMB +OP: PV ... +ID: lvextend_by_size + +lvextend LV PV ... +OO: --alloc Alloc, --autobackup Bool, --force, --mirrors SNumber, +--nofsck, --nosync, --noudevsync, +--reportformat String, --resizefs, --stripes Number, --stripesize SizeKB, +--test +ID: lvextend_by_pv + +lvextend --poolmetadatasize SizeMB LV_thinpool +OO: --alloc Alloc, --autobackup Bool, --force, --mirrors SNumber, +--nofsck, --nosync, --noudevsync, +--reportformat String, --stripes Number, --stripesize SizeKB, +--test +OP: PV ... +ID: lvextend_pool_metadata_by_size + +lvextend --usepolicies LV_thinpool_snapshot +OO: --alloc Alloc, --autobackup Bool, --force, --mirrors SNumber, +--nofsck, --nosync, --noudevsync, +--reportformat String, --resizefs, +--test +ID: lvextend_by_policy + +--- + +lvmconfig +OO: OO_CONFIG +ID: lvmconfig_general + +--- + +lvreduce --size SizeMB LV +OO: --autobackup Bool, --force, --nofsck, --noudevsync, +--reportformat String, --resizefs, --test +ID: lvreduce_general + +--- + +lvremove VG|LV|Tag|Select ... +OO: --autobackup Bool, --force, --nohistory, --noudevsync, +--reportformat String, --select String, --test +ID: lvremove_general + +--- + +lvrename VG LV LV_new +OO: --autobackup Bool, --noudevsync, --reportformat String, --test +ID: lvrename_vg_lv_lv + +lvrename LV LV_new +OO: --autobackup Bool, --noudevsync, --reportformat String, --test +ID: lvrename_lv_lv + +--- + +lvresize --size SizeMB LV +OO: --alloc Alloc, --autobackup Bool, --force, +--nofsck, --nosync, --noudevsync, --reportformat String, --resizefs, +--stripes Number, --stripesize SizeKB, --test, --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 String, --resizefs, --stripes Number, --stripesize SizeKB, +--test +ID: lvresize_by_pv +DESC: Resize an LV by a specified PV. + +lvresize --poolmetadatasize SizeMB LV_thinpool +OO: --alloc Alloc, --autobackup Bool, --force, +--nofsck, --nosync, --noudevsync, +--reportformat String, --stripes Number, --stripesize SizeKB, +--test +OP: PV ... +ID: lvresize_pool_metadata_by_size +DESC: Resize the metadata SubLV of a pool LV. + +--- + +lvs +OO: --history, --segments, OO_REPORT +OP: VG|LV|Tag ... +ID: lvs_general + +--- + +lvscan +OO: --all, --blockdevice, --ignorelockingfailure, --partial, +--readonly, --reportformat String, --cache_long +ID: lvscan_general + +--- + +# None of these can function as a required option for pvchange. +OO_PVCHANGE: --autobackup Bool, --force, --ignoreskippedcluster, +--reportformat String, --test, --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 + +pvchange OO_PVCHANGE_META PV|Select ... +OO: --select String, OO_PVCHANGE +ID: pvchange_properties_some + +--- + +pvresize PV ... +OO: --setphysicalvolumesize SizeMB, --reportformat String, --test +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, --test, --labelsector Number, --metadatatype MetadataType, +--pvmetadatacopies Number, --metadatacopies MetadataCopies, --metadatasize SizeMB, +--metadataignore Bool, --norestorefile, --setphysicalvolumesize SizeMB, +--reportformat String, --restorefile String, --uuidstr String, --zero Bool +ID: pvcreate_general + +--- + +pvdisplay +OO: --aligned, --all, --binary, --colon, --columns, --configreport String, +--foreign, --ignorelockingfailure, --ignoreskippedcluster, +--logonly, --maps, --noheadings, --nosuffix, --options String, +--readonly, --reportformat String, --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 String, --test +OP: PV ... +ID: pvmove_one + +pvmove +OO: --abort, --background, --test +ID: pvmove_any + +--- + +pvremove PV ... +OO: --force, --reportformat String, --test +ID: pvremove_general + +--- + +pvs +OO: --segments, OO_REPORT +OP: PV|Tag ... +ID: pvs_general + +--- + +pvscan +OO: --ignorelockingfailure, --reportformat String, --exported, --novolumegroup, +--short, --uuid +ID: pvscan_show + +pvscan --cache_long +OO: --ignorelockingfailure, --reportformat String, --background, +--activate Active, --major Number, --minor Number, +OP: PV|String ... +ID: pvscan_cache + +--- + +vgcfgbackup +OO: --file String, --foreign, --ignorelockingfailure, --partial, --readonly, +--reportformat String +OP: VG ... +ID: vgcfgbackup_general + +--- + +vgcfgrestore VG +OO: --file String, --force_long, --list, --metadatatype MetadataType, --test +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 String, --select String, --test, --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, --metadatacopies MetadataCopies, --vgmetadatacopies MetadataCopies, +--physicalextentsize SizeMB, --resizeable Bool, --systemid String, --locktype LockType, +--profile String, --detachprofile, --metadataprofile String, + +vgchange OO_VGCHANGE_META +OO: OO_VGCHANGE +OP: VG|Tag ... +ID: vgchange_properties + +vgchange --monitor Bool +OO: --sysinit, --ignorelockingfailure, --poll Bool, OO_VGCHANGE_META, OO_VGCHANGE +OP: VG|Tag ... +ID: vgchange_monitor + +vgchange --poll Bool +OO: --ignorelockingfailure, OO_VGCHANGE_META, OO_VGCHANGE +OP: VG|Tag ... +ID: vgchange_poll + +vgchange --activate Active +OO: --activationmode ActivationMode, --ignoreactivationskip, --partial, --sysinit, +--ignorelockingfailure, --monitor Bool, --poll Bool, OO_VGCHANGE_META, OO_VGCHANGE +OP: VG|Tag ... +ID: vgchange_activate + +vgchange --refresh +OO: --sysinit, --ignorelockingfailure, --monitor Bool, --poll Bool, OO_VGCHANGE_META, OO_VGCHANGE +OP: VG|Tag ... +ID: vgchange_refresh + +vgchange --lockstart +OO: --lockopt String, OO_VGCHANGE_META, OO_VGCHANGE +OP: VG|Tag ... +ID: vgchange_lockstart + +vgchange --lockstop +OO: --lockopt String, OO_VGCHANGE_META, OO_VGCHANGE +OP: VG|Tag ... +ID: vgchange_lockstop + +--- + +vgck +OO: --reportformat String +OP: VG|Tag ... +ID: vgck_general + +--- + +vgconvert VG ... +OO: --force, --test, --labelsector Number, --bootloaderareasize SizeMB, +--metadatatype MetadataType, --pvmetadatacopies Number, +--metadatasize SizeMB, --reportformat String +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, --test, --force, --zero Bool, --labelsector Number, +--metadatasize SizeMB, --pvmetadatacopies Number, --reportformat String, --metadatacopies MetadataCopies, +--vgmetadatacopies MetadataCopies, --dataalignment SizeKB, --dataalignmentoffset SizeKB, +--shared, --systemid String, --locktype LockType, --lockopt String +ID: vgcreate_general + +--- + +vgdisplay +OO: --activevolumegroups, --aligned, --binary, --colon, --columns, +--configreport String, --foreign, --ignorelockingfailure, +--ignoreskippedcluster, --logonly, --noheadings, --nosuffix, +--options String, --partial, --readonly, --reportformat String, --select String, +--shared, --short, --separator String, --sort String, --unbuffered, --units Units +OP: VG|Tag ... +ID: vgdisplay_general + +--- + +OO_VGEXPORT: --reportformat String, --test + +vgexport VG|Tag|Select ... +OO: --select String, OO_VGEXPORT +ID: vgexport_some + +vgexport --all +OO: OO_VGEXPORT +ID: vgexport_all + +--- + +vgextend VG PV ... +OO: --autobackup Bool, --test, +--force, --zero Bool, --labelsector Number, --metadatatype MetadataType, +--metadatasize SizeMB, --pvmetadatacopies Number, +--metadataignore Bool, --dataalignment SizeKB, --dataalignmentoffset SizeKB, +--reportformat String, --restoremissing +ID: vgextend_general + +--- + +OO_VGIMPORT: --force, --reportformat String, --test + +vgimport VG|Tag|Select ... +OO: --select String, OO_VGIMPORT +ID: vgimport_some + +vgimport --all +OO: OO_VGIMPORT +ID: vgimport_all + +--- + +vgimportclone PV ... +OO: --basevgname VG, --test, --import +ID: vgimportclone_general + +--- + +vgmerge VG VG +OO: --autobackup Bool, --list, --test +ID: vgmerge_general + +--- + +vgmknodes +OO: --ignorelockingfailure, --refresh, --reportformat String +OP: VG|LV|Tag ... +ID: vgmknodes_general + +--- + +OO_VGREDUCE: --autobackup Bool, --force, --reportformat String, --test + +vgreduce VG PV ... +OO: OO_VGREDUCE +ID: vgreduce_by_pv + +vgreduce --all VG +OO: OO_VGREDUCE +ID: vgreduce_all + +vgreduce --removemissing VG +OO: --mirrorsonly, OO_VGREDUCE +ID: vgreduce_missing + +--- + +vgremove VG|Tag|Select ... +OO: --force, --noudevsync, --reportformat String, --select String, --test +ID: vgremove_general + +--- + +vgrename VG VG_new +OO: --autobackup Bool, --force, --reportformat String, --test +ID: vgrename_by_name + +vgrename String VG_new +OO: --autobackup Bool, --force, --reportformat String, --test +ID: vgrename_by_uuid + +--- + +vgs +OO: OO_REPORT +OP: VG|Tag ... +ID: vgs_general + +--- + +vgscan +OO: --cache_long, --ignorelockingfailure, --mknodes, --notifydbus, +--partial, --reportformat String +ID: vgscan_general + +--- + +OO_VGSPLIT: --autobackup Bool, --test + +OO_VGSPLIT_NEW: --alloc Alloc, --clustered Bool, +--maxlogicalvolumes Number, --maxphysicalvolumes Number, +--metadatatype MetadataType, --vgmetadatacopies MetadataCopies + +vgsplit VG VG PV ... +OO: OO_VGSPLIT +ID: vgsplit_by_pv_to_existing + +vgsplit --name LV VG VG +OO: OO_VGSPLIT +ID: vgsplit_by_lv_to_existing + +vgsplit VG VG_new PV ... +OO: OO_VGSPLIT, OO_VGSPLIT_NEW +ID: vgsplit_by_pv_to_new + +vgsplit --name LV VG VG_new +OO: OO_VGSPLIT, OO_VGSPLIT_NEW +ID: vgsplit_by_lv_to_new + +--- + +# 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 String, --rows, +--select String, --separator String, --sort String, --unbuffered, --unquoted +ID: devtypes_general + +fullreport +OO: OO_REPORT +OP: VG ... +ID: fullreport_general + +lastlog +OO: --reportformat String, --select String +ID: lastlog_general + +lvpoll --polloperation String LV ... +OO: --abort, --autobackup Bool, --handlemissingpvs, --interval Number, --test +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 + diff --git a/scripts/create-commands.c b/scripts/create-commands.c new file mode 100644 index 000000000..ae496b016 --- /dev/null +++ b/scripts/create-commands.c @@ -0,0 +1,2167 @@ +#include <asm/types.h> +#include <sys/types.h> +#include <sys/ioctl.h> +#include <sys/stat.h> +#include <sys/time.h> +#include <sys/wait.h> +#include <stdio.h> +#include <errno.h> +#include <string.h> +#include <stdlib.h> +#include <stddef.h> +#include <stdint.h> +#include <stdarg.h> +#include <limits.h> +#include <unistd.h> +#include <syslog.h> +#include <sched.h> +#include <dirent.h> +#include <ctype.h> +#include <getopt.h> + +/* needed to include args.h */ +#define ARG_COUNTABLE 0x00000001 +#define ARG_GROUPABLE 0x00000002 +struct cmd_context; +struct arg_values; + +int yes_no_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int activation_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int cachemode_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int discards_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int mirrorlog_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int size_kb_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int size_mb_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int size_mb_arg_with_percent(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int int_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int int_arg_with_sign(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int int_arg_with_sign_and_percent(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int major_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int minor_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int string_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int tag_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int permission_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int metadatatype_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int units_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int segtype_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int alloc_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int locktype_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int readahead_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; } +int metadatacopies_arg(struct cmd_context *cmd __attribute__((unused)), struct arg_values *av) { return 0; } + +/* also see arg_props */ +struct opt_name { + const char *name; + int opt_enum; /* enum from args.h */ + const char short_opt; + char _padding[7]; + const char *long_opt; + int val_enum; /* enum from vals.h */ + uint32_t unused1; + uint32_t unused2; +}; + +/* also see val_props */ +struct val_name { + const char *enum_name; + int val_enum; /* enum from vals.h */ + int (*fn) (struct cmd_context *cmd, struct arg_values *av); /* unused here */ + const char *name; + const char *usage; +}; + +/* create foo_VAL enums */ + +enum { +#define val(a, b, c, d) a , +#include "vals.h" +#undef val +}; + +/* create foo_ARG enums */ + +enum { +#define arg(a, b, c, d, e, f) a , +#include "args.h" +#undef arg +}; + +/* create table of value names, e.g. String, and corresponding enum from vals.h */ + +static struct val_name val_names[VAL_COUNT + 1] = { +#define val(a, b, c, d) { # a, a, b, c, d }, +#include "vals.h" +#undef val +}; + +/* create table of option names, e.g. --foo, and corresponding enum from args.h */ + +static struct opt_name opt_names[ARG_COUNT + 1] = { +#define arg(a, b, c, d, e, f) { # a, a, b, "", "--" c, d, e, f }, +#include "args.h" +#undef arg +}; + +#include "command.h" + +#define MAX_CMD_NAMES 128 +struct cmd_name { + const char *name; + const char *desc; +}; + +/* create table of command names, e.g. vgcreate */ + +static struct cmd_name cmd_names[MAX_CMD_NAMES] = { +#define xx(a, b, c) { # a , b } , +#include "commands.h" +#undef xx +}; + +#define MAX_LINE 1024 +#define MAX_LINE_ARGC 256 + +#define REQUIRED 1 +#define OPTIONAL 0 + +struct oo_line { + char *name; + char *line; +}; + +#define MAX_CMDS 256 +int cmd_count; +struct command cmd_array[MAX_CMDS]; + +struct command common_options; /* for printing common usage */ + +#define MAX_OO_LINES 256 +int oo_line_count; +struct oo_line oo_lines[MAX_OO_LINES]; + + +static void add_optional_opt_line(struct command *cmd, int argc, char *argv[]); + +/* + * modifies buf, replacing the sep characters with \0 + * argv pointers point to positions in buf + */ + +static char *split_line(char *buf, int *argc, char **argv, char sep) +{ + char *p = buf, *rp = NULL; + int i; + + argv[0] = p; + + for (i = 1; i < MAX_LINE_ARGC; i++) { + p = strchr(buf, sep); + if (!p) + break; + *p = '\0'; + + argv[i] = p + 1; + buf = p + 1; + } + *argc = i; + + /* we ended by hitting \0, return the point following that */ + if (!rp) + rp = strchr(buf, '\0') + 1; + + return rp; +} + +/* convert value string, e.g. Number, to foo_VAL enum */ + +static int val_str_to_num(char *str) +{ + char name[32] = { 0 }; + char *new; + int i; + + /* compare the name before any suffix like _new or _<lvtype> */ + + strncpy(name, str, 31); + if ((new = strstr(name, "_"))) + *new = '\0'; + + for (i = 0; i < VAL_COUNT; i++) { + if (!val_names[i].name) + break; + if (!strncmp(name, val_names[i].name, strlen(val_names[i].name))) + return val_names[i].val_enum; + } + + return 0; +} + +/* convert "--option" to foo_ARG enum */ + +static int opt_str_to_num(char *str) +{ + char long_name[32]; + char *p; + int i; + + /* + * --foo_long means there are two args entries + * for --foo, one with a short option and one + * without, and we want the one without the + * short option. + */ + if (strstr(str, "_long")) { + strcpy(long_name, str); + p = strstr(long_name, "_long"); + *p = '\0'; + + for (i = 0; i < ARG_COUNT; i++) { + if (!opt_names[i].long_opt) + continue; + /* skip anything with a short opt */ + if (opt_names[i].short_opt) + continue; + if (!strcmp(opt_names[i].long_opt, long_name)) + return opt_names[i].opt_enum; + } + + printf("Unknown opt str: %s %s\n", str, long_name); + exit(1); + } + + for (i = 0; i < ARG_COUNT; i++) { + if (!opt_names[i].long_opt) + continue; + /* These are only selected using --foo_long */ + if (strstr(opt_names[i].name, "_long_ARG")) + continue; + if (!strcmp(opt_names[i].long_opt, str)) + return opt_names[i].opt_enum; + } + + printf("Unknown opt str: \"%s\"\n", str); + exit(1); +} + +static char *val_bits_to_str(int val_bits) +{ + static char buf[128]; + int i; + int or = 0; + + memset(buf, 0, sizeof(buf)); + + for (i = 0; i < VAL_COUNT; i++) { + if (val_bits & val_enum_to_bit(i)) { + if (or) strcat(buf, " | "); + strcat(buf, "val_enum_to_bit("); + strcat(buf, val_names[i].enum_name); + strcat(buf, ")"); + or = 1; + } + } + + return buf; +} + +/* + * The _<lvtype> and _new suffixes are only used by the command definitions and + * are not exposed to lvm at large, which uses only the ARG_DEF values. + */ + +static uint32_t lv_str_to_types(char *str) +{ + char copy[128] = { 0 }; + char *argv[MAX_LINE_ARGC]; + int argc; + char *name; + uint32_t types = 0; + int i; + + strncpy(copy, str, 128); + + split_line(copy, &argc, argv, '_'); + + for (i = 0; i < argc; i++) { + name = argv[i]; + + if (!strcmp(name, "linear")) + types |= ARG_DEF_LV_LINEAR; + + if (!strcmp(name, "striped")) + types |= ARG_DEF_LV_STRIPED; + + if (!strcmp(name, "snapshot")) + types |= ARG_DEF_LV_SNAPSHOT; + + if (!strcmp(name, "mirror")) + types |= ARG_DEF_LV_MIRROR; + + if (!strcmp(name, "thin")) + types |= ARG_DEF_LV_THIN; + + if (!strcmp(name, "thinpool")) + types |= ARG_DEF_LV_THINPOOL; + + if (!strcmp(name, "cache")) + types |= ARG_DEF_LV_CACHE; + + if (!strcmp(name, "cachepool")) + types |= ARG_DEF_LV_CACHEPOOL; + + if (!strcmp(name, "raid0")) + types |= ARG_DEF_LV_RAID0; + + if (!strcmp(name, "raid1")) + types |= ARG_DEF_LV_RAID1; + + if (!strcmp(name, "raid4")) + types |= ARG_DEF_LV_RAID4; + + if (!strcmp(name, "raid5")) + types |= ARG_DEF_LV_RAID5; + + if (!strcmp(name, "raid6")) + types |= ARG_DEF_LV_RAID6; + + if (!strcmp(name, "raid10")) + types |= ARG_DEF_LV_RAID10; + + if (!strcmp(name, "raid")) + types |= ARG_DEF_LV_RAID; + } + + return types; +} + +static const char *lv_num_to_str(int num) +{ + switch (num) { + case ARG_DEF_LV_LINEAR: + return "linear"; + case ARG_DEF_LV_STRIPED: + return "striped"; + case ARG_DEF_LV_SNAPSHOT: + return "snapshot"; + case ARG_DEF_LV_MIRROR: + return "mirror"; + case ARG_DEF_LV_RAID: + return "raid"; + case ARG_DEF_LV_RAID0: + return "raid0"; + case ARG_DEF_LV_RAID1: + return "raid1"; + case ARG_DEF_LV_RAID4: + return "raid4"; + case ARG_DEF_LV_RAID5: + return "raid5"; + case ARG_DEF_LV_RAID6: + return "raid6"; + case ARG_DEF_LV_RAID10: + return "raid10"; + case ARG_DEF_LV_THIN: + return "thin"; + case ARG_DEF_LV_THINPOOL: + return "thinpool"; + case ARG_DEF_LV_CACHE: + return "cache"; + case ARG_DEF_LV_CACHEPOOL: + return "cachepool"; + default: + printf("lv_num_to_str: unknown LV num: %d\n", num); + exit(1); + } +} + +static char *lv_types_to_flags(int lv_types) +{ + static char buf_lv_types[128]; + int or = 0; + + memset(buf_lv_types, 0, sizeof(buf_lv_types)); + + if (lv_types & ARG_DEF_LV_LINEAR) { + if (or) strcat(buf_lv_types, " | "); + strcat(buf_lv_types, "ARG_DEF_LV_LINEAR"); + or = 1; + } + + if (lv_types & ARG_DEF_LV_STRIPED) { + if (or) strcat(buf_lv_types, " | "); + strcat(buf_lv_types, "ARG_DEF_LV_STRIPED"); + or = 1; + } + + if (lv_types & ARG_DEF_LV_SNAPSHOT) { + if (or) strcat(buf_lv_types, " | "); + strcat(buf_lv_types, "ARG_DEF_LV_SNAPSHOT"); + or = 1; + } + + if (lv_types & ARG_DEF_LV_MIRROR) { + if (or) strcat(buf_lv_types, " | "); + strcat(buf_lv_types, "ARG_DEF_LV_MIRROR"); + or = 1; + } + + if (lv_types & ARG_DEF_LV_RAID) { + if (or) strcat(buf_lv_types, " | "); + strcat(buf_lv_types, "ARG_DEF_LV_RAID"); + or = 1; + } + + if (lv_types & ARG_DEF_LV_RAID0) { + if (or) strcat(buf_lv_types, " | "); + strcat(buf_lv_types, "ARG_DEF_LV_RAID0"); + or = 1; + } + + if (lv_types & ARG_DEF_LV_RAID1) { + if (or) strcat(buf_lv_types, " | "); + strcat(buf_lv_types, "ARG_DEF_LV_RAID1"); + or = 1; + } + + if (lv_types & ARG_DEF_LV_RAID4) { + if (or) strcat(buf_lv_types, " | "); + strcat(buf_lv_types, "ARG_DEF_LV_RAID4"); + or = 1; + } + + if (lv_types & ARG_DEF_LV_RAID5) { + if (or) strcat(buf_lv_types, " | "); + strcat(buf_lv_types, "ARG_DEF_LV_RAID5"); + or = 1; + } + + if (lv_types & ARG_DEF_LV_RAID6) { + if (or) strcat(buf_lv_types, " | "); + strcat(buf_lv_types, "ARG_DEF_LV_RAID6"); + or = 1; + } + + if (lv_types & ARG_DEF_LV_RAID10) { + if (or) strcat(buf_lv_types, " | "); + strcat(buf_lv_types, "ARG_DEF_LV_RAID10"); + or = 1; + } + + if (lv_types & ARG_DEF_LV_THIN) { + if (or) strcat(buf_lv_types, " | "); + strcat(buf_lv_types, "ARG_DEF_LV_THIN"); + or = 1; + } + + if (lv_types & ARG_DEF_LV_THINPOOL) { + if (or) strcat(buf_lv_types, " | "); + strcat(buf_lv_types, "ARG_DEF_LV_THINPOOL"); + or = 1; + } + + if (lv_types & ARG_DEF_LV_CACHE) { + if (or) strcat(buf_lv_types, " | "); + strcat(buf_lv_types, "ARG_DEF_LV_CACHE"); + or = 1; + } + + if (lv_types & ARG_DEF_LV_CACHEPOOL) { + if (or) strcat(buf_lv_types, " | "); + strcat(buf_lv_types, "ARG_DEF_LV_CACHEPOOL"); + or = 1; + } + + return buf_lv_types; +} + +static const char *is_command_name(char *str) +{ + int i; + + for (i = 0; i < MAX_CMD_NAMES; i++) { + if (!cmd_names[i].name) + break; + if (!strcmp(cmd_names[i].name, str)) + return cmd_names[i].name; + } + return NULL; +} + +static const char *cmd_name_desc(const char *name) +{ + int i; + + for (i = 0; i < MAX_CMD_NAMES; i++) { + if (!cmd_names[i].name) + break; + if (!strcmp(cmd_names[i].name, name)) + return cmd_names[i].desc; + } + return NULL; +} + +static int is_opt_name(char *str) +{ + if (!strncmp(str, "--", 2)) + return 1; + + if ((str[0] == '-') && (str[1] != '-')) { + printf("Options must be specified in long form: %s\n", str); + exit(1); + } + + return 0; +} + +/* + * "Select" as a pos name means that the position + * can be empty if the --select option is used. + */ + +static int is_pos_name(char *str) +{ + if (!strncmp(str, "VG", 2)) + return 1; + if (!strncmp(str, "LV", 2)) + return 1; + if (!strncmp(str, "PV", 2)) + return 1; + if (!strncmp(str, "Tag", 3)) + return 1; + if (!strncmp(str, "String", 6)) + return 1; + if (!strncmp(str, "Select", 6)) + return 1; + return 0; +} + +static int is_oo_definition(char *str) +{ + if (!strncmp(str, "OO_", 3)) + return 1; + return 0; +} + +static int is_oo_line(char *str) +{ + if (!strncmp(str, "OO:", 3)) + return 1; + return 0; +} + +static int is_op_line(char *str) +{ + if (!strncmp(str, "OP:", 3)) + return 1; + return 0; +} + +static int is_desc_line(char *str) +{ + if (!strncmp(str, "DESC:", 5)) + return 1; + return 0; +} + +static int is_id_line(char *str) +{ + if (!strncmp(str, "ID:", 3)) + return 1; + return 0; +} + +/* + * parse str for anything that can appear in a position, + * like VG, VG|LV, VG|LV_linear|LV_striped, etc + */ + +static void set_pos_def(struct command *cmd, char *str, struct arg_def *def) +{ + char *argv[MAX_LINE_ARGC]; + int argc; + char *name; + int val_enum; + int i; + + split_line(str, &argc, argv, '|'); + + for (i = 0; i < argc; i++) { + name = argv[i]; + + val_enum = val_str_to_num(name); + + if (!val_enum) { + printf("Unknown pos arg: %s\n", name); + exit(1); + } + + def->val_bits |= val_enum_to_bit(val_enum); + + if ((val_enum == lv_VAL) && strstr(name, "_")) + def->lv_types = lv_str_to_types(name); + + if (strstr(name, "_new")) + def->flags |= ARG_DEF_FLAG_NEW; + } +} + +/* + * parse str for anything that can follow --option + */ + +static void set_opt_def(struct command *cmd, char *str, struct arg_def *def) +{ + char *argv[MAX_LINE_ARGC]; + int argc; + char *name; + int val_enum; + int i, j; + + split_line(str, &argc, argv, '|'); + + for (i = 0; i < argc; i++) { + name = argv[i]; + + val_enum = val_str_to_num(name); + + if (!val_enum) { + /* a literal number or string */ + + if (isdigit(name[0])) + val_enum = constnum_VAL; + + else if (isalpha(name[0])) + val_enum = conststr_VAL; + + else { + printf("Unknown opt arg: %s\n", name); + exit(0); + } + } + + + def->val_bits |= val_enum_to_bit(val_enum); + + if (val_enum == constnum_VAL) + def->num = (uint64_t)atoi(name); + + if (val_enum == conststr_VAL) + def->str = strdup(name); + + if (val_enum == lv_VAL) { + if (strstr(name, "_")) + def->lv_types = lv_str_to_types(name); + } + + if ((val_enum == vg_VAL) || (val_enum == lv_VAL) || (val_enum == pv_VAL)) { + if (strstr(name, "_new")) + def->flags |= ARG_DEF_FLAG_NEW; + } + } +} + + +/* + * OO_FOO: --opt1 ... + * + * oo->name = "OO_FOO"; + * oo->line = "--opt1 ..."; + */ + +static void add_oo_definition_line(const char *name, const char *line) +{ + struct oo_line *oo; + char *colon; + char *start; + + oo = &oo_lines[oo_line_count++]; + oo->name = strdup(name); + + if ((colon = strstr(oo->name, ":"))) + *colon = '\0'; + else { + printf("invalid OO definition\n"); + exit(1); + } + + start = strstr(line, ":") + 2; + oo->line = strdup(start); +} + +/* when OO_FOO: continues on multiple lines */ + +static void append_oo_definition_line(const char *new_line) +{ + struct oo_line *oo; + char *old_line; + char *line; + int len; + + oo = &oo_lines[oo_line_count-1]; + + old_line = oo->line; + + /* +2 = 1 space between old and new + 1 terminating \0 */ + len = strlen(old_line) + strlen(new_line) + 2; + line = malloc(len); + memset(line, 0, len); + + strcat(line, old_line); + strcat(line, " "); + strcat(line, new_line); + + free(oo->line); + oo->line = line; +} + +char *get_oo_line(char *str) +{ + char *name; + char *end; + char str2[64]; + int i; + + strcpy(str2, str); + if ((end = strstr(str2, ":"))) + *end = '\0'; + if ((end = strstr(str2, ","))) + *end = '\0'; + + for (i = 0; i < oo_line_count; i++) { + name = oo_lines[i].name; + if (!strcmp(name, str2)) + return oo_lines[i].line; + } + return NULL; +} + +/* add optional_opt_args entries when OO_FOO appears on OO: line */ + +static void include_optional_opt_args(struct command *cmd, char *str) +{ + char *oo_line; + char *line; + char *line_argv[MAX_LINE_ARGC]; + int line_argc; + + if (!(oo_line = get_oo_line(str))) { + printf("No OO line found for %s\n", str); + exit(1); + } + + if (!(line = strdup(oo_line))) + exit(1); + + split_line(line, &line_argc, line_argv, ' '); + add_optional_opt_line(cmd, line_argc, line_argv); + free(line); +} + +static void add_opt_arg(struct command *cmd, char *str, int *takes_arg, int required) +{ + char *comma; + int opt; + + /* opt_arg.opt set here */ + /* opt_arg.def will be set in update_prev_opt_arg() if needed */ + + if ((comma = strstr(str, ","))) + *comma = '\0'; + + /* + * Work around nasty hack where --uuid is used for both uuid_ARG + * and uuidstr_ARG. The input uses --uuidstr, where an actual + * command uses --uuid string. + */ + if (!strcmp(str, "--uuidstr")) { + opt = uuidstr_ARG; + goto skip; + } + + opt = opt_str_to_num(str); +skip: + if (required) + cmd->required_opt_args[cmd->ro_count++].opt = opt; + else + cmd->optional_opt_args[cmd->oo_count++].opt = opt; + + *takes_arg = opt_names[opt].val_enum ? 1 : 0; +} + +static void update_prev_opt_arg(struct command *cmd, char *str, int required) +{ + struct arg_def def = { 0 }; + char *comma; + + if (str[0] == '-') { + printf("Option %s must be followed by an arg.\n", str); + exit(1); + } + + /* opt_arg.def set here */ + /* opt_arg.opt was previously set in add_opt_arg() when --foo was read */ + + if ((comma = strstr(str, ","))) + *comma = '\0'; + + set_opt_def(cmd, str, &def); + + if (required) + cmd->required_opt_args[cmd->ro_count-1].def = def; + else + cmd->optional_opt_args[cmd->oo_count-1].def = def; +} + +static void add_pos_arg(struct command *cmd, char *str, int required) +{ + struct arg_def def = { 0 }; + + /* pos_arg.pos and pos_arg.def are set here */ + + set_pos_def(cmd, str, &def); + + if (required) { + cmd->required_pos_args[cmd->rp_count].pos = cmd->pos_count++; + cmd->required_pos_args[cmd->rp_count].def = def; + cmd->rp_count++; + } else { + cmd->optional_pos_args[cmd->op_count].pos = cmd->pos_count++;; + cmd->optional_pos_args[cmd->op_count].def = def; + cmd->op_count++; + } +} + +/* process something that follows a pos arg, which is not a new pos arg */ + +static void update_prev_pos_arg(struct command *cmd, char *str, int required) +{ + struct arg_def *def; + + /* a previous pos_arg.def is modified here */ + + if (required) + def = &cmd->required_pos_args[cmd->rp_count-1].def; + else + def = &cmd->optional_pos_args[cmd->op_count-1].def; + + if (!strcmp(str, "...")) + def->flags |= ARG_DEF_FLAG_MAY_REPEAT; + else { + printf("Unknown pos arg: %s\n", str); + exit(1); + } +} + +/* process what follows OO:, which are optional opt args */ + +static void add_optional_opt_line(struct command *cmd, int argc, char *argv[]) +{ + int takes_arg; + int i; + + for (i = 0; i < argc; i++) { + if (!i && !strncmp(argv[i], "OO:", 3)) + continue; + if (is_opt_name(argv[i])) + add_opt_arg(cmd, argv[i], &takes_arg, OPTIONAL); + else if (!strncmp(argv[i], "OO_", 3)) + include_optional_opt_args(cmd, argv[i]); + else if (takes_arg) + update_prev_opt_arg(cmd, argv[i], OPTIONAL); + else + printf("Can't parse argc %d argv %s prev %s\n", + i, argv[i], argv[i-1]); + } +} + +/* process what follows OP:, which are optional pos args */ + +static void add_optional_pos_line(struct command *cmd, int argc, char *argv[]) +{ + int i; + + for (i = 0; i < argc; i++) { + if (!i && !strncmp(argv[i], "OP:", 3)) + continue; + if (is_pos_name(argv[i])) + add_pos_arg(cmd, argv[i], OPTIONAL); + else + update_prev_pos_arg(cmd, argv[i], OPTIONAL); + } +} + +/* add required opt args from OO_FOO definition */ + +static void add_required_opt_line(struct command *cmd, int argc, char *argv[]) +{ + int takes_arg; + int i; + + for (i = 0; i < argc; i++) { + if (is_opt_name(argv[i])) + add_opt_arg(cmd, argv[i], &takes_arg, REQUIRED); + else if (takes_arg) + update_prev_opt_arg(cmd, argv[i], REQUIRED); + else + printf("Can't parse argc %d argv %s prev %s\n", + i, argv[i], argv[i-1]); + } +} + +/* add to required_opt_args when OO_FOO appears on required line */ + +static void include_required_opt_args(struct command *cmd, char *str) +{ + char *oo_line; + char *line; + char *line_argv[MAX_LINE_ARGC]; + int line_argc; + + if (!(oo_line = get_oo_line(str))) { + printf("No OO line found for %s\n", str); + exit(1); + } + + if (!(line = strdup(oo_line))) + exit(1); + + split_line(line, &line_argc, line_argv, ' '); + add_required_opt_line(cmd, line_argc, line_argv); + free(line); +} + +/* process what follows command_name, which are required opt/pos args */ + +static void add_required_line(struct command *cmd, int argc, char *argv[]) +{ + int i; + int takes_arg; + int prev_was_opt = 0, prev_was_pos = 0; + + /* argv[0] is command name */ + + for (i = 1; i < argc; i++) { + if (is_opt_name(argv[i])) { + add_opt_arg(cmd, argv[i], &takes_arg, REQUIRED); + prev_was_opt = 1; + prev_was_pos = 0; + } else if (prev_was_opt && takes_arg) { + update_prev_opt_arg(cmd, argv[i], REQUIRED); + prev_was_opt = 0; + prev_was_pos = 0; + } else if (is_pos_name(argv[i])) { + add_pos_arg(cmd, argv[i], REQUIRED); + prev_was_opt = 0; + prev_was_pos = 1; + } else if (!strncmp(argv[i], "OO_", 3)) { + cmd->cmd_flags |= CMD_FLAG_ONE_REQUIRED_OPT; + include_required_opt_args(cmd, argv[i]); + } else if (prev_was_pos) { + update_prev_pos_arg(cmd, argv[i], REQUIRED); + } else + printf("Can't parse argc %d argv %s prev %s\n", + i, argv[i], argv[i-1]); + + } +} + +static void print_def(struct arg_def *def, int usage) +{ + int val_enum; + int sep = 0; + int i; + + for (val_enum = 0; val_enum < VAL_COUNT; val_enum++) { + if (def->val_bits & val_enum_to_bit(val_enum)) { + + if (val_enum == conststr_VAL) + printf("%s", def->str); + + else if (val_enum == constnum_VAL) + printf("ll%u", (unsigned long long)def->num); + + else { + if (sep) printf("|"); + + if (!usage || !val_names[val_enum].usage) + printf("%s", val_names[val_enum].name); + else + printf("%s", val_names[val_enum].usage); + + sep = 1; + } + + if (val_enum == lv_VAL && def->lv_types) { + for (i = 0; i < 32; i++) { + if (def->lv_types & (1 << i)) + printf("_%s", lv_num_to_str(1 << i)); + } + } + + if ((val_enum == pv_VAL) || (val_enum == vg_VAL) || (val_enum == lv_VAL)) { + if (def->flags & ARG_DEF_FLAG_NEW) + printf("_new"); + } + } + } + + if (def->flags & ARG_DEF_FLAG_MAY_REPEAT) + printf(" ..."); +} + +void print_expanded(void) +{ + struct command *cmd; + int onereq; + int i, ro, rp, oo, op; + + for (i = 0; i < cmd_count; i++) { + cmd = &cmd_array[i]; + printf("%s", cmd->name); + + onereq = (cmd->cmd_flags & CMD_FLAG_ONE_REQUIRED_OPT) ? 1 : 0; + + if (cmd->ro_count) { + if (onereq) + printf(" ("); + + for (ro = 0; ro < cmd->ro_count; ro++) { + if (ro && onereq) + printf(","); + printf(" %s", opt_names[cmd->required_opt_args[ro].opt].long_opt); + if (cmd->required_opt_args[ro].def.val_bits) { + printf(" "); + print_def(&cmd->required_opt_args[ro].def, 0); + } + } + if (onereq) + printf(" )"); + } + + if (cmd->rp_count) { + for (rp = 0; rp < cmd->rp_count; rp++) { + if (cmd->required_pos_args[rp].def.val_bits) { + printf(" "); + print_def(&cmd->required_pos_args[rp].def, 0); + } + } + } + + if (cmd->oo_count) { + printf("\n"); + printf("OO:"); + for (oo = 0; oo < cmd->oo_count; oo++) { + if (oo) + printf(","); + printf(" %s", opt_names[cmd->optional_opt_args[oo].opt].long_opt); + if (cmd->optional_opt_args[oo].def.val_bits) { + printf(" "); + print_def(&cmd->optional_opt_args[oo].def, 0); + } + } + } + + if (cmd->op_count) { + printf("\n"); + printf("OP:"); + for (op = 0; op < cmd->op_count; op++) { + if (cmd->optional_pos_args[op].def.val_bits) { + printf(" "); + print_def(&cmd->optional_pos_args[op].def, 0); + } + } + } + + printf("\n\n"); + } +} + +static int opt_arg_matches(struct opt_arg *oa1, struct opt_arg *oa2) +{ + if (oa1->opt != oa2->opt) + return 0; + + /* FIXME: some cases may need more specific val_bits checks */ + if (oa1->def.val_bits != oa2->def.val_bits) + return 0; + + if (oa1->def.str && oa2->def.str && strcmp(oa1->def.str, oa2->def.str)) + return 0; + + if (oa1->def.num != oa2->def.num) + return 0; + + /* + * Do NOT compare lv_types because we are checking if two + * command lines are ambiguous before the LV type is known. + */ + + return 1; +} + +static int pos_arg_matches(struct pos_arg *pa1, struct pos_arg *pa2) +{ + if (pa1->pos != pa2->pos) + return 0; + + /* FIXME: some cases may need more specific val_bits checks */ + if (pa1->def.val_bits != pa2->def.val_bits) + return 0; + + if (pa1->def.str && pa2->def.str && strcmp(pa1->def.str, pa2->def.str)) + return 0; + + if (pa1->def.num != pa2->def.num) + return 0; + + /* + * Do NOT compare lv_types because we are checking if two + * command lines are ambiguous before the LV type is known. + */ + + return 1; +} + +static const char *opt_to_enum_str(int opt) +{ + return opt_names[opt].name; +} + +static char *flags_to_str(int flags) +{ + static char buf_flags[32]; + + memset(buf_flags, 0, sizeof(buf_flags)); + + if (flags & ARG_DEF_FLAG_MAY_REPEAT) + strcat(buf_flags, "ARG_DEF_FLAG_MAY_REPEAT"); + if (flags & ARG_DEF_FLAG_NEW) + strcat(buf_flags, "ARG_DEF_FLAG_NEW"); + + return buf_flags; +} + +void print_command_count(void) +{ + struct command *cmd; + int i, j; + + printf("/* Do not edit. This file is generated by scripts/create-commands */\n"); + printf("/* using command definitions from scripts/command-lines.in */\n"); + printf("#define COMMAND_COUNT %d\n", cmd_count); + + printf("enum {\n"); + printf("\tno_CMD,\n"); /* enum value 0 is not used */ + + for (i = 0; i < cmd_count; i++) { + cmd = &cmd_array[i]; + + if (!cmd->command_line_id) { + printf("Missing ID: at %d\n", i); + exit(1); + } + + for (j = 0; j < i; j++) { + if (!strcmp(cmd->command_line_id, cmd_array[j].command_line_id)) + goto next; + } + + printf("\t%s_CMD,\n", cmd->command_line_id); + next: + ; + } + printf("\tCOMMAND_ID_COUNT,\n"); + printf("};\n"); +} + +static int is_common_opt(int opt) +{ + int oo; + + for (oo = 0; oo < common_options.oo_count; oo++) { + if (common_options.optional_opt_args[oo].opt == opt) + return 1; + } + return 0; +} + +/* + * For certain commands (esp commands like lvcreate with many variants), common + * options should not be printed for every variation, but once for all. The + * list of commands this applies to is fixed for now but could be encoded in + * command-lines.in. + * + * The common options are defined in OO_USAGE_COMMON. Those options + * are skipped when creating the usage strings for each variation of + * these commands. Instead they are set in the usage_common string. + */ + +void print_usage(struct command *cmd, int skip_required) +{ + int onereq = (cmd->cmd_flags & CMD_FLAG_ONE_REQUIRED_OPT) ? 1 : 0; + int i, sep, ro, rp, oo, op; + + if (skip_required) + goto oo_count; + + printf("\"%s", cmd->name); + + if (cmd->ro_count) { + if (onereq) + printf(" ("); + for (ro = 0; ro < cmd->ro_count; ro++) { + if (ro && onereq) + printf(","); + printf(" %s", opt_names[cmd->required_opt_args[ro].opt].long_opt); + + if (cmd->required_opt_args[ro].def.val_bits) { + printf(" "); + print_def(&cmd->required_opt_args[ro].def, 1); + } + } + if (onereq) + printf(" )"); + } + + if (cmd->rp_count) { + for (rp = 0; rp < cmd->rp_count; rp++) { + if (cmd->required_pos_args[rp].def.val_bits) { + printf(" "); + print_def(&cmd->required_pos_args[rp].def, 1); + } + } + } + + printf("\""); + + oo_count: + if (!cmd->oo_count) + goto op_count; + + sep = 0; + + if (cmd->oo_count) { + for (oo = 0; oo < cmd->oo_count; oo++) { + /* skip common opts which are in the usage_common string */ + if ((cmd != &common_options) && is_common_opt(cmd->optional_opt_args[oo].opt)) + continue; + + if (!sep) { + printf("\n"); + printf("\" ["); + } + + if (sep) + printf(","); + + printf(" %s", opt_names[cmd->optional_opt_args[oo].opt].long_opt); + if (cmd->optional_opt_args[oo].def.val_bits) { + printf(" "); + print_def(&cmd->optional_opt_args[oo].def, 1); + } + sep = 1; + } + } + + if (sep) + printf(" ]\""); + + op_count: + if (!cmd->op_count) + goto done; + + printf("\n"); + printf("\" ["); + + if (cmd->op_count) { + for (op = 0; op < cmd->op_count; op++) { + if (cmd->optional_pos_args[op].def.val_bits) { + printf(" "); + print_def(&cmd->optional_pos_args[op].def, 1); + } + } + } + + printf(" ]\""); + + done: + printf(";\n"); +} + +static void print_val_man(const char *str) +{ + char *line; + char *line_argv[MAX_LINE_ARGC]; + int line_argc; + int i; + + if (!strcmp(str, "Number") || + !strcmp(str, "String") || + !strncmp(str, "VG", 2) || + !strncmp(str, "LV", 2) || + !strncmp(str, "PV", 2) || + !strcmp(str, "Tag")) { + printf("\\fI%s\\fP", str); + return; + } + + if (strstr(str, "Number[") || strstr(str, "]Number")) { + for (i = 0; i < strlen(str); i++) { + if (str[i] == 'N') + printf("\\fI"); + if (str[i] == 'r') { + printf("%c", str[i]); + printf("\\fP"); + continue; + } + printf("%c", str[i]); + } + return; + } + + if (strstr(str, "|")) { + line = strdup(str); + split_line(line, &line_argc, line_argv, '|'); + for (i = 0; i < line_argc; i++) { + if (i) + printf("|"); + if (strstr(line_argv[i], "Number")) + printf("\\fI%s\\fP", line_argv[i]); + else + printf("\\fB%s\\fP", line_argv[i]); + } + return; + } + + printf("\\fB%s\\fP", str); +} + +static void print_def_man(struct arg_def *def, int usage) +{ + int val_enum; + int sep = 0; + int i; + + for (val_enum = 0; val_enum < VAL_COUNT; val_enum++) { + if (def->val_bits & val_enum_to_bit(val_enum)) { + + if (val_enum == conststr_VAL) { + printf("\\fB"); + printf("%s", def->str); + printf("\\fP"); + } + + else if (val_enum == constnum_VAL) { + printf("\\fB"); + printf("ll%u", (unsigned long long)def->num); + printf("\\fP"); + } + + else { + if (sep) printf("|"); + + if (!usage || !val_names[val_enum].usage) { + printf("\\fI"); + printf("%s", val_names[val_enum].name); + printf("\\fP"); + } else { + print_val_man(val_names[val_enum].usage); + } + + sep = 1; + } + + if (val_enum == lv_VAL && def->lv_types) { + printf("\\fI"); + for (i = 0; i < 32; i++) { + if (def->lv_types & (1 << i)) + printf("_%s", lv_num_to_str(1 << i)); + } + printf("\\fP"); + } + + if ((val_enum == pv_VAL) || (val_enum == vg_VAL) || (val_enum == lv_VAL)) { + if (def->flags & ARG_DEF_FLAG_NEW) { + printf("\\fI"); + printf("_new"); + printf("\\fP"); + } + } + } + } + + if (def->flags & ARG_DEF_FLAG_MAY_REPEAT) + printf(" ..."); +} + +void print_cmd_man(struct command *cmd, int skip_required) +{ + int onereq = (cmd->cmd_flags & CMD_FLAG_ONE_REQUIRED_OPT) ? 1 : 0; + int i, sep, ro, rp, oo, op; + + if (skip_required) + goto oo_count; + + printf("\\fB%s\\fP", cmd->name); + + if (!onereq) + goto ro_normal; + + /* + * one required option in a set, print as: + * ( -a|--a, + * -b|--b, + * --c, + * --d ) + * + * First loop through ro prints those with short opts, + * and the second loop prints those without short opts. + */ + + if (cmd->ro_count) { + printf("\n"); + printf(".RS 4\n"); + printf("("); + + sep = 0; + + for (ro = 0; ro < cmd->ro_count; ro++) { + if (!opt_names[cmd->required_opt_args[ro].opt].short_opt) + continue; + + if (sep) { + printf(","); + printf("\n.br\n"); + printf(" "); + } + + if (opt_names[cmd->required_opt_args[ro].opt].short_opt) { + printf(" \\fB-%c\\fP|\\fB%s\\fP", + opt_names[cmd->required_opt_args[ro].opt].short_opt, + opt_names[cmd->required_opt_args[ro].opt].long_opt); + } else { + printf(" "); + printf(" \\fB%s\\fP", opt_names[cmd->required_opt_args[ro].opt].long_opt); + } + + if (cmd->required_opt_args[ro].def.val_bits) { + printf(" "); + print_def_man(&cmd->required_opt_args[ro].def, 1); + } + + sep = 1; + } + + for (ro = 0; ro < cmd->ro_count; ro++) { + if (opt_names[cmd->required_opt_args[ro].opt].short_opt) + continue; + + if (sep) { + printf(","); + printf("\n.br\n"); + printf(" "); + } + + printf(" "); + printf(" \\fB%s\\fP", opt_names[cmd->required_opt_args[ro].opt].long_opt); + + if (cmd->required_opt_args[ro].def.val_bits) { + printf(" "); + print_def_man(&cmd->required_opt_args[ro].def, 1); + } + + sep = 1; + } + + printf(" )\n"); + printf(".RE\n"); + } + + if (cmd->rp_count) { + printf(".RS 4\n"); + for (rp = 0; rp < cmd->rp_count; rp++) { + if (cmd->required_pos_args[rp].def.val_bits) { + printf(" "); + print_def_man(&cmd->required_pos_args[rp].def, 1); + } + } + + printf("\n"); + printf(".RE\n"); + } else { + /* printf("\n"); */ + } + + printf(".br\n"); + goto oo_count; + + ro_normal: + + /* + * all are required options, print as: + * -a|--a, -b|--b + */ + + if (cmd->ro_count) { + for (ro = 0; ro < cmd->ro_count; ro++) { + if (opt_names[cmd->required_opt_args[ro].opt].short_opt) { + printf(" \\fB-%c\\fP|\\fB%s\\fP", + opt_names[cmd->required_opt_args[ro].opt].short_opt, + opt_names[cmd->required_opt_args[ro].opt].long_opt); + } else { + printf(" \\fB%s\\fP", opt_names[cmd->required_opt_args[ro].opt].long_opt); + } + + if (cmd->required_opt_args[ro].def.val_bits) { + printf(" "); + print_def_man(&cmd->required_opt_args[ro].def, 1); + } + } + } + + if (cmd->rp_count) { + for (rp = 0; rp < cmd->rp_count; rp++) { + if (cmd->required_pos_args[rp].def.val_bits) { + printf(" "); + print_def_man(&cmd->required_pos_args[rp].def, 1); + } + } + + printf("\n"); + } else { + printf("\n"); + } + + printf(".br\n"); + + oo_count: + if (!cmd->oo_count) + goto op_count; + + sep = 0; + + printf(".br\n"); + + if (cmd->oo_count) { + + for (oo = 0; oo < cmd->oo_count; oo++) { + /* skip common opts which are in the usage_common string */ + if ((cmd != &common_options) && is_common_opt(cmd->optional_opt_args[oo].opt)) + continue; + + if (!opt_names[cmd->optional_opt_args[oo].opt].short_opt) + continue; + + if (!sep) { + printf(".RS 4\n"); + printf("["); + } + + if (sep) { + printf(","); + printf("\n.br\n"); + printf(" "); + } + + printf(" \\fB-%c\\fP|\\fB%s\\fP", + opt_names[cmd->optional_opt_args[oo].opt].short_opt, + opt_names[cmd->optional_opt_args[oo].opt].long_opt); + + if (cmd->optional_opt_args[oo].def.val_bits) { + printf(" "); + print_def_man(&cmd->optional_opt_args[oo].def, 1); + } + sep = 1; + } + + for (oo = 0; oo < cmd->oo_count; oo++) { + /* skip common opts which are in the usage_common string */ + if ((cmd != &common_options) && is_common_opt(cmd->optional_opt_args[oo].opt)) + continue; + + if (opt_names[cmd->optional_opt_args[oo].opt].short_opt) + continue; + + if (!sep) { + printf(".RS 4\n"); + printf("["); + } + + if (sep) { + printf(","); + printf("\n.br\n"); + printf(" "); + } + + /* space alignment without short opt */ + printf(" "); + + printf(" \\fB%s\\fP", opt_names[cmd->optional_opt_args[oo].opt].long_opt); + + if (cmd->optional_opt_args[oo].def.val_bits) { + printf(" "); + print_def_man(&cmd->optional_opt_args[oo].def, 1); + } + sep = 1; + } + } + + if (sep) { + printf(" ]\n"); + printf(".RE\n"); + printf(".br\n"); + } + + op_count: + if (!cmd->op_count) + goto done; + + printf(".RS 4\n"); + printf("["); + + if (cmd->op_count) { + for (op = 0; op < cmd->op_count; op++) { + if (cmd->optional_pos_args[op].def.val_bits) { + printf(" "); + print_def_man(&cmd->optional_pos_args[op].def, 1); + } + } + } + + printf("]\n"); + printf(".RE\n"); + + done: + printf("\n"); +} + +#define DESC_LINE 256 + +void print_desc_man(const char *desc) +{ + char buf[DESC_LINE] = {0}; + int di = 0; + int bi = 0; + + for (di = 0; di < strlen(desc); di++) { + if (desc[di] == '\0') + break; + if (desc[di] == '\n') + continue; + + if (!strncmp(&desc[di], "DESC:", 5)) { + if (bi) { + printf("%s\n", buf); + printf(".br\n"); + memset(buf, 0, sizeof(buf)); + bi = 0; + } + di += 5; + continue; + } + + if (!bi && desc[di] == ' ') + continue; + + buf[bi++] = desc[di]; + + if (bi == (DESC_LINE - 1)) + break; + } + + if (bi) { + printf("%s\n", buf); + printf(".br\n"); + } +} + +void print_command_man(void) +{ + struct command *cmd; + const char *last_cmd_name = NULL; + const char *desc; + int i, j, ro, rp, oo, op; + + include_optional_opt_args(&common_options, "OO_USAGE_COMMON"); + + printf(".TH LVM_ALL 8\n"); + + for (i = 0; i < cmd_count; i++) { + + cmd = &cmd_array[i]; + + if (!last_cmd_name || strcmp(last_cmd_name, cmd->name)) { + printf(".SH NAME\n"); + printf(".\n"); + if ((desc = cmd_name_desc(cmd->name))) + printf("%s - %s\n", cmd->name, desc); + else + printf("%s\n", cmd->name); + printf(".br\n"); + printf(".P\n"); + printf(".\n"); + printf(".SH SYNOPSIS\n"); + printf(".br\n"); + printf(".P\n"); + printf(".\n"); + last_cmd_name = cmd->name; + } + + if (cmd->desc) { + print_desc_man(cmd->desc); + printf(".P\n"); + } + + print_cmd_man(cmd, 0); + + if ((i == (cmd_count - 1)) || strcmp(cmd->name, cmd_array[i+1].name)) { + printf("Common options:\n"); + printf(".\n"); + print_cmd_man(&common_options, 1); + } + + printf("\n"); + continue; + } +} + +void print_command_struct(int only_usage) +{ + struct command *cmd; + int i, j, ro, rp, oo, op; + + include_optional_opt_args(&common_options, "OO_USAGE_COMMON"); + + printf("/* Do not edit. This file is generated by scripts/create-commands */\n"); + printf("/* using command definitions from scripts/command-lines.in */\n"); + printf("\n"); + + for (i = 0; i < cmd_count; i++) { + cmd = &cmd_array[i]; + + if (only_usage) { + print_usage(cmd, 0); + print_usage(&common_options, 1); + printf("\n"); + continue; + } + + printf("commands[%d].name = \"%s\";\n", i, cmd->name); + printf("commands[%d].command_line_id = \"%s\";\n", i, cmd->command_line_id); + printf("commands[%d].command_line_enum = %s_CMD;\n", i, cmd->command_line_id); + printf("commands[%d].fn = %s;\n", i, cmd->name); + printf("commands[%d].ro_count = %d;\n", i, cmd->ro_count); + printf("commands[%d].rp_count = %d;\n", i, cmd->rp_count); + printf("commands[%d].oo_count = %d;\n", i, cmd->oo_count); + printf("commands[%d].op_count = %d;\n", i, cmd->op_count); + + if (cmd->cmd_flags & CMD_FLAG_ONE_REQUIRED_OPT) + printf("commands[%d].cmd_flags = CMD_FLAG_ONE_REQUIRED_OPT;\n", i); + + printf("commands[%d].desc = \"%s\";\n", i, cmd->desc ?: ""); + printf("commands[%d].usage = ", i); + print_usage(cmd, 0); + + if (cmd->oo_count) { + printf("commands[%d].usage_common = ", i); + print_usage(&common_options, 1); + } else { + printf("commands[%d].usage_common = \"NULL\";\n", i); + } + + if (cmd->ro_count) { + for (ro = 0; ro < cmd->ro_count; ro++) { + printf("commands[%d].required_opt_args[%d].opt = %s;\n", + i, ro, opt_to_enum_str(cmd->required_opt_args[ro].opt)); + + if (!cmd->required_opt_args[ro].def.val_bits) + continue; + + printf("commands[%d].required_opt_args[%d].def.val_bits = %s;\n", + i, ro, val_bits_to_str(cmd->required_opt_args[ro].def.val_bits)); + + if (cmd->required_opt_args[ro].def.lv_types) + printf("commands[%d].required_opt_args[%d].def.lv_types = %s;\n", + i, ro, lv_types_to_flags(cmd->required_opt_args[ro].def.lv_types)); + + if (cmd->required_opt_args[ro].def.flags) + printf("commands[%d].required_opt_args[%d].def.flags = %s;\n", + i, ro, flags_to_str(cmd->required_opt_args[ro].def.flags)); + + if (val_bit_is_set(cmd->required_opt_args[ro].def.val_bits, constnum_VAL)) + printf("commands[%d].required_opt_args[%d].def.num = %d;\n", + i, ro, cmd->required_opt_args[ro].def.num); + + if (val_bit_is_set(cmd->required_opt_args[ro].def.val_bits, conststr_VAL)) + printf("commands[%d].required_opt_args[%d].def.str = \"%s\";\n", + i, ro, cmd->required_opt_args[ro].def.str ?: "NULL"); + } + } + + if (cmd->rp_count) { + for (rp = 0; rp < cmd->rp_count; rp++) { + printf("commands[%d].required_pos_args[%d].pos = %d;\n", + i, rp, cmd->required_pos_args[rp].pos); + + if (!cmd->required_pos_args[rp].def.val_bits) + continue; + + printf("commands[%d].required_pos_args[%d].def.val_bits = %s;\n", + i, rp, val_bits_to_str(cmd->required_pos_args[rp].def.val_bits)); + + if (cmd->required_pos_args[rp].def.lv_types) + printf("commands[%d].required_pos_args[%d].def.lv_types = %s;\n", + i, rp, lv_types_to_flags(cmd->required_pos_args[rp].def.lv_types)); + + if (cmd->required_pos_args[rp].def.flags) + printf("commands[%d].required_pos_args[%d].def.flags = %s;\n", + i, rp, flags_to_str(cmd->required_pos_args[rp].def.flags)); + + if (val_bit_is_set(cmd->required_pos_args[rp].def.val_bits, constnum_VAL)) + printf("commands[%d].required_pos_args[%d].def.num = %d;\n", + i, rp, cmd->required_pos_args[rp].def.num); + + if (val_bit_is_set(cmd->required_pos_args[rp].def.val_bits, conststr_VAL)) + printf("commands[%d].required_pos_args[%d].def.str = \"%s\";\n", + i, rp, cmd->required_pos_args[rp].def.str ?: "NULL"); + } + } + + if (cmd->oo_count) { + for (oo = 0; oo < cmd->oo_count; oo++) { + printf("commands[%d].optional_opt_args[%d].opt = %s;\n", + i, oo, opt_to_enum_str(cmd->optional_opt_args[oo].opt)); + + if (!cmd->optional_opt_args[oo].def.val_bits) + continue; + + printf("commands[%d].optional_opt_args[%d].def.val_bits = %s;\n", + i, oo, val_bits_to_str(cmd->optional_opt_args[oo].def.val_bits)); + + if (cmd->optional_opt_args[oo].def.lv_types) + printf("commands[%d].optional_opt_args[%d].def.lv_types = %s;\n", + i, oo, lv_types_to_flags(cmd->optional_opt_args[oo].def.lv_types)); + + if (cmd->optional_opt_args[oo].def.flags) + printf("commands[%d].optional_opt_args[%d].def.flags = %s;\n", + i, oo, flags_to_str(cmd->optional_opt_args[oo].def.flags)); + + if (val_bit_is_set(cmd->optional_opt_args[oo].def.val_bits, constnum_VAL)) + printf("commands[%d].optional_opt_args[%d].def.num = %d;\n", + i, oo, cmd->optional_opt_args[oo].def.num); + + if (val_bit_is_set(cmd->optional_opt_args[oo].def.val_bits, conststr_VAL)) + printf("commands[%d].optional_opt_args[%d].def.str = \"%s\";\n", + i, oo, cmd->optional_opt_args[oo].def.str ?: "NULL"); + } + } + + if (cmd->op_count) { + for (op = 0; op < cmd->op_count; op++) { + printf("commands[%d].optional_pos_args[%d].pos = %d;\n", + i, op, cmd->optional_pos_args[op].pos); + + if (!cmd->optional_pos_args[op].def.val_bits) + continue; + + printf("commands[%d].optional_pos_args[%d].def.val_bits = %s;\n", + i, op, val_bits_to_str(cmd->optional_pos_args[op].def.val_bits)); + + if (cmd->optional_pos_args[op].def.lv_types) + printf("commands[%d].optional_pos_args[%d].def.lv_types = %s;\n", + i, op, lv_types_to_flags(cmd->optional_pos_args[op].def.lv_types)); + + if (cmd->optional_pos_args[op].def.flags) + printf("commands[%d].optional_pos_args[%d].def.flags = %s;\n", + i, op, flags_to_str(cmd->optional_pos_args[op].def.flags)); + + if (val_bit_is_set(cmd->optional_pos_args[op].def.val_bits, constnum_VAL)) + printf("commands[%d].optional_pos_args[%d].def.num = %d;\n", + i, op, cmd->optional_pos_args[op].def.num); + + if (val_bit_is_set(cmd->optional_pos_args[op].def.val_bits, conststr_VAL)) + printf("commands[%d].optional_pos_args[%d].def.str = \"%s\";\n", + i, op, cmd->optional_pos_args[op].def.str ?: "NULL"); + } + } + + printf("\n"); + } +} + +struct cmd_pair { + int i, j; +}; + +static void print_ambiguous(void) +{ + struct command *cmd, *dup; + struct cmd_pair dups[64] = { 0 }; + int found = 0; + int i, j, f, ro, rp; + + for (i = 0; i < cmd_count; i++) { + cmd = &cmd_array[i]; + + for (j = 0; j < cmd_count; j++) { + dup = &cmd_array[j]; + + if (i == j) + continue; + if (strcmp(cmd->name, dup->name)) + continue; + if (cmd->ro_count != dup->ro_count) + continue; + if (cmd->oo_count != dup->oo_count) + continue; + if (cmd->rp_count != dup->rp_count) + continue; + if (cmd->op_count != dup->op_count) + continue; + + for (ro = 0; ro < cmd->ro_count; ro++) { + if (!opt_arg_matches(&cmd->required_opt_args[ro], + &dup->required_opt_args[ro])) + goto next; + } + + for (rp = 0; rp < cmd->rp_count; rp++) { + if (!pos_arg_matches(&cmd->required_pos_args[rp], + &dup->required_pos_args[rp])) + goto next; + } + + for (f = 0; f < found; f++) { + if ((dups[f].i == j) && (dups[f].j == i)) + goto next; + } + + printf("Ambiguous commands %d and %d:\n", i, j); + print_usage(cmd, 0); + print_usage(dup, 0); + printf("\n"); + + dups[found].i = i; + dups[found].j = j; + found++; +next: + ; + } + } +} + +void print_command_list(void) +{ + int i; + + for (i = 0; i < MAX_CMD_NAMES; i++) { + if (!cmd_names[i].name) { + printf("found %d command names\n", i); + break; + } + printf("%s\n", cmd_names[i].name); + } +} + +void print_option_list(void) +{ + int i; + + for (i = 0; i < ARG_COUNT; i++) + printf("%d %s %s %c (%d)\n", + opt_names[i].opt_enum, opt_names[i].name, + opt_names[i].long_opt, opt_names[i].short_opt ?: ' ', + opt_names[i].short_opt ? opt_names[i].short_opt : 0); +} + +static void print_help(int argc, char *argv[]) +{ + printf("%s --output struct|count|usage|expanded <filename>\n", argv[0]); + printf("\n"); + printf("struct: print C structures.\n"); + printf("usage: print usage format.\n"); + printf("expanded: print expanded input format.\n"); + printf("count: print #define COMMAND_COUNT <Number>\n"); + printf("ambiguous: print commands differing only by LV types\n"); +} + +int main(int argc, char *argv[]) +{ + char *outputformat = NULL; + char *inputfile = NULL; + FILE *file; + struct command *cmd; + char line[MAX_LINE]; + char line_orig[MAX_LINE]; + const char *name; + char *line_argv[MAX_LINE_ARGC]; + char *n; + int line_argc; + int prev_was_oo_def = 0; + int prev_was_oo = 0; + int prev_was_op = 0; + + if (argc < 2) { + print_help(argc, argv); + exit(EXIT_FAILURE); + } + + if (!strcmp(argv[1], "debug")) { + print_command_list(); + print_option_list(); + return 0; + } + + static struct option long_options[] = { + {"help", no_argument, 0, 'h' }, + {"output", required_argument, 0, 'o' }, + {0, 0, 0, 0 } + }; + + while (1) { + int c; + int option_index = 0; + + c = getopt_long(argc, argv, "ho:", + long_options, &option_index); + if (c == -1) + break; + + switch (c) { + case '0': + break; + case 'h': + print_help(argc, argv); + exit(EXIT_SUCCESS); + case 'o': + outputformat = strdup(optarg); + break; + } + } + + if (optind < argc) + inputfile = argv[optind]; + else { + printf("Missing filename.\n"); + return 0; + } + + if (!(file = fopen(inputfile, "r"))) { + printf("Cannot open %s\n", argv[1]); + return -1; + } + + while (fgets(line, MAX_LINE, file)) { + if (line[0] == '#') + continue; + if (line[0] == '\n') + continue; + if (line[0] == '-' && line[1] == '-' && line[2] == '-') + continue; + + if ((n = strchr(line, '\n'))) + *n = '\0'; + + memcpy(line_orig, line, sizeof(line)); + split_line(line, &line_argc, line_argv, ' '); + + if (!line_argc) + continue; + + /* command ... */ + if ((name = is_command_name(line_argv[0]))) { + if (cmd_count >= MAX_CMDS) { + printf("MAX_CMDS too small\n"); + return -1; + } + cmd = &cmd_array[cmd_count++]; + cmd->name = name; + cmd->pos_count = 1; + add_required_line(cmd, line_argc, line_argv); + + /* Every cmd gets the OO_ALL options */ + include_optional_opt_args(cmd, "OO_ALL:"); + continue; + } + + if (is_desc_line(line_argv[0])) { + char *desc = strdup(line_orig); + if (cmd->desc) { + cmd->desc = realloc((char *)cmd->desc, strlen(cmd->desc) + strlen(desc) + 2); + strcat((char *)cmd->desc, " "); + strcat((char *)cmd->desc, desc); + free(desc); + } else + cmd->desc = desc; + continue; + } + + if (is_id_line(line_argv[0])) { + cmd->command_line_id = strdup(line_argv[1]); + continue; + } + + /* OO_FOO: ... */ + if (is_oo_definition(line_argv[0])) { + add_oo_definition_line(line_argv[0], line_orig); + prev_was_oo_def = 1; + prev_was_oo = 0; + prev_was_op = 0; + continue; + } + + /* OO: ... */ + if (is_oo_line(line_argv[0])) { + add_optional_opt_line(cmd, line_argc, line_argv); + prev_was_oo_def = 0; + prev_was_oo = 1; + prev_was_op = 0; + continue; + } + + /* OP: ... */ + if (is_op_line(line_argv[0])) { + add_optional_pos_line(cmd, line_argc, line_argv); + prev_was_oo_def = 0; + prev_was_oo = 0; + prev_was_op = 1; + continue; + } + + /* handle OO_FOO:, OO:, OP: continuing on multiple lines */ + + if (prev_was_oo_def) { + append_oo_definition_line(line_orig); + continue; + } + + if (prev_was_oo) { + add_optional_opt_line(cmd, line_argc, line_argv); + continue; + } + + if (prev_was_op) { + add_optional_pos_line(cmd, line_argc, line_argv); + continue; + } + } + + fclose(file); + + if (!outputformat) + print_command_struct(1); + else if (!strcmp(outputformat, "struct")) + print_command_struct(0); + else if (!strcmp(outputformat, "count")) + print_command_count(); + else if (!strcmp(outputformat, "usage")) + print_command_struct(1); + else if (!strcmp(outputformat, "expanded")) + print_expanded(); + else if (!strcmp(outputformat, "ambiguous")) + print_ambiguous(); + else if (!strcmp(outputformat, "man")) + print_command_man(); + else + print_help(argc, argv); +} + diff --git a/tools/args.h b/tools/args.h index a04d81d5e..a3e641f32 100644 --- a/tools/args.h +++ b/tools/args.h @@ -17,215 +17,214 @@ * Put all long args that don't have a corresponding short option first. */ /* *INDENT-OFF* */ -arg(abort_ARG, '\0', "abort", NULL, 0, 0) -arg(activationmode_ARG, '\0', "activationmode", string_arg, 0, 0) -arg(addtag_ARG, '\0', "addtag", tag_arg, ARG_GROUPABLE, 0) -arg(aligned_ARG, '\0', "aligned", NULL, 0, 0) -arg(alloc_ARG, '\0', "alloc", alloc_arg, 0, 0) -arg(atomic_ARG, '\0', "atomic", NULL, 0, 0) -arg(atversion_ARG, '\0', "atversion", string_arg, 0, 0) -arg(binary_ARG, '\0', "binary", NULL, 0, 0) -arg(bootloaderareasize_ARG, '\0', "bootloaderareasize", size_mb_arg, 0, 0) -arg(cache_long_ARG, '\0', "cache", NULL, 0, 0) -arg(cachemode_ARG, '\0', "cachemode", cachemode_arg, 0, 0) -arg(cachepool_ARG, '\0', "cachepool", string_arg, 0, 0) -arg(commandprofile_ARG, '\0', "commandprofile", string_arg, 0, 0) -arg(config_ARG, '\0', "config", string_arg, 0, 0) -arg(configreport_ARG, '\0', "configreport", string_arg, ARG_GROUPABLE, 1) -arg(configtype_ARG, '\0', "type", string_arg, 0, 0) -arg(corelog_ARG, '\0', "corelog", NULL, 0, 0) -arg(dataalignment_ARG, '\0', "dataalignment", size_kb_arg, 0, 0) -arg(dataalignmentoffset_ARG, '\0', "dataalignmentoffset", size_kb_arg, 0, 0) -arg(deltag_ARG, '\0', "deltag", tag_arg, ARG_GROUPABLE, 0) -arg(detachprofile_ARG, '\0', "detachprofile", NULL, 0, 0) -arg(discards_ARG, '\0', "discards", discards_arg, 0, 0) -arg(driverloaded_ARG, '\0', "driverloaded", yes_no_arg, 0, 0) -arg(errorwhenfull_ARG, '\0', "errorwhenfull", yes_no_arg, 0, 0) -arg(force_long_ARG, '\0', "force", NULL, ARG_COUNTABLE, 0) -arg(foreign_ARG, '\0', "foreign", NULL, 0, 0) -arg(handlemissingpvs_ARG, '\0', "handlemissingpvs", NULL, 0, 0) -arg(ignoreadvanced_ARG, '\0', "ignoreadvanced", NULL, 0, 0) -arg(ignorelocal_ARG, '\0', "ignorelocal", NULL, 0, 0) -arg(ignorelockingfailure_ARG, '\0', "ignorelockingfailure", NULL, 0, 0) -arg(ignoremonitoring_ARG, '\0', "ignoremonitoring", NULL, 0, 0) -arg(ignoreskippedcluster_ARG, '\0', "ignoreskippedcluster", NULL, 0, 0) -arg(ignoreunsupported_ARG, '\0', "ignoreunsupported", NULL, 0, 0) -arg(labelsector_ARG, '\0', "labelsector", int_arg, 0, 0) -arg(lockopt_ARG, '\0', "lockopt", string_arg, 0, 0) -arg(lockstart_ARG, '\0', "lockstart", NULL, 0, 0) -arg(lockstop_ARG, '\0', "lockstop", NULL, 0, 0) -arg(locktype_ARG, '\0', "locktype", locktype_arg, 0, 0) -arg(logonly_ARG, '\0', "logonly", NULL, 0, 0) -arg(maxrecoveryrate_ARG, '\0', "maxrecoveryrate", size_kb_arg, 0, 0) -arg(merge_ARG, '\0', "merge", NULL, 0, 0) -arg(mergedconfig_ARG, '\0', "mergedconfig", NULL, 0, 0) -arg(metadatacopies_ARG, '\0', "metadatacopies", metadatacopies_arg, 0, 0) -arg(metadataignore_ARG, '\0', "metadataignore", yes_no_arg, 0, 0) -arg(metadataprofile_ARG, '\0', "metadataprofile", string_arg, 0, 0) -arg(metadatasize_ARG, '\0', "metadatasize", size_mb_arg, 0, 0) -arg(minor_ARG, '\0', "minor", int_arg, ARG_GROUPABLE, 0) -arg(minrecoveryrate_ARG, '\0', "minrecoveryrate", size_kb_arg, 0, 0) -arg(mirrorlog_ARG, '\0', "mirrorlog", mirrorlog_arg, 0, 0) -arg(mirrorsonly_ARG, '\0', "mirrorsonly", NULL, 0, 0) -arg(mknodes_ARG, '\0', "mknodes", NULL, 0, 0) -arg(monitor_ARG, '\0', "monitor", yes_no_arg, 0, 0) -arg(nameprefixes_ARG, '\0', "nameprefixes", NULL, 0, 0) -arg(noheadings_ARG, '\0', "noheadings", NULL, 0, 0) -arg(nohistory_ARG, '\0', "nohistory", NULL, 0, 0) -arg(nolocking_ARG, '\0', "nolocking", NULL, 0, 0) -arg(norestorefile_ARG, '\0', "norestorefile", NULL, 0, 0) -arg(nosuffix_ARG, '\0', "nosuffix", NULL, 0, 0) -arg(nosync_ARG, '\0', "nosync", NULL, 0, 0) -arg(notifydbus_ARG, '\0', "notifydbus", NULL, 0, 0) -arg(noudevsync_ARG, '\0', "noudevsync", NULL, 0, 0) -arg(originname_ARG, '\0', "originname", string_arg, 0, 0) -arg(physicalvolumesize_ARG, '\0', "setphysicalvolumesize", size_mb_arg, 0, 0) -arg(poll_ARG, '\0', "poll", yes_no_arg, 0, 0) -arg(polloperation_ARG, '\0', "polloperation", string_arg, 0, 0) -arg(pooldatasize_ARG, '\0', "pooldatasize", size_mb_arg, 0, 0) -arg(poolmetadata_ARG, '\0', "poolmetadata", string_arg, 0, 0) -arg(poolmetadatasize_ARG, '\0', "poolmetadatasize", size_mb_arg, 0, 0) -arg(poolmetadataspare_ARG, '\0', "poolmetadataspare", yes_no_arg, 0, 0) -arg(profile_ARG, '\0', "profile", string_arg, 0, 0) -arg(pvmetadatacopies_ARG, '\0', "pvmetadatacopies", int_arg, 0, 0) -arg(raidrebuild_ARG, '\0', "raidrebuild", string_arg, ARG_GROUPABLE, 0) -arg(raidmaxrecoveryrate_ARG, '\0', "raidmaxrecoveryrate", size_kb_arg, 0, 0) -arg(raidminrecoveryrate_ARG, '\0', "raidminrecoveryrate", size_kb_arg, 0, 0) -arg(raidsyncaction_ARG, '\0', "raidsyncaction", string_arg, 0, 0) -arg(raidwritebehind_ARG, '\0', "raidwritebehind", int_arg, 0, 0) -arg(raidwritemostly_ARG, '\0', "raidwritemostly", string_arg, ARG_GROUPABLE, 0) -arg(readonly_ARG, '\0', "readonly", NULL, 0, 0) -arg(refresh_ARG, '\0', "refresh", NULL, 0, 0) -arg(removemissing_ARG, '\0', "removemissing", NULL, 0, 0) -arg(rebuild_ARG, '\0', "rebuild", string_arg, ARG_GROUPABLE, 0) -arg(repair_ARG, '\0', "repair", NULL, 0, 0) -arg(replace_ARG, '\0', "replace", string_arg, ARG_GROUPABLE, 0) -arg(reportformat_ARG, '\0', "reportformat", string_arg, 0, 0) -arg(restorefile_ARG, '\0', "restorefile", string_arg, 0, 0) -arg(restoremissing_ARG, '\0', "restoremissing", NULL, 0, 0) -arg(resync_ARG, '\0', "resync", NULL, 0, 0) -arg(rows_ARG, '\0', "rows", NULL, 0, 0) -arg(segments_ARG, '\0', "segments", NULL, 0, 0) -arg(separator_ARG, '\0', "separator", string_arg, 0, 0) -arg(shared_ARG, '\0', "shared", NULL, 0, 0) -arg(sinceversion_ARG, '\0', "sinceversion", string_arg, 0, 0) -arg(split_ARG, '\0', "split", NULL, 0, 0) -arg(splitcache_ARG, '\0', "splitcache", NULL, 0, 0) -arg(splitmirrors_ARG, '\0', "splitmirrors", int_arg, 0, 0) -arg(splitsnapshot_ARG, '\0', "splitsnapshot", NULL, 0, 0) -arg(showdeprecated_ARG, '\0', "showdeprecated", NULL, 0, 0) -arg(showunsupported_ARG, '\0', "showunsupported", NULL, 0, 0) -arg(stripes_long_ARG, '\0', "stripes", int_arg, 0, 0) -arg(syncaction_ARG, '\0', "syncaction", string_arg, 0, 0) /* FIXME Use custom validation fn */ -arg(sysinit_ARG, '\0', "sysinit", NULL, 0, 0) -arg(systemid_ARG, '\0', "systemid", string_arg, 0, 0) -arg(thinpool_ARG, '\0', "thinpool", string_arg, 0, 0) -arg(trackchanges_ARG, '\0', "trackchanges", NULL, 0, 0) -arg(trustcache_ARG, '\0', "trustcache", NULL, 0, 0) -arg(type_ARG, '\0', "type", segtype_arg, 0, 0) -arg(unbuffered_ARG, '\0', "unbuffered", NULL, 0, 0) -arg(uncache_ARG, '\0', "uncache", NULL, 0, 0) -arg(cachepolicy_ARG, '\0', "cachepolicy", string_arg, 0, 0) -arg(cachesettings_ARG, '\0', "cachesettings", string_arg, ARG_GROUPABLE, 0) -arg(unconfigured_ARG, '\0', "unconfigured", NULL, 0, 0) -arg(units_ARG, '\0', "units", string_arg, 0, 0) -arg(unquoted_ARG, '\0', "unquoted", NULL, 0, 0) -arg(usepolicies_ARG, '\0', "usepolicies", NULL, 0, 0) -arg(validate_ARG, '\0', "validate", NULL, 0, 0) -arg(version_ARG, '\0', "version", NULL, 0, 0) -arg(vgmetadatacopies_ARG, '\0', "vgmetadatacopies", metadatacopies_arg, 0, 0) -arg(virtualoriginsize_ARG, '\0', "virtualoriginsize", size_mb_arg, 0, 0) -arg(withsummary_ARG, '\0', "withsummary", NULL, 0, 0) -arg(withcomments_ARG, '\0', "withcomments", NULL, 0, 0) -arg(withspaces_ARG, '\0', "withspaces", NULL, 0, 0) -arg(withversions_ARG, '\0', "withversions", NULL, 0, 0) -arg(writebehind_ARG, '\0', "writebehind", int_arg, 0, 0) -arg(writemostly_ARG, '\0', "writemostly", string_arg, ARG_GROUPABLE, 0) +arg(abort_ARG, '\0', "abort", 0, 0, 0) +arg(activationmode_ARG, '\0', "activationmode", activationmode_VAL, 0, 0) +arg(addtag_ARG, '\0', "addtag", tag_VAL, ARG_GROUPABLE, 0) +arg(aligned_ARG, '\0', "aligned", 0, 0, 0) +arg(alloc_ARG, '\0', "alloc", alloc_VAL, 0, 0) +arg(atomic_ARG, '\0', "atomic", 0, 0, 0) +arg(atversion_ARG, '\0', "atversion", string_VAL, 0, 0) +arg(binary_ARG, '\0', "binary", 0, 0, 0) +arg(bootloaderareasize_ARG, '\0', "bootloaderareasize", sizemb_VAL, 0, 0) +arg(cache_long_ARG, '\0', "cache", 0, 0, 0) +arg(cachemode_ARG, '\0', "cachemode", cachemode_VAL, 0, 0) +arg(cachepool_ARG, '\0', "cachepool", lv_VAL, 0, 0) +arg(commandprofile_ARG, '\0', "commandprofile", string_VAL, 0, 0) +arg(config_ARG, '\0', "config", string_VAL, 0, 0) +arg(configreport_ARG, '\0', "configreport", string_VAL, ARG_GROUPABLE, 1) +arg(configtype_ARG, '\0', "typeconfig", string_VAL, 0, 0) +arg(corelog_ARG, '\0', "corelog", 0, 0, 0) +arg(dataalignment_ARG, '\0', "dataalignment", sizekb_VAL, 0, 0) +arg(dataalignmentoffset_ARG, '\0', "dataalignmentoffset", sizekb_VAL, 0, 0) +arg(deltag_ARG, '\0', "deltag", tag_VAL, ARG_GROUPABLE, 0) +arg(detachprofile_ARG, '\0', "detachprofile", 0, 0, 0) +arg(discards_ARG, '\0', "discards", discards_VAL, 0, 0) +arg(driverloaded_ARG, '\0', "driverloaded", bool_VAL, 0, 0) +arg(errorwhenfull_ARG, '\0', "errorwhenfull", bool_VAL, 0, 0) +arg(force_long_ARG, '\0', "force", 0, ARG_COUNTABLE, 0) +arg(foreign_ARG, '\0', "foreign", 0, 0, 0) +arg(handlemissingpvs_ARG, '\0', "handlemissingpvs", 0, 0, 0) +arg(ignoreadvanced_ARG, '\0', "ignoreadvanced", 0, 0, 0) +arg(ignorelocal_ARG, '\0', "ignorelocal", 0, 0, 0) +arg(ignorelockingfailure_ARG, '\0', "ignorelockingfailure", 0, 0, 0) +arg(ignoremonitoring_ARG, '\0', "ignoremonitoring", 0, 0, 0) +arg(ignoreskippedcluster_ARG, '\0', "ignoreskippedcluster", 0, 0, 0) +arg(ignoreunsupported_ARG, '\0', "ignoreunsupported", 0, 0, 0) +arg(labelsector_ARG, '\0', "labelsector", number_VAL, 0, 0) +arg(lockopt_ARG, '\0', "lockopt", string_VAL, 0, 0) +arg(lockstart_ARG, '\0', "lockstart", 0, 0, 0) +arg(lockstop_ARG, '\0', "lockstop", 0, 0, 0) +arg(locktype_ARG, '\0', "locktype", locktype_VAL, 0, 0) +arg(logonly_ARG, '\0', "logonly", 0, 0, 0) +arg(maxrecoveryrate_ARG, '\0', "maxrecoveryrate", sizekb_VAL, 0, 0) +arg(merge_ARG, '\0', "merge", 0, 0, 0) +arg(mergedconfig_ARG, '\0', "mergedconfig", 0, 0, 0) +arg(metadatacopies_ARG, '\0', "metadatacopies", metadatacopies_VAL, 0, 0) +arg(metadataignore_ARG, '\0', "metadataignore", bool_VAL, 0, 0) +arg(metadataprofile_ARG, '\0', "metadataprofile", string_VAL, 0, 0) +arg(metadatasize_ARG, '\0', "metadatasize", sizemb_VAL, 0, 0) +arg(minor_ARG, '\0', "minor", number_VAL, ARG_GROUPABLE, 0) +arg(minrecoveryrate_ARG, '\0', "minrecoveryrate", sizekb_VAL, 0, 0) +arg(mirrorlog_ARG, '\0', "mirrorlog", mirrorlog_VAL, 0, 0) +arg(mirrorsonly_ARG, '\0', "mirrorsonly", 0, 0, 0) +arg(mknodes_ARG, '\0', "mknodes", 0, 0, 0) +arg(monitor_ARG, '\0', "monitor", bool_VAL, 0, 0) +arg(nameprefixes_ARG, '\0', "nameprefixes", 0, 0, 0) +arg(noheadings_ARG, '\0', "noheadings", 0, 0, 0) +arg(nohistory_ARG, '\0', "nohistory", 0, 0, 0) +arg(nolocking_ARG, '\0', "nolocking", 0, 0, 0) +arg(norestorefile_ARG, '\0', "norestorefile", 0, 0, 0) +arg(nosuffix_ARG, '\0', "nosuffix", 0, 0, 0) +arg(nosync_ARG, '\0', "nosync", 0, 0, 0) +arg(notifydbus_ARG, '\0', "notifydbus", 0, 0, 0) +arg(noudevsync_ARG, '\0', "noudevsync", 0, 0, 0) +arg(originname_ARG, '\0', "originname", lv_VAL, 0, 0) +arg(physicalvolumesize_ARG, '\0', "setphysicalvolumesize", sizemb_VAL, 0, 0) +arg(poll_ARG, '\0', "poll", bool_VAL, 0, 0) +arg(polloperation_ARG, '\0', "polloperation", string_VAL, 0, 0) +arg(pooldatasize_ARG, '\0', "pooldatasize", sizemb_VAL, 0, 0) +arg(poolmetadata_ARG, '\0', "poolmetadata", lv_VAL, 0, 0) +arg(poolmetadatasize_ARG, '\0', "poolmetadatasize", sizemb_VAL, 0, 0) +arg(poolmetadataspare_ARG, '\0', "poolmetadataspare", bool_VAL, 0, 0) +arg(profile_ARG, '\0', "profile", string_VAL, 0, 0) +arg(pvmetadatacopies_ARG, '\0', "pvmetadatacopies", number_VAL, 0, 0) +arg(raidrebuild_ARG, '\0', "raidrebuild", string_VAL, ARG_GROUPABLE, 0) +arg(raidmaxrecoveryrate_ARG, '\0', "raidmaxrecoveryrate", sizekb_VAL, 0, 0) +arg(raidminrecoveryrate_ARG, '\0', "raidminrecoveryrate", sizekb_VAL, 0, 0) +arg(raidsyncaction_ARG, '\0', "raidsyncaction", string_VAL, 0, 0) +arg(raidwritebehind_ARG, '\0', "raidwritebehind", number_VAL, 0, 0) +arg(raidwritemostly_ARG, '\0', "raidwritemostly", string_VAL, ARG_GROUPABLE, 0) +arg(readonly_ARG, '\0', "readonly", 0, 0, 0) +arg(refresh_ARG, '\0', "refresh", 0, 0, 0) +arg(removemissing_ARG, '\0', "removemissing", 0, 0, 0) +arg(rebuild_ARG, '\0', "rebuild", pv_VAL, ARG_GROUPABLE, 0) +arg(repair_ARG, '\0', "repair", 0, 0, 0) +arg(replace_ARG, '\0', "replace", pv_VAL, ARG_GROUPABLE, 0) +arg(reportformat_ARG, '\0', "reportformat", string_VAL, 0, 0) +arg(restorefile_ARG, '\0', "restorefile", string_VAL, 0, 0) +arg(restoremissing_ARG, '\0', "restoremissing", 0, 0, 0) +arg(resync_ARG, '\0', "resync", 0, 0, 0) +arg(rows_ARG, '\0', "rows", 0, 0, 0) +arg(segments_ARG, '\0', "segments", 0, 0, 0) +arg(separator_ARG, '\0', "separator", string_VAL, 0, 0) +arg(shared_ARG, '\0', "shared", 0, 0, 0) +arg(sinceversion_ARG, '\0', "sinceversion", string_VAL, 0, 0) +arg(split_ARG, '\0', "split", 0, 0, 0) +arg(splitcache_ARG, '\0', "splitcache", 0, 0, 0) +arg(splitmirrors_ARG, '\0', "splitmirrors", number_VAL, 0, 0) +arg(splitsnapshot_ARG, '\0', "splitsnapshot", 0, 0, 0) +arg(showdeprecated_ARG, '\0', "showdeprecated", 0, 0, 0) +arg(showunsupported_ARG, '\0', "showunsupported", 0, 0, 0) +arg(stripes_long_ARG, '\0', "stripes", number_VAL, 0, 0) +arg(syncaction_ARG, '\0', "syncaction", string_VAL, 0, 0) /* FIXME Use custom VAL */ +arg(sysinit_ARG, '\0', "sysinit", 0, 0, 0) +arg(systemid_ARG, '\0', "systemid", string_VAL, 0, 0) +arg(thinpool_ARG, '\0', "thinpool", lv_VAL, 0, 0) +arg(trackchanges_ARG, '\0', "trackchanges", 0, 0, 0) +arg(trustcache_ARG, '\0', "trustcache", 0, 0, 0) +arg(type_ARG, '\0', "type", segtype_VAL, 0, 0) +arg(unbuffered_ARG, '\0', "unbuffered", 0, 0, 0) +arg(uncache_ARG, '\0', "uncache", 0, 0, 0) +arg(cachepolicy_ARG, '\0', "cachepolicy", string_VAL, 0, 0) +arg(cachesettings_ARG, '\0', "cachesettings", string_VAL, ARG_GROUPABLE, 0) +arg(unconfigured_ARG, '\0', "unconfigured", 0, 0, 0) +arg(units_ARG, '\0', "units", units_VAL, 0, 0) +arg(unquoted_ARG, '\0', "unquoted", 0, 0, 0) +arg(usepolicies_ARG, '\0', "usepolicies", 0, 0, 0) +arg(validate_ARG, '\0', "validate", 0, 0, 0) +arg(version_ARG, '\0', "version", 0, 0, 0) +arg(vgmetadatacopies_ARG, '\0', "vgmetadatacopies", metadatacopies_VAL, 0, 0) +arg(virtualoriginsize_ARG, '\0', "virtualoriginsize", sizemb_VAL, 0, 0) +arg(withsummary_ARG, '\0', "withsummary", 0, 0, 0) +arg(withcomments_ARG, '\0', "withcomments", 0, 0, 0) +arg(withspaces_ARG, '\0', "withspaces", 0, 0, 0) +arg(withversions_ARG, '\0', "withversions", 0, 0, 0) +arg(writebehind_ARG, '\0', "writebehind", number_VAL, 0, 0) +arg(writemostly_ARG, '\0', "writemostly", string_VAL, ARG_GROUPABLE, 0) /* Allow some variations */ -arg(allocation_ARG, '\0', "allocation", yes_no_arg, 0, 0) -arg(available_ARG, '\0', "available", activation_arg, 0, 0) -arg(resizable_ARG, '\0', "resizable", yes_no_arg, 0, 0) +arg(allocation_ARG, '\0', "allocation", bool_VAL, 0, 0) +arg(available_ARG, '\0', "available", activation_VAL, 0, 0) +arg(resizable_ARG, '\0', "resizable", bool_VAL, 0, 0) /* * ... and now the short args. */ -arg(activate_ARG, 'a', "activate", activation_arg, 0, 0) -arg(all_ARG, 'a', "all", NULL, 0, 0) -arg(autobackup_ARG, 'A', "autobackup", yes_no_arg, 0, 0) -arg(activevolumegroups_ARG, 'A', "activevolumegroups", NULL, 0, 0) -arg(background_ARG, 'b', "background", NULL, 0, 0) -arg(backgroundfork_ARG, 'b', "background", NULL, 0, 0) -arg(basevgname_ARG, 'n', "basevgname", string_arg, 0, 0) -arg(blockdevice_ARG, 'b', "blockdevice", NULL, 0, 0) -arg(chunksize_ARG, 'c', "chunksize", size_kb_arg, 0, 0) -arg(clustered_ARG, 'c', "clustered", yes_no_arg, 0, 0) -arg(colon_ARG, 'c', "colon", NULL, 0, 0) -arg(columns_ARG, 'C', "columns", NULL, 0, 0) -arg(contiguous_ARG, 'C', "contiguous", yes_no_arg, 0, 0) -arg(debug_ARG, 'd', "debug", NULL, ARG_COUNTABLE, 0) -arg(exported_ARG, 'e', "exported", NULL, 0, 0) -arg(physicalextent_ARG, 'E', "physicalextent", NULL, 0, 0) -arg(file_ARG, 'f', "file", string_arg, 0, 0) -arg(force_ARG, 'f', "force", NULL, ARG_COUNTABLE, 0) -arg(full_ARG, 'f', "full", NULL, 0, 0) -arg(help_ARG, 'h', "help", NULL, 0, 0) -arg(cache_ARG, 'H', "cache", NULL, 0, 0) -arg(history_ARG, 'H', "history", NULL, 0, 0) -arg(help2_ARG, '?', "", NULL, 0, 0) -arg(import_ARG, 'i', "import", NULL, 0, 0) -arg(interval_ARG, 'i', "interval", int_arg, 0, 0) -arg(iop_version_ARG, 'i', "iop_version", NULL, 0, 0) -arg(stripes_ARG, 'i', "stripes", int_arg, 0, 0) -arg(stripesize_ARG, 'I', "stripesize", size_kb_arg, 0, 0) -arg(logicalvolume_ARG, 'l', "logicalvolume", int_arg, 0, 0) -arg(maxlogicalvolumes_ARG, 'l', "maxlogicalvolumes", int_arg, 0, 0) -arg(extents_ARG, 'l', "extents", int_arg_with_sign_and_percent, 0, 0) -arg(list_ARG, 'l', "list", NULL, 0, 0) -arg(lvmpartition_ARG, 'l', "lvmpartition", NULL, 0, 0) -arg(logicalextent_ARG, 'L', "logicalextent", int_arg_with_sign, 0, 0) -arg(size_ARG, 'L', "size", size_mb_arg, 0, 0) -arg(persistent_ARG, 'M', "persistent", yes_no_arg, 0, 0) -arg(major_ARG, 'j', "major", int_arg, ARG_GROUPABLE, 0) -arg(setactivationskip_ARG, 'k', "setactivationskip", yes_no_arg, 0, 0) -arg(ignoreactivationskip_ARG, 'K', "ignoreactivationskip", NULL, 0, 0) -arg(maps_ARG, 'm', "maps", NULL, 0, 0) -arg(mirrors_ARG, 'm', "mirrors", int_arg_with_sign, 0, 0) -arg(metadatatype_ARG, 'M', "metadatatype", metadatatype_arg, 0, 0) -arg(name_ARG, 'n', "name", string_arg, 0, 0) -arg(nofsck_ARG, 'n', "nofsck", NULL, 0, 0) -arg(novolumegroup_ARG, 'n', "novolumegroup", NULL, 0, 0) -arg(oldpath_ARG, 'n', "oldpath", NULL, 0, 0) -arg(options_ARG, 'o', "options", string_arg, ARG_GROUPABLE, 0) -arg(sort_ARG, 'O', "sort", string_arg, ARG_GROUPABLE, 0) -arg(maxphysicalvolumes_ARG, 'p', "maxphysicalvolumes", int_arg, 0, 0) -arg(permission_ARG, 'p', "permission", permission_arg, 0, 0) -arg(partial_ARG, 'P', "partial", NULL, 0, 0) -arg(physicalvolume_ARG, 'P', "physicalvolume", NULL, 0, 0) -arg(quiet_ARG, 'q', "quiet", NULL, ARG_COUNTABLE, 0) -arg(readahead_ARG, 'r', "readahead", readahead_arg, 0, 0) -arg(resizefs_ARG, 'r', "resizefs", NULL, 0, 0) -arg(reset_ARG, 'R', "reset", NULL, 0, 0) -arg(regionsize_ARG, 'R', "regionsize", size_mb_arg, 0, 0) -arg(physicalextentsize_ARG, 's', "physicalextentsize", size_mb_arg, 0, 0) -arg(snapshot_ARG, 's', "snapshot", NULL, 0, 0) -arg(short_ARG, 's', "short", NULL, 0, 0) -arg(stdin_ARG, 's', "stdin", NULL, 0, 0) -arg(select_ARG, 'S', "select", string_arg, ARG_GROUPABLE, 0) -arg(test_ARG, 't', "test", NULL, 0, 0) -arg(thin_ARG, 'T', "thin", NULL, 0, 0) -arg(uuid_ARG, 'u', "uuid", NULL, 0, 0) -arg(uuidstr_ARG, 'u', "uuid", string_arg, 0, 0) -arg(uuidlist_ARG, 'U', "uuidlist", NULL, 0, 0) -arg(verbose_ARG, 'v', "verbose", NULL, ARG_COUNTABLE, 0) -arg(volumegroup_ARG, 'V', "volumegroup", NULL, 0, 0) -arg(virtualsize_ARG, 'V', "virtualsize", size_mb_arg, 0, 0) -arg(wipesignatures_ARG, 'W', "wipesignatures", yes_no_arg, 0, 0) -arg(allocatable_ARG, 'x', "allocatable", yes_no_arg, 0, 0) -arg(resizeable_ARG, 'x', "resizeable", yes_no_arg, 0, 0) -arg(yes_ARG, 'y', "yes", NULL, 0, 0) -arg(zero_ARG, 'Z', "zero", yes_no_arg, 0, 0) +arg(activate_ARG, 'a', "activate", activation_VAL, 0, 0) +arg(all_ARG, 'a', "all", 0, 0, 0) +arg(autobackup_ARG, 'A', "autobackup", bool_VAL, 0, 0) +arg(activevolumegroups_ARG, 'A', "activevolumegroups", 0, 0, 0) +arg(background_ARG, 'b', "background", 0, 0, 0) +arg(backgroundfork_ARG, 'b', "background", 0, 0, 0) +arg(basevgname_ARG, 'n', "basevgname", string_VAL, 0, 0) +arg(blockdevice_ARG, 'b', "blockdevice", 0, 0, 0) +arg(chunksize_ARG, 'c', "chunksize", sizekb_VAL, 0, 0) +arg(clustered_ARG, 'c', "clustered", bool_VAL, 0, 0) +arg(colon_ARG, 'c', "colon", 0, 0, 0) +arg(columns_ARG, 'C', "columns", 0, 0, 0) +arg(contiguous_ARG, 'C', "contiguous", bool_VAL, 0, 0) +arg(debug_ARG, 'd', "debug", 0, ARG_COUNTABLE, 0) +arg(exported_ARG, 'e', "exported", 0, 0, 0) +arg(physicalextent_ARG, 'E', "physicalextent", 0, 0, 0) +arg(file_ARG, 'f', "file", string_VAL, 0, 0) +arg(force_ARG, 'f', "force", 0, ARG_COUNTABLE, 0) +arg(full_ARG, 'f', "full", 0, 0, 0) +arg(help_ARG, 'h', "help", 0, ARG_COUNTABLE, 0) +arg(cache_ARG, 'H', "cache", 0, 0, 0) +arg(history_ARG, 'H', "history", 0, 0, 0) +arg(help2_ARG, '?', "", 0, 0, 0) +arg(import_ARG, 'i', "import", 0, 0, 0) +arg(interval_ARG, 'i', "interval", number_VAL, 0, 0) +arg(iop_version_ARG, 'i', "iop_version", 0, 0, 0) +arg(stripes_ARG, 'i', "stripes", number_VAL, 0, 0) +arg(stripesize_ARG, 'I', "stripesize", sizekb_VAL, 0, 0) +arg(logicalvolume_ARG, 'l', "logicalvolume", number_VAL, 0, 0) +arg(maxlogicalvolumes_ARG, 'l', "maxlogicalvolumes", number_VAL, 0, 0) +arg(extents_ARG, 'l', "extents", numsignedper_VAL, 0, 0) +arg(list_ARG, 'l', "list", 0, 0, 0) +arg(lvmpartition_ARG, 'l', "lvmpartition", 0, 0, 0) +arg(size_ARG, 'L', "size", sizemb_VAL, 0, 0) +arg(persistent_ARG, 'M', "persistent", bool_VAL, 0, 0) +arg(major_ARG, 'j', "major", number_VAL, ARG_GROUPABLE, 0) +arg(setactivationskip_ARG, 'k', "setactivationskip", bool_VAL, 0, 0) +arg(ignoreactivationskip_ARG, 'K', "ignoreactivationskip", 0, 0, 0) +arg(maps_ARG, 'm', "maps", 0, 0, 0) +arg(mirrors_ARG, 'm', "mirrors", numsigned_VAL, 0, 0) +arg(metadatatype_ARG, 'M', "metadatatype", metadatatype_VAL, 0, 0) +arg(name_ARG, 'n', "name", string_VAL, 0, 0) +arg(nofsck_ARG, 'n', "nofsck", 0, 0, 0) +arg(novolumegroup_ARG, 'n', "novolumegroup", 0, 0, 0) +arg(oldpath_ARG, 'n', "oldpath", 0, 0, 0) +arg(options_ARG, 'o', "options", string_VAL, ARG_GROUPABLE, 0) +arg(sort_ARG, 'O', "sort", string_VAL, ARG_GROUPABLE, 0) +arg(maxphysicalvolumes_ARG, 'p', "maxphysicalvolumes", number_VAL, 0, 0) +arg(permission_ARG, 'p', "permission", permission_VAL, 0, 0) +arg(partial_ARG, 'P', "partial", 0, 0, 0) +arg(physicalvolume_ARG, 'P', "physicalvolume", 0, 0, 0) +arg(quiet_ARG, 'q', "quiet", 0, ARG_COUNTABLE, 0) +arg(readahead_ARG, 'r', "readahead", readahead_VAL, 0, 0) +arg(resizefs_ARG, 'r', "resizefs", 0, 0, 0) +arg(reset_ARG, 'R', "reset", 0, 0, 0) +arg(regionsize_ARG, 'R', "regionsize", sizemb_VAL, 0, 0) +arg(physicalextentsize_ARG, 's', "physicalextentsize", sizemb_VAL, 0, 0) +arg(snapshot_ARG, 's', "snapshot", 0, 0, 0) +arg(short_ARG, 's', "short", 0, 0, 0) +arg(stdin_ARG, 's', "stdin", 0, 0, 0) +arg(select_ARG, 'S', "select", string_VAL, ARG_GROUPABLE, 0) +arg(test_ARG, 't', "test", 0, 0, 0) +arg(thin_ARG, 'T', "thin", 0, 0, 0) +arg(uuid_ARG, 'u', "uuid", 0, 0, 0) +arg(uuidstr_ARG, 'u', "uuid", string_VAL, 0, 0) +arg(uuidlist_ARG, 'U', "uuidlist", 0, 0, 0) +arg(verbose_ARG, 'v', "verbose", 0, ARG_COUNTABLE, 0) +arg(volumegroup_ARG, 'V', "volumegroup", 0, 0, 0) +arg(virtualsize_ARG, 'V', "virtualsize", sizemb_VAL, 0, 0) +arg(wipesignatures_ARG, 'W', "wipesignatures", bool_VAL, 0, 0) +arg(allocatable_ARG, 'x', "allocatable", bool_VAL, 0, 0) +arg(resizeable_ARG, 'x', "resizeable", bool_VAL, 0, 0) +arg(yes_ARG, 'y', "yes", 0, 0, 0) +arg(zero_ARG, 'Z', "zero", bool_VAL, 0, 0) /* this should always be last */ -arg(ARG_COUNT, '-', "", NULL, 0, 0) +arg(ARG_COUNT, '-', "", 0, 0, 0) /* *INDENT-ON* */ diff --git a/tools/command-lines-count.h b/tools/command-lines-count.h new file mode 100644 index 000000000..550e431ac --- /dev/null +++ b/tools/command-lines-count.h @@ -0,0 +1,133 @@ +/* Do not edit. This file is generated by scripts/create-commands */ +/* using command definitions from scripts/command-lines.in */ +#define COMMAND_COUNT 147 +enum { + no_CMD, + lvchange_properties_CMD, + lvchange_resync_CMD, + lvchange_syncaction_CMD, + lvchange_rebuild_CMD, + lvchange_activate_CMD, + lvchange_refresh_CMD, + lvchange_monitor_CMD, + lvchange_poll_CMD, + lvchange_persistent_CMD, + lvconvert_merge_CMD, + lvconvert_combine_split_snapshot_CMD, + lvconvert_to_thin_with_external_CMD, + lvconvert_to_cache_vol_CMD, + lvconvert_to_thinpool_CMD, + lvconvert_to_cachepool_CMD, + lvconvert_to_mirror_CMD, + lvconvert_to_mirror_or_raid1_CMD, + lvconvert_raid1_to_mirror_CMD, + lvconvert_mirror_to_raid1_CMD, + lvconvert_general_to_raid_CMD, + lvconvert_change_mirror_images_CMD, + lvconvert_raid_to_striped_CMD, + lvconvert_raid_or_mirror_to_linear_CMD, + lvconvert_split_mirror_images_to_new_CMD, + lvconvert_split_mirror_images_and_track_CMD, + lvconvert_repair_pvs_or_thinpool_CMD, + lvconvert_replace_pv_CMD, + lvconvert_change_mirrorlog_CMD, + lvconvert_split_and_keep_cachepool_CMD, + lvconvert_split_and_delete_cachepool_CMD, + lvconvert_split_cow_snapshot_CMD, + lvconvert_poll_mirror_CMD, + lvconvert_swap_pool_metadata_CMD, + lvcreate_error_vol_CMD, + lvcreate_zero_vol_CMD, + lvcreate_linear_CMD, + lvcreate_striped_CMD, + lvcreate_mirror_CMD, + lvcreate_raid_any_CMD, + lvcreate_cow_snapshot_CMD, + lvcreate_cow_snapshot_with_virtual_origin_CMD, + lvcreate_thinpool_CMD, + lvcreate_cachepool_CMD, + lvcreate_thin_vol_CMD, + lvcreate_thin_snapshot_CMD, + lvcreate_thin_snapshot_of_external_CMD, + lvcreate_thin_vol_with_thinpool_CMD, + lvcreate_thin_vol_with_thinpool_or_sparse_snapshot_CMD, + lvcreate_convert_to_cache_vol_with_cachepool_CMD, + lvcreate_cache_vol_with_new_origin_CMD, + lvdisplay_general_CMD, + lvextend_by_size_CMD, + lvextend_by_pv_CMD, + lvextend_pool_metadata_by_size_CMD, + lvextend_by_policy_CMD, + lvmconfig_general_CMD, + lvreduce_general_CMD, + lvremove_general_CMD, + lvrename_vg_lv_lv_CMD, + lvrename_lv_lv_CMD, + lvresize_by_size_CMD, + lvresize_by_pv_CMD, + lvresize_pool_metadata_by_size_CMD, + lvs_general_CMD, + lvscan_general_CMD, + pvchange_properties_all_CMD, + pvchange_properties_some_CMD, + pvresize_general_CMD, + pvck_general_CMD, + pvcreate_general_CMD, + pvdisplay_general_CMD, + pvmove_one_CMD, + pvmove_any_CMD, + pvremove_general_CMD, + pvs_general_CMD, + pvscan_show_CMD, + pvscan_cache_CMD, + vgcfgbackup_general_CMD, + vgcfgrestore_by_vg_CMD, + vgcfgrestore_by_file_CMD, + vgchange_properties_CMD, + vgchange_monitor_CMD, + vgchange_poll_CMD, + vgchange_activate_CMD, + vgchange_refresh_CMD, + vgchange_lockstart_CMD, + vgchange_lockstop_CMD, + vgck_general_CMD, + vgconvert_general_CMD, + vgcreate_general_CMD, + vgdisplay_general_CMD, + vgexport_some_CMD, + vgexport_all_CMD, + vgextend_general_CMD, + vgimport_some_CMD, + vgimport_all_CMD, + vgimportclone_general_CMD, + vgmerge_general_CMD, + vgmknodes_general_CMD, + vgreduce_by_pv_CMD, + vgreduce_all_CMD, + vgreduce_missing_CMD, + vgremove_general_CMD, + vgrename_by_name_CMD, + vgrename_by_uuid_CMD, + vgs_general_CMD, + vgscan_general_CMD, + vgsplit_by_pv_to_existing_CMD, + vgsplit_by_lv_to_existing_CMD, + vgsplit_by_pv_to_new_CMD, + vgsplit_by_lv_to_new_CMD, + devtypes_general_CMD, + fullreport_general_CMD, + lastlog_general_CMD, + lvpoll_general_CMD, + formats_general_CMD, + help_general_CMD, + version_general_CMD, + pvdata_general_CMD, + segtypes_general_CMD, + systemid_general_CMD, + tags_general_CMD, + lvmchange_general_CMD, + lvmdiskscan_general_CMD, + lvmsadc_general_CMD, + lvmsar_general_CMD, + COMMAND_ID_COUNT, +}; diff --git a/tools/command-lines.h b/tools/command-lines.h new file mode 100644 index 000000000..2997748cc --- /dev/null +++ b/tools/command-lines.h @@ -0,0 +1,8121 @@ +/* Do not edit. This file is generated by scripts/create-commands */ +/* using command definitions from scripts/command-lines.in */ + +commands[0].name = "lvchange"; +commands[0].command_line_id = "lvchange_properties"; +commands[0].command_line_enum = lvchange_properties_CMD; +commands[0].fn = lvchange; +commands[0].ro_count = 20; +commands[0].rp_count = 1; +commands[0].oo_count = 20; +commands[0].op_count = 0; +commands[0].cmd_flags = CMD_FLAG_ONE_REQUIRED_OPT; +commands[0].desc = "DESC: Change a general LV property."; +commands[0].usage = "lvchange ( --addtag Tag, --deltag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --contiguous y|n, --detachprofile, --metadataprofile String, --profile String, --permission rw|r, --readahead auto|none|NumberSectors, --setactivationskip y|n, --errorwhenfull y|n, --discards passdown|nopassdown|ignore, --zero y|n, --cachemode writethrough|writeback, --cachepolicy String, --cachesettings String, --minrecoveryrate Number[k|unit], --maxrecoveryrate Number[k|unit], --writebehind Number, --writemostly PV ) VG|LV|Tag|Select ..." +" [ --autobackup y|n, --ignorelockingfailure, --ignoremonitoring, --ignoreskippedcluster, --reportformat String, --sysinit, --select String ]"; +commands[0].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[0].required_opt_args[0].opt = addtag_ARG; +commands[0].required_opt_args[0].def.val_bits = val_enum_to_bit(tag_VAL); +commands[0].required_opt_args[1].opt = deltag_ARG; +commands[0].required_opt_args[1].def.val_bits = val_enum_to_bit(tag_VAL); +commands[0].required_opt_args[2].opt = alloc_ARG; +commands[0].required_opt_args[2].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[0].required_opt_args[3].opt = contiguous_ARG; +commands[0].required_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[0].required_opt_args[4].opt = detachprofile_ARG; +commands[0].required_opt_args[5].opt = metadataprofile_ARG; +commands[0].required_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[0].required_opt_args[6].opt = profile_ARG; +commands[0].required_opt_args[6].def.val_bits = val_enum_to_bit(string_VAL); +commands[0].required_opt_args[7].opt = permission_ARG; +commands[0].required_opt_args[7].def.val_bits = val_enum_to_bit(permission_VAL); +commands[0].required_opt_args[8].opt = readahead_ARG; +commands[0].required_opt_args[8].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[0].required_opt_args[9].opt = setactivationskip_ARG; +commands[0].required_opt_args[9].def.val_bits = val_enum_to_bit(bool_VAL); +commands[0].required_opt_args[10].opt = errorwhenfull_ARG; +commands[0].required_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[0].required_opt_args[11].opt = discards_ARG; +commands[0].required_opt_args[11].def.val_bits = val_enum_to_bit(discards_VAL); +commands[0].required_opt_args[12].opt = zero_ARG; +commands[0].required_opt_args[12].def.val_bits = val_enum_to_bit(bool_VAL); +commands[0].required_opt_args[13].opt = cachemode_ARG; +commands[0].required_opt_args[13].def.val_bits = val_enum_to_bit(cachemode_VAL); +commands[0].required_opt_args[14].opt = cachepolicy_ARG; +commands[0].required_opt_args[14].def.val_bits = val_enum_to_bit(string_VAL); +commands[0].required_opt_args[15].opt = cachesettings_ARG; +commands[0].required_opt_args[15].def.val_bits = val_enum_to_bit(string_VAL); +commands[0].required_opt_args[16].opt = minrecoveryrate_ARG; +commands[0].required_opt_args[16].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[0].required_opt_args[17].opt = maxrecoveryrate_ARG; +commands[0].required_opt_args[17].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[0].required_opt_args[18].opt = writebehind_ARG; +commands[0].required_opt_args[18].def.val_bits = val_enum_to_bit(number_VAL); +commands[0].required_opt_args[19].opt = writemostly_ARG; +commands[0].required_opt_args[19].def.val_bits = val_enum_to_bit(pv_VAL); +commands[0].required_pos_args[0].pos = 1; +commands[0].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(lv_VAL) | val_enum_to_bit(tag_VAL) | val_enum_to_bit(select_VAL); +commands[0].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[0].optional_opt_args[0].opt = commandprofile_ARG; +commands[0].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[0].optional_opt_args[1].opt = config_ARG; +commands[0].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[0].optional_opt_args[2].opt = debug_ARG; +commands[0].optional_opt_args[3].opt = driverloaded_ARG; +commands[0].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[0].optional_opt_args[4].opt = help_ARG; +commands[0].optional_opt_args[5].opt = profile_ARG; +commands[0].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[0].optional_opt_args[6].opt = quiet_ARG; +commands[0].optional_opt_args[7].opt = verbose_ARG; +commands[0].optional_opt_args[8].opt = version_ARG; +commands[0].optional_opt_args[9].opt = yes_ARG; +commands[0].optional_opt_args[10].opt = autobackup_ARG; +commands[0].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[0].optional_opt_args[11].opt = force_ARG; +commands[0].optional_opt_args[12].opt = ignorelockingfailure_ARG; +commands[0].optional_opt_args[13].opt = ignoremonitoring_ARG; +commands[0].optional_opt_args[14].opt = ignoreskippedcluster_ARG; +commands[0].optional_opt_args[15].opt = noudevsync_ARG; +commands[0].optional_opt_args[16].opt = reportformat_ARG; +commands[0].optional_opt_args[16].def.val_bits = val_enum_to_bit(string_VAL); +commands[0].optional_opt_args[17].opt = sysinit_ARG; +commands[0].optional_opt_args[18].opt = test_ARG; +commands[0].optional_opt_args[19].opt = select_ARG; +commands[0].optional_opt_args[19].def.val_bits = val_enum_to_bit(string_VAL); + +commands[1].name = "lvchange"; +commands[1].command_line_id = "lvchange_resync"; +commands[1].command_line_enum = lvchange_resync_CMD; +commands[1].fn = lvchange; +commands[1].ro_count = 1; +commands[1].rp_count = 1; +commands[1].oo_count = 20; +commands[1].op_count = 0; +commands[1].desc = ""; +commands[1].usage = "lvchange --resync VG|LV|Tag|Select ..." +" [ --autobackup y|n, --ignorelockingfailure, --ignoremonitoring, --ignoreskippedcluster, --reportformat String, --sysinit, --select String ]"; +commands[1].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[1].required_opt_args[0].opt = resync_ARG; +commands[1].required_pos_args[0].pos = 1; +commands[1].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(lv_VAL) | val_enum_to_bit(tag_VAL) | val_enum_to_bit(select_VAL); +commands[1].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[1].optional_opt_args[0].opt = commandprofile_ARG; +commands[1].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[1].optional_opt_args[1].opt = config_ARG; +commands[1].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[1].optional_opt_args[2].opt = debug_ARG; +commands[1].optional_opt_args[3].opt = driverloaded_ARG; +commands[1].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[1].optional_opt_args[4].opt = help_ARG; +commands[1].optional_opt_args[5].opt = profile_ARG; +commands[1].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[1].optional_opt_args[6].opt = quiet_ARG; +commands[1].optional_opt_args[7].opt = verbose_ARG; +commands[1].optional_opt_args[8].opt = version_ARG; +commands[1].optional_opt_args[9].opt = yes_ARG; +commands[1].optional_opt_args[10].opt = autobackup_ARG; +commands[1].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[1].optional_opt_args[11].opt = force_ARG; +commands[1].optional_opt_args[12].opt = ignorelockingfailure_ARG; +commands[1].optional_opt_args[13].opt = ignoremonitoring_ARG; +commands[1].optional_opt_args[14].opt = ignoreskippedcluster_ARG; +commands[1].optional_opt_args[15].opt = noudevsync_ARG; +commands[1].optional_opt_args[16].opt = reportformat_ARG; +commands[1].optional_opt_args[16].def.val_bits = val_enum_to_bit(string_VAL); +commands[1].optional_opt_args[17].opt = sysinit_ARG; +commands[1].optional_opt_args[18].opt = test_ARG; +commands[1].optional_opt_args[19].opt = select_ARG; +commands[1].optional_opt_args[19].def.val_bits = val_enum_to_bit(string_VAL); + +commands[2].name = "lvchange"; +commands[2].command_line_id = "lvchange_syncaction"; +commands[2].command_line_enum = lvchange_syncaction_CMD; +commands[2].fn = lvchange; +commands[2].ro_count = 1; +commands[2].rp_count = 1; +commands[2].oo_count = 20; +commands[2].op_count = 0; +commands[2].desc = ""; +commands[2].usage = "lvchange --syncaction String VG|LV|Tag|Select ..." +" [ --autobackup y|n, --ignorelockingfailure, --ignoremonitoring, --ignoreskippedcluster, --reportformat String, --sysinit, --select String ]"; +commands[2].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[2].required_opt_args[0].opt = syncaction_ARG; +commands[2].required_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[2].required_pos_args[0].pos = 1; +commands[2].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(lv_VAL) | val_enum_to_bit(tag_VAL) | val_enum_to_bit(select_VAL); +commands[2].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[2].optional_opt_args[0].opt = commandprofile_ARG; +commands[2].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[2].optional_opt_args[1].opt = config_ARG; +commands[2].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[2].optional_opt_args[2].opt = debug_ARG; +commands[2].optional_opt_args[3].opt = driverloaded_ARG; +commands[2].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[2].optional_opt_args[4].opt = help_ARG; +commands[2].optional_opt_args[5].opt = profile_ARG; +commands[2].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[2].optional_opt_args[6].opt = quiet_ARG; +commands[2].optional_opt_args[7].opt = verbose_ARG; +commands[2].optional_opt_args[8].opt = version_ARG; +commands[2].optional_opt_args[9].opt = yes_ARG; +commands[2].optional_opt_args[10].opt = autobackup_ARG; +commands[2].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[2].optional_opt_args[11].opt = force_ARG; +commands[2].optional_opt_args[12].opt = ignorelockingfailure_ARG; +commands[2].optional_opt_args[13].opt = ignoremonitoring_ARG; +commands[2].optional_opt_args[14].opt = ignoreskippedcluster_ARG; +commands[2].optional_opt_args[15].opt = noudevsync_ARG; +commands[2].optional_opt_args[16].opt = reportformat_ARG; +commands[2].optional_opt_args[16].def.val_bits = val_enum_to_bit(string_VAL); +commands[2].optional_opt_args[17].opt = sysinit_ARG; +commands[2].optional_opt_args[18].opt = test_ARG; +commands[2].optional_opt_args[19].opt = select_ARG; +commands[2].optional_opt_args[19].def.val_bits = val_enum_to_bit(string_VAL); + +commands[3].name = "lvchange"; +commands[3].command_line_id = "lvchange_rebuild"; +commands[3].command_line_enum = lvchange_rebuild_CMD; +commands[3].fn = lvchange; +commands[3].ro_count = 1; +commands[3].rp_count = 1; +commands[3].oo_count = 20; +commands[3].op_count = 0; +commands[3].desc = ""; +commands[3].usage = "lvchange --rebuild PV VG|LV|Tag|Select ..." +" [ --autobackup y|n, --ignorelockingfailure, --ignoremonitoring, --ignoreskippedcluster, --reportformat String, --sysinit, --select String ]"; +commands[3].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[3].required_opt_args[0].opt = rebuild_ARG; +commands[3].required_opt_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[3].required_pos_args[0].pos = 1; +commands[3].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(lv_VAL) | val_enum_to_bit(tag_VAL) | val_enum_to_bit(select_VAL); +commands[3].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[3].optional_opt_args[0].opt = commandprofile_ARG; +commands[3].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[3].optional_opt_args[1].opt = config_ARG; +commands[3].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[3].optional_opt_args[2].opt = debug_ARG; +commands[3].optional_opt_args[3].opt = driverloaded_ARG; +commands[3].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[3].optional_opt_args[4].opt = help_ARG; +commands[3].optional_opt_args[5].opt = profile_ARG; +commands[3].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[3].optional_opt_args[6].opt = quiet_ARG; +commands[3].optional_opt_args[7].opt = verbose_ARG; +commands[3].optional_opt_args[8].opt = version_ARG; +commands[3].optional_opt_args[9].opt = yes_ARG; +commands[3].optional_opt_args[10].opt = autobackup_ARG; +commands[3].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[3].optional_opt_args[11].opt = force_ARG; +commands[3].optional_opt_args[12].opt = ignorelockingfailure_ARG; +commands[3].optional_opt_args[13].opt = ignoremonitoring_ARG; +commands[3].optional_opt_args[14].opt = ignoreskippedcluster_ARG; +commands[3].optional_opt_args[15].opt = noudevsync_ARG; +commands[3].optional_opt_args[16].opt = reportformat_ARG; +commands[3].optional_opt_args[16].def.val_bits = val_enum_to_bit(string_VAL); +commands[3].optional_opt_args[17].opt = sysinit_ARG; +commands[3].optional_opt_args[18].opt = test_ARG; +commands[3].optional_opt_args[19].opt = select_ARG; +commands[3].optional_opt_args[19].def.val_bits = val_enum_to_bit(string_VAL); + +commands[4].name = "lvchange"; +commands[4].command_line_id = "lvchange_activate"; +commands[4].command_line_enum = lvchange_activate_CMD; +commands[4].fn = lvchange; +commands[4].ro_count = 1; +commands[4].rp_count = 1; +commands[4].oo_count = 43; +commands[4].op_count = 0; +commands[4].desc = "DESC: Activate or deactivate an LV."; +commands[4].usage = "lvchange --activate y|n|ay VG|LV|Tag|Select ..." +" [ --activationmode partial|degraded|complete, --partial, --ignoreactivationskip, --addtag Tag, --deltag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --contiguous y|n, --detachprofile, --metadataprofile String, --permission rw|r, --readahead auto|none|NumberSectors, --setactivationskip y|n, --errorwhenfull y|n, --discards passdown|nopassdown|ignore, --zero y|n, --cachemode writethrough|writeback, --cachepolicy String, --cachesettings String, --minrecoveryrate Number[k|unit], --maxrecoveryrate Number[k|unit], --writebehind Number, --writemostly PV, --autobackup y|n, --ignorelockingfailure, --ignoremonitoring, --ignoreskippedcluster, --reportformat String, --sysinit, --select String ]"; +commands[4].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[4].required_opt_args[0].opt = activate_ARG; +commands[4].required_opt_args[0].def.val_bits = val_enum_to_bit(activation_VAL); +commands[4].required_pos_args[0].pos = 1; +commands[4].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(lv_VAL) | val_enum_to_bit(tag_VAL) | val_enum_to_bit(select_VAL); +commands[4].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[4].optional_opt_args[0].opt = commandprofile_ARG; +commands[4].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[4].optional_opt_args[1].opt = config_ARG; +commands[4].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[4].optional_opt_args[2].opt = debug_ARG; +commands[4].optional_opt_args[3].opt = driverloaded_ARG; +commands[4].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[4].optional_opt_args[4].opt = help_ARG; +commands[4].optional_opt_args[5].opt = profile_ARG; +commands[4].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[4].optional_opt_args[6].opt = quiet_ARG; +commands[4].optional_opt_args[7].opt = verbose_ARG; +commands[4].optional_opt_args[8].opt = version_ARG; +commands[4].optional_opt_args[9].opt = yes_ARG; +commands[4].optional_opt_args[10].opt = activationmode_ARG; +commands[4].optional_opt_args[10].def.val_bits = val_enum_to_bit(activationmode_VAL); +commands[4].optional_opt_args[11].opt = partial_ARG; +commands[4].optional_opt_args[12].opt = ignoreactivationskip_ARG; +commands[4].optional_opt_args[13].opt = addtag_ARG; +commands[4].optional_opt_args[13].def.val_bits = val_enum_to_bit(tag_VAL); +commands[4].optional_opt_args[14].opt = deltag_ARG; +commands[4].optional_opt_args[14].def.val_bits = val_enum_to_bit(tag_VAL); +commands[4].optional_opt_args[15].opt = alloc_ARG; +commands[4].optional_opt_args[15].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[4].optional_opt_args[16].opt = contiguous_ARG; +commands[4].optional_opt_args[16].def.val_bits = val_enum_to_bit(bool_VAL); +commands[4].optional_opt_args[17].opt = detachprofile_ARG; +commands[4].optional_opt_args[18].opt = metadataprofile_ARG; +commands[4].optional_opt_args[18].def.val_bits = val_enum_to_bit(string_VAL); +commands[4].optional_opt_args[19].opt = profile_ARG; +commands[4].optional_opt_args[19].def.val_bits = val_enum_to_bit(string_VAL); +commands[4].optional_opt_args[20].opt = permission_ARG; +commands[4].optional_opt_args[20].def.val_bits = val_enum_to_bit(permission_VAL); +commands[4].optional_opt_args[21].opt = readahead_ARG; +commands[4].optional_opt_args[21].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[4].optional_opt_args[22].opt = setactivationskip_ARG; +commands[4].optional_opt_args[22].def.val_bits = val_enum_to_bit(bool_VAL); +commands[4].optional_opt_args[23].opt = errorwhenfull_ARG; +commands[4].optional_opt_args[23].def.val_bits = val_enum_to_bit(bool_VAL); +commands[4].optional_opt_args[24].opt = discards_ARG; +commands[4].optional_opt_args[24].def.val_bits = val_enum_to_bit(discards_VAL); +commands[4].optional_opt_args[25].opt = zero_ARG; +commands[4].optional_opt_args[25].def.val_bits = val_enum_to_bit(bool_VAL); +commands[4].optional_opt_args[26].opt = cachemode_ARG; +commands[4].optional_opt_args[26].def.val_bits = val_enum_to_bit(cachemode_VAL); +commands[4].optional_opt_args[27].opt = cachepolicy_ARG; +commands[4].optional_opt_args[27].def.val_bits = val_enum_to_bit(string_VAL); +commands[4].optional_opt_args[28].opt = cachesettings_ARG; +commands[4].optional_opt_args[28].def.val_bits = val_enum_to_bit(string_VAL); +commands[4].optional_opt_args[29].opt = minrecoveryrate_ARG; +commands[4].optional_opt_args[29].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[4].optional_opt_args[30].opt = maxrecoveryrate_ARG; +commands[4].optional_opt_args[30].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[4].optional_opt_args[31].opt = writebehind_ARG; +commands[4].optional_opt_args[31].def.val_bits = val_enum_to_bit(number_VAL); +commands[4].optional_opt_args[32].opt = writemostly_ARG; +commands[4].optional_opt_args[32].def.val_bits = val_enum_to_bit(pv_VAL); +commands[4].optional_opt_args[33].opt = autobackup_ARG; +commands[4].optional_opt_args[33].def.val_bits = val_enum_to_bit(bool_VAL); +commands[4].optional_opt_args[34].opt = force_ARG; +commands[4].optional_opt_args[35].opt = ignorelockingfailure_ARG; +commands[4].optional_opt_args[36].opt = ignoremonitoring_ARG; +commands[4].optional_opt_args[37].opt = ignoreskippedcluster_ARG; +commands[4].optional_opt_args[38].opt = noudevsync_ARG; +commands[4].optional_opt_args[39].opt = reportformat_ARG; +commands[4].optional_opt_args[39].def.val_bits = val_enum_to_bit(string_VAL); +commands[4].optional_opt_args[40].opt = sysinit_ARG; +commands[4].optional_opt_args[41].opt = test_ARG; +commands[4].optional_opt_args[42].opt = select_ARG; +commands[4].optional_opt_args[42].def.val_bits = val_enum_to_bit(string_VAL); + +commands[5].name = "lvchange"; +commands[5].command_line_id = "lvchange_refresh"; +commands[5].command_line_enum = lvchange_refresh_CMD; +commands[5].fn = lvchange; +commands[5].ro_count = 1; +commands[5].rp_count = 1; +commands[5].oo_count = 20; +commands[5].op_count = 0; +commands[5].desc = ""; +commands[5].usage = "lvchange --refresh VG|LV|Tag|Select ..." +" [ --autobackup y|n, --ignorelockingfailure, --ignoremonitoring, --ignoreskippedcluster, --reportformat String, --sysinit, --select String ]"; +commands[5].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[5].required_opt_args[0].opt = refresh_ARG; +commands[5].required_pos_args[0].pos = 1; +commands[5].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(lv_VAL) | val_enum_to_bit(tag_VAL) | val_enum_to_bit(select_VAL); +commands[5].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[5].optional_opt_args[0].opt = commandprofile_ARG; +commands[5].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[5].optional_opt_args[1].opt = config_ARG; +commands[5].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[5].optional_opt_args[2].opt = debug_ARG; +commands[5].optional_opt_args[3].opt = driverloaded_ARG; +commands[5].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[5].optional_opt_args[4].opt = help_ARG; +commands[5].optional_opt_args[5].opt = profile_ARG; +commands[5].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[5].optional_opt_args[6].opt = quiet_ARG; +commands[5].optional_opt_args[7].opt = verbose_ARG; +commands[5].optional_opt_args[8].opt = version_ARG; +commands[5].optional_opt_args[9].opt = yes_ARG; +commands[5].optional_opt_args[10].opt = autobackup_ARG; +commands[5].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[5].optional_opt_args[11].opt = force_ARG; +commands[5].optional_opt_args[12].opt = ignorelockingfailure_ARG; +commands[5].optional_opt_args[13].opt = ignoremonitoring_ARG; +commands[5].optional_opt_args[14].opt = ignoreskippedcluster_ARG; +commands[5].optional_opt_args[15].opt = noudevsync_ARG; +commands[5].optional_opt_args[16].opt = reportformat_ARG; +commands[5].optional_opt_args[16].def.val_bits = val_enum_to_bit(string_VAL); +commands[5].optional_opt_args[17].opt = sysinit_ARG; +commands[5].optional_opt_args[18].opt = test_ARG; +commands[5].optional_opt_args[19].opt = select_ARG; +commands[5].optional_opt_args[19].def.val_bits = val_enum_to_bit(string_VAL); + +commands[6].name = "lvchange"; +commands[6].command_line_id = "lvchange_monitor"; +commands[6].command_line_enum = lvchange_monitor_CMD; +commands[6].fn = lvchange; +commands[6].ro_count = 1; +commands[6].rp_count = 1; +commands[6].oo_count = 21; +commands[6].op_count = 0; +commands[6].desc = "DESC: Monitor or unmonitor an LV."; +commands[6].usage = "lvchange --monitor y|n VG|LV|Tag|Select ..." +" [ --poll y|n, --autobackup y|n, --ignorelockingfailure, --ignoremonitoring, --ignoreskippedcluster, --reportformat String, --sysinit, --select String ]"; +commands[6].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[6].required_opt_args[0].opt = monitor_ARG; +commands[6].required_opt_args[0].def.val_bits = val_enum_to_bit(bool_VAL); +commands[6].required_pos_args[0].pos = 1; +commands[6].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(lv_VAL) | val_enum_to_bit(tag_VAL) | val_enum_to_bit(select_VAL); +commands[6].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[6].optional_opt_args[0].opt = commandprofile_ARG; +commands[6].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[6].optional_opt_args[1].opt = config_ARG; +commands[6].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[6].optional_opt_args[2].opt = debug_ARG; +commands[6].optional_opt_args[3].opt = driverloaded_ARG; +commands[6].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[6].optional_opt_args[4].opt = help_ARG; +commands[6].optional_opt_args[5].opt = profile_ARG; +commands[6].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[6].optional_opt_args[6].opt = quiet_ARG; +commands[6].optional_opt_args[7].opt = verbose_ARG; +commands[6].optional_opt_args[8].opt = version_ARG; +commands[6].optional_opt_args[9].opt = yes_ARG; +commands[6].optional_opt_args[10].opt = poll_ARG; +commands[6].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[6].optional_opt_args[11].opt = autobackup_ARG; +commands[6].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[6].optional_opt_args[12].opt = force_ARG; +commands[6].optional_opt_args[13].opt = ignorelockingfailure_ARG; +commands[6].optional_opt_args[14].opt = ignoremonitoring_ARG; +commands[6].optional_opt_args[15].opt = ignoreskippedcluster_ARG; +commands[6].optional_opt_args[16].opt = noudevsync_ARG; +commands[6].optional_opt_args[17].opt = reportformat_ARG; +commands[6].optional_opt_args[17].def.val_bits = val_enum_to_bit(string_VAL); +commands[6].optional_opt_args[18].opt = sysinit_ARG; +commands[6].optional_opt_args[19].opt = test_ARG; +commands[6].optional_opt_args[20].opt = select_ARG; +commands[6].optional_opt_args[20].def.val_bits = val_enum_to_bit(string_VAL); + +commands[7].name = "lvchange"; +commands[7].command_line_id = "lvchange_poll"; +commands[7].command_line_enum = lvchange_poll_CMD; +commands[7].fn = lvchange; +commands[7].ro_count = 1; +commands[7].rp_count = 1; +commands[7].oo_count = 21; +commands[7].op_count = 0; +commands[7].desc = ""; +commands[7].usage = "lvchange --poll y|n VG|LV|Tag|Select ..." +" [ --monitor y|n, --autobackup y|n, --ignorelockingfailure, --ignoremonitoring, --ignoreskippedcluster, --reportformat String, --sysinit, --select String ]"; +commands[7].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[7].required_opt_args[0].opt = poll_ARG; +commands[7].required_opt_args[0].def.val_bits = val_enum_to_bit(bool_VAL); +commands[7].required_pos_args[0].pos = 1; +commands[7].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(lv_VAL) | val_enum_to_bit(tag_VAL) | val_enum_to_bit(select_VAL); +commands[7].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[7].optional_opt_args[0].opt = commandprofile_ARG; +commands[7].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[7].optional_opt_args[1].opt = config_ARG; +commands[7].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[7].optional_opt_args[2].opt = debug_ARG; +commands[7].optional_opt_args[3].opt = driverloaded_ARG; +commands[7].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[7].optional_opt_args[4].opt = help_ARG; +commands[7].optional_opt_args[5].opt = profile_ARG; +commands[7].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[7].optional_opt_args[6].opt = quiet_ARG; +commands[7].optional_opt_args[7].opt = verbose_ARG; +commands[7].optional_opt_args[8].opt = version_ARG; +commands[7].optional_opt_args[9].opt = yes_ARG; +commands[7].optional_opt_args[10].opt = monitor_ARG; +commands[7].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[7].optional_opt_args[11].opt = autobackup_ARG; +commands[7].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[7].optional_opt_args[12].opt = force_ARG; +commands[7].optional_opt_args[13].opt = ignorelockingfailure_ARG; +commands[7].optional_opt_args[14].opt = ignoremonitoring_ARG; +commands[7].optional_opt_args[15].opt = ignoreskippedcluster_ARG; +commands[7].optional_opt_args[16].opt = noudevsync_ARG; +commands[7].optional_opt_args[17].opt = reportformat_ARG; +commands[7].optional_opt_args[17].def.val_bits = val_enum_to_bit(string_VAL); +commands[7].optional_opt_args[18].opt = sysinit_ARG; +commands[7].optional_opt_args[19].opt = test_ARG; +commands[7].optional_opt_args[20].opt = select_ARG; +commands[7].optional_opt_args[20].def.val_bits = val_enum_to_bit(string_VAL); + +commands[8].name = "lvchange"; +commands[8].command_line_id = "lvchange_persistent"; +commands[8].command_line_enum = lvchange_persistent_CMD; +commands[8].fn = lvchange; +commands[8].ro_count = 1; +commands[8].rp_count = 1; +commands[8].oo_count = 22; +commands[8].op_count = 0; +commands[8].desc = ""; +commands[8].usage = "lvchange --persistent y|n VG|LV|Tag|Select ..." +" [ --minor Number, --major Number, --autobackup y|n, --ignorelockingfailure, --ignoremonitoring, --ignoreskippedcluster, --reportformat String, --sysinit, --select String ]"; +commands[8].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[8].required_opt_args[0].opt = persistent_ARG; +commands[8].required_opt_args[0].def.val_bits = val_enum_to_bit(bool_VAL); +commands[8].required_pos_args[0].pos = 1; +commands[8].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(lv_VAL) | val_enum_to_bit(tag_VAL) | val_enum_to_bit(select_VAL); +commands[8].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[8].optional_opt_args[0].opt = commandprofile_ARG; +commands[8].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[8].optional_opt_args[1].opt = config_ARG; +commands[8].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[8].optional_opt_args[2].opt = debug_ARG; +commands[8].optional_opt_args[3].opt = driverloaded_ARG; +commands[8].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[8].optional_opt_args[4].opt = help_ARG; +commands[8].optional_opt_args[5].opt = profile_ARG; +commands[8].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[8].optional_opt_args[6].opt = quiet_ARG; +commands[8].optional_opt_args[7].opt = verbose_ARG; +commands[8].optional_opt_args[8].opt = version_ARG; +commands[8].optional_opt_args[9].opt = yes_ARG; +commands[8].optional_opt_args[10].opt = minor_ARG; +commands[8].optional_opt_args[10].def.val_bits = val_enum_to_bit(number_VAL); +commands[8].optional_opt_args[11].opt = major_ARG; +commands[8].optional_opt_args[11].def.val_bits = val_enum_to_bit(number_VAL); +commands[8].optional_opt_args[12].opt = autobackup_ARG; +commands[8].optional_opt_args[12].def.val_bits = val_enum_to_bit(bool_VAL); +commands[8].optional_opt_args[13].opt = force_ARG; +commands[8].optional_opt_args[14].opt = ignorelockingfailure_ARG; +commands[8].optional_opt_args[15].opt = ignoremonitoring_ARG; +commands[8].optional_opt_args[16].opt = ignoreskippedcluster_ARG; +commands[8].optional_opt_args[17].opt = noudevsync_ARG; +commands[8].optional_opt_args[18].opt = reportformat_ARG; +commands[8].optional_opt_args[18].def.val_bits = val_enum_to_bit(string_VAL); +commands[8].optional_opt_args[19].opt = sysinit_ARG; +commands[8].optional_opt_args[20].opt = test_ARG; +commands[8].optional_opt_args[21].opt = select_ARG; +commands[8].optional_opt_args[21].def.val_bits = val_enum_to_bit(string_VAL); + +commands[9].name = "lvconvert"; +commands[9].command_line_id = "lvconvert_merge"; +commands[9].command_line_enum = lvconvert_merge_CMD; +commands[9].fn = lvconvert; +commands[9].ro_count = 1; +commands[9].rp_count = 1; +commands[9].oo_count = 12; +commands[9].op_count = 0; +commands[9].desc = "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."; +commands[9].usage = "lvconvert --merge VG|LV_linear_striped_snapshot_raid_thin|Tag ..." +" [ --background, --interval Number ]"; +commands[9].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[9].required_opt_args[0].opt = merge_ARG; +commands[9].required_pos_args[0].pos = 1; +commands[9].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(lv_VAL) | val_enum_to_bit(tag_VAL); +commands[9].required_pos_args[0].def.lv_types = ARG_DEF_LV_LINEAR | ARG_DEF_LV_STRIPED | ARG_DEF_LV_SNAPSHOT | ARG_DEF_LV_RAID | ARG_DEF_LV_THIN; +commands[9].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[9].optional_opt_args[0].opt = commandprofile_ARG; +commands[9].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[9].optional_opt_args[1].opt = config_ARG; +commands[9].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[9].optional_opt_args[2].opt = debug_ARG; +commands[9].optional_opt_args[3].opt = driverloaded_ARG; +commands[9].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[9].optional_opt_args[4].opt = help_ARG; +commands[9].optional_opt_args[5].opt = profile_ARG; +commands[9].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[9].optional_opt_args[6].opt = quiet_ARG; +commands[9].optional_opt_args[7].opt = verbose_ARG; +commands[9].optional_opt_args[8].opt = version_ARG; +commands[9].optional_opt_args[9].opt = yes_ARG; +commands[9].optional_opt_args[10].opt = background_ARG; +commands[9].optional_opt_args[11].opt = interval_ARG; +commands[9].optional_opt_args[11].def.val_bits = val_enum_to_bit(number_VAL); + +commands[10].name = "lvconvert"; +commands[10].command_line_id = "lvconvert_combine_split_snapshot"; +commands[10].command_line_enum = lvconvert_combine_split_snapshot_CMD; +commands[10].fn = lvconvert; +commands[10].ro_count = 1; +commands[10].rp_count = 2; +commands[10].oo_count = 18; +commands[10].op_count = 0; +commands[10].desc = "DESC: Combine LV with a previously split snapshot LV."; +commands[10].usage = "lvconvert --type snapshot LV_linear_striped_raid LV_snapshot" +" [ --chunksize Number[k|unit], --zero y|n, --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]"; +commands[10].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[10].required_opt_args[0].opt = type_ARG; +commands[10].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[10].required_opt_args[0].def.str = "snapshot"; +commands[10].required_pos_args[0].pos = 1; +commands[10].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[10].required_pos_args[0].def.lv_types = ARG_DEF_LV_LINEAR | ARG_DEF_LV_STRIPED | ARG_DEF_LV_RAID; +commands[10].required_pos_args[1].pos = 2; +commands[10].required_pos_args[1].def.val_bits = val_enum_to_bit(lv_VAL); +commands[10].required_pos_args[1].def.lv_types = ARG_DEF_LV_SNAPSHOT; +commands[10].optional_opt_args[0].opt = commandprofile_ARG; +commands[10].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[10].optional_opt_args[1].opt = config_ARG; +commands[10].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[10].optional_opt_args[2].opt = debug_ARG; +commands[10].optional_opt_args[3].opt = driverloaded_ARG; +commands[10].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[10].optional_opt_args[4].opt = help_ARG; +commands[10].optional_opt_args[5].opt = profile_ARG; +commands[10].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[10].optional_opt_args[6].opt = quiet_ARG; +commands[10].optional_opt_args[7].opt = verbose_ARG; +commands[10].optional_opt_args[8].opt = version_ARG; +commands[10].optional_opt_args[9].opt = yes_ARG; +commands[10].optional_opt_args[10].opt = chunksize_ARG; +commands[10].optional_opt_args[10].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[10].optional_opt_args[11].opt = zero_ARG; +commands[10].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[10].optional_opt_args[12].opt = alloc_ARG; +commands[10].optional_opt_args[12].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[10].optional_opt_args[13].opt = background_ARG; +commands[10].optional_opt_args[14].opt = force_ARG; +commands[10].optional_opt_args[15].opt = noudevsync_ARG; +commands[10].optional_opt_args[16].opt = test_ARG; +commands[10].optional_opt_args[17].opt = usepolicies_ARG; + +commands[11].name = "lvconvert"; +commands[11].command_line_id = "lvconvert_to_thin_with_external"; +commands[11].command_line_enum = lvconvert_to_thin_with_external_CMD; +commands[11].fn = lvconvert; +commands[11].ro_count = 2; +commands[11].rp_count = 1; +commands[11].oo_count = 23; +commands[11].op_count = 0; +commands[11].desc = "DESC: Convert LV to type thin with an external origin."; +commands[11].usage = "lvconvert --type thin --thinpool LV LV_linear_striped_raid" +" [ --thin, --originname LV_new, --poolmetadata LV, --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --readahead auto|none|NumberSectors, --chunksize Number[k|unit], --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]"; +commands[11].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[11].required_opt_args[0].opt = type_ARG; +commands[11].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[11].required_opt_args[0].def.str = "thin"; +commands[11].required_opt_args[1].opt = thinpool_ARG; +commands[11].required_opt_args[1].def.val_bits = val_enum_to_bit(lv_VAL); +commands[11].required_pos_args[0].pos = 1; +commands[11].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[11].required_pos_args[0].def.lv_types = ARG_DEF_LV_LINEAR | ARG_DEF_LV_STRIPED | ARG_DEF_LV_RAID; +commands[11].optional_opt_args[0].opt = commandprofile_ARG; +commands[11].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[11].optional_opt_args[1].opt = config_ARG; +commands[11].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[11].optional_opt_args[2].opt = debug_ARG; +commands[11].optional_opt_args[3].opt = driverloaded_ARG; +commands[11].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[11].optional_opt_args[4].opt = help_ARG; +commands[11].optional_opt_args[5].opt = profile_ARG; +commands[11].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[11].optional_opt_args[6].opt = quiet_ARG; +commands[11].optional_opt_args[7].opt = verbose_ARG; +commands[11].optional_opt_args[8].opt = version_ARG; +commands[11].optional_opt_args[9].opt = yes_ARG; +commands[11].optional_opt_args[10].opt = thin_ARG; +commands[11].optional_opt_args[11].opt = originname_ARG; +commands[11].optional_opt_args[11].def.val_bits = val_enum_to_bit(lv_VAL); +commands[11].optional_opt_args[11].def.flags = ARG_DEF_FLAG_NEW; +commands[11].optional_opt_args[12].opt = poolmetadata_ARG; +commands[11].optional_opt_args[12].def.val_bits = val_enum_to_bit(lv_VAL); +commands[11].optional_opt_args[13].opt = poolmetadatasize_ARG; +commands[11].optional_opt_args[13].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[11].optional_opt_args[14].opt = poolmetadataspare_ARG; +commands[11].optional_opt_args[14].def.val_bits = val_enum_to_bit(bool_VAL); +commands[11].optional_opt_args[15].opt = readahead_ARG; +commands[11].optional_opt_args[15].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[11].optional_opt_args[16].opt = chunksize_ARG; +commands[11].optional_opt_args[16].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[11].optional_opt_args[17].opt = alloc_ARG; +commands[11].optional_opt_args[17].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[11].optional_opt_args[18].opt = background_ARG; +commands[11].optional_opt_args[19].opt = force_ARG; +commands[11].optional_opt_args[20].opt = noudevsync_ARG; +commands[11].optional_opt_args[21].opt = test_ARG; +commands[11].optional_opt_args[22].opt = usepolicies_ARG; + +commands[12].name = "lvconvert"; +commands[12].command_line_id = "lvconvert_to_thin_with_external"; +commands[12].command_line_enum = lvconvert_to_thin_with_external_CMD; +commands[12].fn = lvconvert; +commands[12].ro_count = 2; +commands[12].rp_count = 1; +commands[12].oo_count = 23; +commands[12].op_count = 0; +commands[12].desc = "DESC: Convert LV to type thin with an external origin DESC: (variant, infers --type thin)."; +commands[12].usage = "lvconvert --thin --thinpool LV LV_linear_striped_raid" +" [ --type thin, --originname LV_new, --poolmetadata LV, --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --readahead auto|none|NumberSectors, --chunksize Number[k|unit], --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]"; +commands[12].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[12].required_opt_args[0].opt = thin_ARG; +commands[12].required_opt_args[1].opt = thinpool_ARG; +commands[12].required_opt_args[1].def.val_bits = val_enum_to_bit(lv_VAL); +commands[12].required_pos_args[0].pos = 1; +commands[12].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[12].required_pos_args[0].def.lv_types = ARG_DEF_LV_LINEAR | ARG_DEF_LV_STRIPED | ARG_DEF_LV_RAID; +commands[12].optional_opt_args[0].opt = commandprofile_ARG; +commands[12].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[12].optional_opt_args[1].opt = config_ARG; +commands[12].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[12].optional_opt_args[2].opt = debug_ARG; +commands[12].optional_opt_args[3].opt = driverloaded_ARG; +commands[12].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[12].optional_opt_args[4].opt = help_ARG; +commands[12].optional_opt_args[5].opt = profile_ARG; +commands[12].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[12].optional_opt_args[6].opt = quiet_ARG; +commands[12].optional_opt_args[7].opt = verbose_ARG; +commands[12].optional_opt_args[8].opt = version_ARG; +commands[12].optional_opt_args[9].opt = yes_ARG; +commands[12].optional_opt_args[10].opt = type_ARG; +commands[12].optional_opt_args[10].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[12].optional_opt_args[10].def.str = "thin"; +commands[12].optional_opt_args[11].opt = originname_ARG; +commands[12].optional_opt_args[11].def.val_bits = val_enum_to_bit(lv_VAL); +commands[12].optional_opt_args[11].def.flags = ARG_DEF_FLAG_NEW; +commands[12].optional_opt_args[12].opt = poolmetadata_ARG; +commands[12].optional_opt_args[12].def.val_bits = val_enum_to_bit(lv_VAL); +commands[12].optional_opt_args[13].opt = poolmetadatasize_ARG; +commands[12].optional_opt_args[13].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[12].optional_opt_args[14].opt = poolmetadataspare_ARG; +commands[12].optional_opt_args[14].def.val_bits = val_enum_to_bit(bool_VAL); +commands[12].optional_opt_args[15].opt = readahead_ARG; +commands[12].optional_opt_args[15].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[12].optional_opt_args[16].opt = chunksize_ARG; +commands[12].optional_opt_args[16].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[12].optional_opt_args[17].opt = alloc_ARG; +commands[12].optional_opt_args[17].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[12].optional_opt_args[18].opt = background_ARG; +commands[12].optional_opt_args[19].opt = force_ARG; +commands[12].optional_opt_args[20].opt = noudevsync_ARG; +commands[12].optional_opt_args[21].opt = test_ARG; +commands[12].optional_opt_args[22].opt = usepolicies_ARG; + +commands[13].name = "lvconvert"; +commands[13].command_line_id = "lvconvert_to_cache_vol"; +commands[13].command_line_enum = lvconvert_to_cache_vol_CMD; +commands[13].fn = lvconvert; +commands[13].ro_count = 2; +commands[13].rp_count = 1; +commands[13].oo_count = 26; +commands[13].op_count = 0; +commands[13].desc = "DESC: Convert LV to type cache."; +commands[13].usage = "lvconvert --type cache --cachepool LV LV_linear_striped_raid_thinpool" +" [ --cache, --cachemode writethrough|writeback, --cachepolicy String, --cachesettings String, --zero y|n, --poolmetadata LV, --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --readahead auto|none|NumberSectors, --chunksize Number[k|unit], --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]"; +commands[13].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[13].required_opt_args[0].opt = type_ARG; +commands[13].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[13].required_opt_args[0].def.str = "cache"; +commands[13].required_opt_args[1].opt = cachepool_ARG; +commands[13].required_opt_args[1].def.val_bits = val_enum_to_bit(lv_VAL); +commands[13].required_pos_args[0].pos = 1; +commands[13].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[13].required_pos_args[0].def.lv_types = ARG_DEF_LV_LINEAR | ARG_DEF_LV_STRIPED | ARG_DEF_LV_RAID | ARG_DEF_LV_THINPOOL; +commands[13].optional_opt_args[0].opt = commandprofile_ARG; +commands[13].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[13].optional_opt_args[1].opt = config_ARG; +commands[13].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[13].optional_opt_args[2].opt = debug_ARG; +commands[13].optional_opt_args[3].opt = driverloaded_ARG; +commands[13].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[13].optional_opt_args[4].opt = help_ARG; +commands[13].optional_opt_args[5].opt = profile_ARG; +commands[13].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[13].optional_opt_args[6].opt = quiet_ARG; +commands[13].optional_opt_args[7].opt = verbose_ARG; +commands[13].optional_opt_args[8].opt = version_ARG; +commands[13].optional_opt_args[9].opt = yes_ARG; +commands[13].optional_opt_args[10].opt = cache_ARG; +commands[13].optional_opt_args[11].opt = cachemode_ARG; +commands[13].optional_opt_args[11].def.val_bits = val_enum_to_bit(cachemode_VAL); +commands[13].optional_opt_args[12].opt = cachepolicy_ARG; +commands[13].optional_opt_args[12].def.val_bits = val_enum_to_bit(string_VAL); +commands[13].optional_opt_args[13].opt = cachesettings_ARG; +commands[13].optional_opt_args[13].def.val_bits = val_enum_to_bit(string_VAL); +commands[13].optional_opt_args[14].opt = zero_ARG; +commands[13].optional_opt_args[14].def.val_bits = val_enum_to_bit(bool_VAL); +commands[13].optional_opt_args[15].opt = poolmetadata_ARG; +commands[13].optional_opt_args[15].def.val_bits = val_enum_to_bit(lv_VAL); +commands[13].optional_opt_args[16].opt = poolmetadatasize_ARG; +commands[13].optional_opt_args[16].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[13].optional_opt_args[17].opt = poolmetadataspare_ARG; +commands[13].optional_opt_args[17].def.val_bits = val_enum_to_bit(bool_VAL); +commands[13].optional_opt_args[18].opt = readahead_ARG; +commands[13].optional_opt_args[18].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[13].optional_opt_args[19].opt = chunksize_ARG; +commands[13].optional_opt_args[19].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[13].optional_opt_args[20].opt = alloc_ARG; +commands[13].optional_opt_args[20].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[13].optional_opt_args[21].opt = background_ARG; +commands[13].optional_opt_args[22].opt = force_ARG; +commands[13].optional_opt_args[23].opt = noudevsync_ARG; +commands[13].optional_opt_args[24].opt = test_ARG; +commands[13].optional_opt_args[25].opt = usepolicies_ARG; + +commands[14].name = "lvconvert"; +commands[14].command_line_id = "lvconvert_to_cache_vol"; +commands[14].command_line_enum = lvconvert_to_cache_vol_CMD; +commands[14].fn = lvconvert; +commands[14].ro_count = 2; +commands[14].rp_count = 1; +commands[14].oo_count = 26; +commands[14].op_count = 0; +commands[14].desc = "DESC: Convert LV to type cache (variant, infers --type cache)."; +commands[14].usage = "lvconvert --cache --cachepool LV LV_linear_striped_raid_thinpool" +" [ --type cache, --cachemode writethrough|writeback, --cachepolicy String, --cachesettings String, --zero y|n, --poolmetadata LV, --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --readahead auto|none|NumberSectors, --chunksize Number[k|unit], --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]"; +commands[14].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[14].required_opt_args[0].opt = cache_ARG; +commands[14].required_opt_args[1].opt = cachepool_ARG; +commands[14].required_opt_args[1].def.val_bits = val_enum_to_bit(lv_VAL); +commands[14].required_pos_args[0].pos = 1; +commands[14].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[14].required_pos_args[0].def.lv_types = ARG_DEF_LV_LINEAR | ARG_DEF_LV_STRIPED | ARG_DEF_LV_RAID | ARG_DEF_LV_THINPOOL; +commands[14].optional_opt_args[0].opt = commandprofile_ARG; +commands[14].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[14].optional_opt_args[1].opt = config_ARG; +commands[14].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[14].optional_opt_args[2].opt = debug_ARG; +commands[14].optional_opt_args[3].opt = driverloaded_ARG; +commands[14].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[14].optional_opt_args[4].opt = help_ARG; +commands[14].optional_opt_args[5].opt = profile_ARG; +commands[14].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[14].optional_opt_args[6].opt = quiet_ARG; +commands[14].optional_opt_args[7].opt = verbose_ARG; +commands[14].optional_opt_args[8].opt = version_ARG; +commands[14].optional_opt_args[9].opt = yes_ARG; +commands[14].optional_opt_args[10].opt = type_ARG; +commands[14].optional_opt_args[10].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[14].optional_opt_args[10].def.str = "cache"; +commands[14].optional_opt_args[11].opt = cachemode_ARG; +commands[14].optional_opt_args[11].def.val_bits = val_enum_to_bit(cachemode_VAL); +commands[14].optional_opt_args[12].opt = cachepolicy_ARG; +commands[14].optional_opt_args[12].def.val_bits = val_enum_to_bit(string_VAL); +commands[14].optional_opt_args[13].opt = cachesettings_ARG; +commands[14].optional_opt_args[13].def.val_bits = val_enum_to_bit(string_VAL); +commands[14].optional_opt_args[14].opt = zero_ARG; +commands[14].optional_opt_args[14].def.val_bits = val_enum_to_bit(bool_VAL); +commands[14].optional_opt_args[15].opt = poolmetadata_ARG; +commands[14].optional_opt_args[15].def.val_bits = val_enum_to_bit(lv_VAL); +commands[14].optional_opt_args[16].opt = poolmetadatasize_ARG; +commands[14].optional_opt_args[16].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[14].optional_opt_args[17].opt = poolmetadataspare_ARG; +commands[14].optional_opt_args[17].def.val_bits = val_enum_to_bit(bool_VAL); +commands[14].optional_opt_args[18].opt = readahead_ARG; +commands[14].optional_opt_args[18].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[14].optional_opt_args[19].opt = chunksize_ARG; +commands[14].optional_opt_args[19].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[14].optional_opt_args[20].opt = alloc_ARG; +commands[14].optional_opt_args[20].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[14].optional_opt_args[21].opt = background_ARG; +commands[14].optional_opt_args[22].opt = force_ARG; +commands[14].optional_opt_args[23].opt = noudevsync_ARG; +commands[14].optional_opt_args[24].opt = test_ARG; +commands[14].optional_opt_args[25].opt = usepolicies_ARG; + +commands[15].name = "lvconvert"; +commands[15].command_line_id = "lvconvert_to_thinpool"; +commands[15].command_line_enum = lvconvert_to_thinpool_CMD; +commands[15].fn = lvconvert; +commands[15].ro_count = 1; +commands[15].rp_count = 1; +commands[15].oo_count = 23; +commands[15].op_count = 0; +commands[15].desc = "DESC: Convert LV to type thin-pool."; +commands[15].usage = "lvconvert --type thin-pool LV_linear_striped_raid_cache" +" [ --discards passdown|nopassdown|ignore, --zero y|n, --poolmetadata LV, --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --readahead auto|none|NumberSectors, --chunksize Number[k|unit], --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]"; +commands[15].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[15].required_opt_args[0].opt = type_ARG; +commands[15].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[15].required_opt_args[0].def.str = "thin-pool"; +commands[15].required_pos_args[0].pos = 1; +commands[15].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[15].required_pos_args[0].def.lv_types = ARG_DEF_LV_LINEAR | ARG_DEF_LV_STRIPED | ARG_DEF_LV_RAID | ARG_DEF_LV_CACHE; +commands[15].optional_opt_args[0].opt = commandprofile_ARG; +commands[15].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[15].optional_opt_args[1].opt = config_ARG; +commands[15].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[15].optional_opt_args[2].opt = debug_ARG; +commands[15].optional_opt_args[3].opt = driverloaded_ARG; +commands[15].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[15].optional_opt_args[4].opt = help_ARG; +commands[15].optional_opt_args[5].opt = profile_ARG; +commands[15].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[15].optional_opt_args[6].opt = quiet_ARG; +commands[15].optional_opt_args[7].opt = verbose_ARG; +commands[15].optional_opt_args[8].opt = version_ARG; +commands[15].optional_opt_args[9].opt = yes_ARG; +commands[15].optional_opt_args[10].opt = discards_ARG; +commands[15].optional_opt_args[10].def.val_bits = val_enum_to_bit(discards_VAL); +commands[15].optional_opt_args[11].opt = zero_ARG; +commands[15].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[15].optional_opt_args[12].opt = poolmetadata_ARG; +commands[15].optional_opt_args[12].def.val_bits = val_enum_to_bit(lv_VAL); +commands[15].optional_opt_args[13].opt = poolmetadatasize_ARG; +commands[15].optional_opt_args[13].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[15].optional_opt_args[14].opt = poolmetadataspare_ARG; +commands[15].optional_opt_args[14].def.val_bits = val_enum_to_bit(bool_VAL); +commands[15].optional_opt_args[15].opt = readahead_ARG; +commands[15].optional_opt_args[15].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[15].optional_opt_args[16].opt = chunksize_ARG; +commands[15].optional_opt_args[16].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[15].optional_opt_args[17].opt = alloc_ARG; +commands[15].optional_opt_args[17].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[15].optional_opt_args[18].opt = background_ARG; +commands[15].optional_opt_args[19].opt = force_ARG; +commands[15].optional_opt_args[20].opt = noudevsync_ARG; +commands[15].optional_opt_args[21].opt = test_ARG; +commands[15].optional_opt_args[22].opt = usepolicies_ARG; + +commands[16].name = "lvconvert"; +commands[16].command_line_id = "lvconvert_to_thinpool"; +commands[16].command_line_enum = lvconvert_to_thinpool_CMD; +commands[16].fn = lvconvert; +commands[16].ro_count = 1; +commands[16].rp_count = 0; +commands[16].oo_count = 21; +commands[16].op_count = 0; +commands[16].desc = "DESC: Convert LV to type thin-pool (variant, use --type thin-pool)."; +commands[16].usage = "lvconvert --thinpool LV" +" [ --poolmetadata LV, --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --readahead auto|none|NumberSectors, --chunksize Number[k|unit], --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]"; +commands[16].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[16].required_opt_args[0].opt = thinpool_ARG; +commands[16].required_opt_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[16].optional_opt_args[0].opt = commandprofile_ARG; +commands[16].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[16].optional_opt_args[1].opt = config_ARG; +commands[16].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[16].optional_opt_args[2].opt = debug_ARG; +commands[16].optional_opt_args[3].opt = driverloaded_ARG; +commands[16].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[16].optional_opt_args[4].opt = help_ARG; +commands[16].optional_opt_args[5].opt = profile_ARG; +commands[16].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[16].optional_opt_args[6].opt = quiet_ARG; +commands[16].optional_opt_args[7].opt = verbose_ARG; +commands[16].optional_opt_args[8].opt = version_ARG; +commands[16].optional_opt_args[9].opt = yes_ARG; +commands[16].optional_opt_args[10].opt = poolmetadata_ARG; +commands[16].optional_opt_args[10].def.val_bits = val_enum_to_bit(lv_VAL); +commands[16].optional_opt_args[11].opt = poolmetadatasize_ARG; +commands[16].optional_opt_args[11].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[16].optional_opt_args[12].opt = poolmetadataspare_ARG; +commands[16].optional_opt_args[12].def.val_bits = val_enum_to_bit(bool_VAL); +commands[16].optional_opt_args[13].opt = readahead_ARG; +commands[16].optional_opt_args[13].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[16].optional_opt_args[14].opt = chunksize_ARG; +commands[16].optional_opt_args[14].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[16].optional_opt_args[15].opt = alloc_ARG; +commands[16].optional_opt_args[15].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[16].optional_opt_args[16].opt = background_ARG; +commands[16].optional_opt_args[17].opt = force_ARG; +commands[16].optional_opt_args[18].opt = noudevsync_ARG; +commands[16].optional_opt_args[19].opt = test_ARG; +commands[16].optional_opt_args[20].opt = usepolicies_ARG; + +commands[17].name = "lvconvert"; +commands[17].command_line_id = "lvconvert_to_cachepool"; +commands[17].command_line_enum = lvconvert_to_cachepool_CMD; +commands[17].fn = lvconvert; +commands[17].ro_count = 1; +commands[17].rp_count = 1; +commands[17].oo_count = 24; +commands[17].op_count = 0; +commands[17].desc = "DESC: Convert LV to type cache-pool."; +commands[17].usage = "lvconvert --type cache-pool LV_linear_striped_raid" +" [ --poolmetadata LV, --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --readahead auto|none|NumberSectors, --chunksize Number[k|unit], --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies, --cachemode writethrough|writeback, --cachepolicy String, --cachesettings String ]"; +commands[17].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[17].required_opt_args[0].opt = type_ARG; +commands[17].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[17].required_opt_args[0].def.str = "cache-pool"; +commands[17].required_pos_args[0].pos = 1; +commands[17].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[17].required_pos_args[0].def.lv_types = ARG_DEF_LV_LINEAR | ARG_DEF_LV_STRIPED | ARG_DEF_LV_RAID; +commands[17].optional_opt_args[0].opt = commandprofile_ARG; +commands[17].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[17].optional_opt_args[1].opt = config_ARG; +commands[17].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[17].optional_opt_args[2].opt = debug_ARG; +commands[17].optional_opt_args[3].opt = driverloaded_ARG; +commands[17].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[17].optional_opt_args[4].opt = help_ARG; +commands[17].optional_opt_args[5].opt = profile_ARG; +commands[17].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[17].optional_opt_args[6].opt = quiet_ARG; +commands[17].optional_opt_args[7].opt = verbose_ARG; +commands[17].optional_opt_args[8].opt = version_ARG; +commands[17].optional_opt_args[9].opt = yes_ARG; +commands[17].optional_opt_args[10].opt = poolmetadata_ARG; +commands[17].optional_opt_args[10].def.val_bits = val_enum_to_bit(lv_VAL); +commands[17].optional_opt_args[11].opt = poolmetadatasize_ARG; +commands[17].optional_opt_args[11].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[17].optional_opt_args[12].opt = poolmetadataspare_ARG; +commands[17].optional_opt_args[12].def.val_bits = val_enum_to_bit(bool_VAL); +commands[17].optional_opt_args[13].opt = readahead_ARG; +commands[17].optional_opt_args[13].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[17].optional_opt_args[14].opt = chunksize_ARG; +commands[17].optional_opt_args[14].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[17].optional_opt_args[15].opt = alloc_ARG; +commands[17].optional_opt_args[15].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[17].optional_opt_args[16].opt = background_ARG; +commands[17].optional_opt_args[17].opt = force_ARG; +commands[17].optional_opt_args[18].opt = noudevsync_ARG; +commands[17].optional_opt_args[19].opt = test_ARG; +commands[17].optional_opt_args[20].opt = usepolicies_ARG; +commands[17].optional_opt_args[21].opt = cachemode_ARG; +commands[17].optional_opt_args[21].def.val_bits = val_enum_to_bit(cachemode_VAL); +commands[17].optional_opt_args[22].opt = cachepolicy_ARG; +commands[17].optional_opt_args[22].def.val_bits = val_enum_to_bit(string_VAL); +commands[17].optional_opt_args[23].opt = cachesettings_ARG; +commands[17].optional_opt_args[23].def.val_bits = val_enum_to_bit(string_VAL); + +commands[18].name = "lvconvert"; +commands[18].command_line_id = "lvconvert_to_cachepool"; +commands[18].command_line_enum = lvconvert_to_cachepool_CMD; +commands[18].fn = lvconvert; +commands[18].ro_count = 1; +commands[18].rp_count = 0; +commands[18].oo_count = 25; +commands[18].op_count = 0; +commands[18].desc = "DESC: Convert LV to type cache-pool (variant, use --type cache-pool)."; +commands[18].usage = "lvconvert --cachepool LV_linear_striped_raid" +" [ --type cache-pool, --poolmetadata LV, --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --readahead auto|none|NumberSectors, --chunksize Number[k|unit], --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies, --cachemode writethrough|writeback, --cachepolicy String, --cachesettings String ]"; +commands[18].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[18].required_opt_args[0].opt = cachepool_ARG; +commands[18].required_opt_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[18].required_opt_args[0].def.lv_types = ARG_DEF_LV_LINEAR | ARG_DEF_LV_STRIPED | ARG_DEF_LV_RAID; +commands[18].optional_opt_args[0].opt = commandprofile_ARG; +commands[18].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[18].optional_opt_args[1].opt = config_ARG; +commands[18].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[18].optional_opt_args[2].opt = debug_ARG; +commands[18].optional_opt_args[3].opt = driverloaded_ARG; +commands[18].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[18].optional_opt_args[4].opt = help_ARG; +commands[18].optional_opt_args[5].opt = profile_ARG; +commands[18].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[18].optional_opt_args[6].opt = quiet_ARG; +commands[18].optional_opt_args[7].opt = verbose_ARG; +commands[18].optional_opt_args[8].opt = version_ARG; +commands[18].optional_opt_args[9].opt = yes_ARG; +commands[18].optional_opt_args[10].opt = type_ARG; +commands[18].optional_opt_args[10].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[18].optional_opt_args[10].def.str = "cache-pool"; +commands[18].optional_opt_args[11].opt = poolmetadata_ARG; +commands[18].optional_opt_args[11].def.val_bits = val_enum_to_bit(lv_VAL); +commands[18].optional_opt_args[12].opt = poolmetadatasize_ARG; +commands[18].optional_opt_args[12].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[18].optional_opt_args[13].opt = poolmetadataspare_ARG; +commands[18].optional_opt_args[13].def.val_bits = val_enum_to_bit(bool_VAL); +commands[18].optional_opt_args[14].opt = readahead_ARG; +commands[18].optional_opt_args[14].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[18].optional_opt_args[15].opt = chunksize_ARG; +commands[18].optional_opt_args[15].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[18].optional_opt_args[16].opt = alloc_ARG; +commands[18].optional_opt_args[16].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[18].optional_opt_args[17].opt = background_ARG; +commands[18].optional_opt_args[18].opt = force_ARG; +commands[18].optional_opt_args[19].opt = noudevsync_ARG; +commands[18].optional_opt_args[20].opt = test_ARG; +commands[18].optional_opt_args[21].opt = usepolicies_ARG; +commands[18].optional_opt_args[22].opt = cachemode_ARG; +commands[18].optional_opt_args[22].def.val_bits = val_enum_to_bit(cachemode_VAL); +commands[18].optional_opt_args[23].opt = cachepolicy_ARG; +commands[18].optional_opt_args[23].def.val_bits = val_enum_to_bit(string_VAL); +commands[18].optional_opt_args[24].opt = cachesettings_ARG; +commands[18].optional_opt_args[24].def.val_bits = val_enum_to_bit(string_VAL); + +commands[19].name = "lvconvert"; +commands[19].command_line_id = "lvconvert_to_mirror"; +commands[19].command_line_enum = lvconvert_to_mirror_CMD; +commands[19].fn = lvconvert; +commands[19].ro_count = 2; +commands[19].rp_count = 1; +commands[19].oo_count = 20; +commands[19].op_count = 1; +commands[19].desc = "DESC: Convert LV to type mirror, adding mirror images."; +commands[19].usage = "lvconvert --type mirror --mirrors [+|-]Number LV_linear_striped" +" [ --mirrors [+|-]Number, --stripes Number, --stripesize Number[k|unit], --regionsize Number[m|unit], --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]" +" [ PV ... ]"; +commands[19].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[19].required_opt_args[0].opt = type_ARG; +commands[19].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[19].required_opt_args[0].def.str = "mirror"; +commands[19].required_opt_args[1].opt = mirrors_ARG; +commands[19].required_opt_args[1].def.val_bits = val_enum_to_bit(numsigned_VAL); +commands[19].required_pos_args[0].pos = 1; +commands[19].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[19].required_pos_args[0].def.lv_types = ARG_DEF_LV_LINEAR | ARG_DEF_LV_STRIPED; +commands[19].optional_opt_args[0].opt = commandprofile_ARG; +commands[19].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[19].optional_opt_args[1].opt = config_ARG; +commands[19].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[19].optional_opt_args[2].opt = debug_ARG; +commands[19].optional_opt_args[3].opt = driverloaded_ARG; +commands[19].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[19].optional_opt_args[4].opt = help_ARG; +commands[19].optional_opt_args[5].opt = profile_ARG; +commands[19].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[19].optional_opt_args[6].opt = quiet_ARG; +commands[19].optional_opt_args[7].opt = verbose_ARG; +commands[19].optional_opt_args[8].opt = version_ARG; +commands[19].optional_opt_args[9].opt = yes_ARG; +commands[19].optional_opt_args[10].opt = mirrors_ARG; +commands[19].optional_opt_args[10].def.val_bits = val_enum_to_bit(numsigned_VAL); +commands[19].optional_opt_args[11].opt = stripes_long_ARG; +commands[19].optional_opt_args[11].def.val_bits = val_enum_to_bit(number_VAL); +commands[19].optional_opt_args[12].opt = stripesize_ARG; +commands[19].optional_opt_args[12].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[19].optional_opt_args[13].opt = regionsize_ARG; +commands[19].optional_opt_args[13].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[19].optional_opt_args[14].opt = alloc_ARG; +commands[19].optional_opt_args[14].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[19].optional_opt_args[15].opt = background_ARG; +commands[19].optional_opt_args[16].opt = force_ARG; +commands[19].optional_opt_args[17].opt = noudevsync_ARG; +commands[19].optional_opt_args[18].opt = test_ARG; +commands[19].optional_opt_args[19].opt = usepolicies_ARG; +commands[19].optional_pos_args[0].pos = 2; +commands[19].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[19].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[20].name = "lvconvert"; +commands[20].command_line_id = "lvconvert_to_mirror_or_raid1"; +commands[20].command_line_enum = lvconvert_to_mirror_or_raid1_CMD; +commands[20].fn = lvconvert; +commands[20].ro_count = 1; +commands[20].rp_count = 1; +commands[20].oo_count = 22; +commands[20].op_count = 1; +commands[20].desc = "DESC: Convert LV to type raid1 or mirror DESC: (variant, infers --type raid1|mirror)."; +commands[20].usage = "lvconvert --mirrors [+|-]Number LV_linear_striped" +" [ --type raid1, --type mirror, --mirrors [+|-]Number, --stripes Number, --stripesize Number[k|unit], --regionsize Number[m|unit], --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]" +" [ PV ... ]"; +commands[20].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[20].required_opt_args[0].opt = mirrors_ARG; +commands[20].required_opt_args[0].def.val_bits = val_enum_to_bit(numsigned_VAL); +commands[20].required_pos_args[0].pos = 1; +commands[20].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[20].required_pos_args[0].def.lv_types = ARG_DEF_LV_LINEAR | ARG_DEF_LV_STRIPED; +commands[20].optional_opt_args[0].opt = commandprofile_ARG; +commands[20].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[20].optional_opt_args[1].opt = config_ARG; +commands[20].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[20].optional_opt_args[2].opt = debug_ARG; +commands[20].optional_opt_args[3].opt = driverloaded_ARG; +commands[20].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[20].optional_opt_args[4].opt = help_ARG; +commands[20].optional_opt_args[5].opt = profile_ARG; +commands[20].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[20].optional_opt_args[6].opt = quiet_ARG; +commands[20].optional_opt_args[7].opt = verbose_ARG; +commands[20].optional_opt_args[8].opt = version_ARG; +commands[20].optional_opt_args[9].opt = yes_ARG; +commands[20].optional_opt_args[10].opt = type_ARG; +commands[20].optional_opt_args[10].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[20].optional_opt_args[10].def.str = "raid1"; +commands[20].optional_opt_args[11].opt = type_ARG; +commands[20].optional_opt_args[11].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[20].optional_opt_args[11].def.str = "mirror"; +commands[20].optional_opt_args[12].opt = mirrors_ARG; +commands[20].optional_opt_args[12].def.val_bits = val_enum_to_bit(numsigned_VAL); +commands[20].optional_opt_args[13].opt = stripes_long_ARG; +commands[20].optional_opt_args[13].def.val_bits = val_enum_to_bit(number_VAL); +commands[20].optional_opt_args[14].opt = stripesize_ARG; +commands[20].optional_opt_args[14].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[20].optional_opt_args[15].opt = regionsize_ARG; +commands[20].optional_opt_args[15].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[20].optional_opt_args[16].opt = alloc_ARG; +commands[20].optional_opt_args[16].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[20].optional_opt_args[17].opt = background_ARG; +commands[20].optional_opt_args[18].opt = force_ARG; +commands[20].optional_opt_args[19].opt = noudevsync_ARG; +commands[20].optional_opt_args[20].opt = test_ARG; +commands[20].optional_opt_args[21].opt = usepolicies_ARG; +commands[20].optional_pos_args[0].pos = 2; +commands[20].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[20].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[21].name = "lvconvert"; +commands[21].command_line_id = "lvconvert_raid1_to_mirror"; +commands[21].command_line_enum = lvconvert_raid1_to_mirror_CMD; +commands[21].fn = lvconvert; +commands[21].ro_count = 1; +commands[21].rp_count = 1; +commands[21].oo_count = 20; +commands[21].op_count = 0; +commands[21].desc = "DESC: Convert LV to type mirror, keeping mirror images."; +commands[21].usage = "lvconvert --type mirror LV_raid1" +" [ --mirrors [+|-]Number, --stripes Number, --stripesize Number[k|unit], --regionsize Number[m|unit], --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]"; +commands[21].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[21].required_opt_args[0].opt = type_ARG; +commands[21].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[21].required_opt_args[0].def.str = "mirror"; +commands[21].required_pos_args[0].pos = 1; +commands[21].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[21].required_pos_args[0].def.lv_types = ARG_DEF_LV_RAID1; +commands[21].optional_opt_args[0].opt = commandprofile_ARG; +commands[21].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[21].optional_opt_args[1].opt = config_ARG; +commands[21].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[21].optional_opt_args[2].opt = debug_ARG; +commands[21].optional_opt_args[3].opt = driverloaded_ARG; +commands[21].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[21].optional_opt_args[4].opt = help_ARG; +commands[21].optional_opt_args[5].opt = profile_ARG; +commands[21].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[21].optional_opt_args[6].opt = quiet_ARG; +commands[21].optional_opt_args[7].opt = verbose_ARG; +commands[21].optional_opt_args[8].opt = version_ARG; +commands[21].optional_opt_args[9].opt = yes_ARG; +commands[21].optional_opt_args[10].opt = mirrors_ARG; +commands[21].optional_opt_args[10].def.val_bits = val_enum_to_bit(numsigned_VAL); +commands[21].optional_opt_args[11].opt = stripes_long_ARG; +commands[21].optional_opt_args[11].def.val_bits = val_enum_to_bit(number_VAL); +commands[21].optional_opt_args[12].opt = stripesize_ARG; +commands[21].optional_opt_args[12].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[21].optional_opt_args[13].opt = regionsize_ARG; +commands[21].optional_opt_args[13].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[21].optional_opt_args[14].opt = alloc_ARG; +commands[21].optional_opt_args[14].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[21].optional_opt_args[15].opt = background_ARG; +commands[21].optional_opt_args[16].opt = force_ARG; +commands[21].optional_opt_args[17].opt = noudevsync_ARG; +commands[21].optional_opt_args[18].opt = test_ARG; +commands[21].optional_opt_args[19].opt = usepolicies_ARG; + +commands[22].name = "lvconvert"; +commands[22].command_line_id = "lvconvert_mirror_to_raid1"; +commands[22].command_line_enum = lvconvert_mirror_to_raid1_CMD; +commands[22].fn = lvconvert; +commands[22].ro_count = 1; +commands[22].rp_count = 1; +commands[22].oo_count = 20; +commands[22].op_count = 0; +commands[22].desc = "DESC: Convert LV to type raid1, keeping mirror images."; +commands[22].usage = "lvconvert --type raid1 LV_mirror" +" [ --mirrors [+|-]Number, --stripes Number, --stripesize Number[k|unit], --regionsize Number[m|unit], --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]"; +commands[22].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[22].required_opt_args[0].opt = type_ARG; +commands[22].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[22].required_opt_args[0].def.str = "raid1"; +commands[22].required_pos_args[0].pos = 1; +commands[22].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[22].required_pos_args[0].def.lv_types = ARG_DEF_LV_MIRROR; +commands[22].optional_opt_args[0].opt = commandprofile_ARG; +commands[22].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[22].optional_opt_args[1].opt = config_ARG; +commands[22].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[22].optional_opt_args[2].opt = debug_ARG; +commands[22].optional_opt_args[3].opt = driverloaded_ARG; +commands[22].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[22].optional_opt_args[4].opt = help_ARG; +commands[22].optional_opt_args[5].opt = profile_ARG; +commands[22].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[22].optional_opt_args[6].opt = quiet_ARG; +commands[22].optional_opt_args[7].opt = verbose_ARG; +commands[22].optional_opt_args[8].opt = version_ARG; +commands[22].optional_opt_args[9].opt = yes_ARG; +commands[22].optional_opt_args[10].opt = mirrors_ARG; +commands[22].optional_opt_args[10].def.val_bits = val_enum_to_bit(numsigned_VAL); +commands[22].optional_opt_args[11].opt = stripes_long_ARG; +commands[22].optional_opt_args[11].def.val_bits = val_enum_to_bit(number_VAL); +commands[22].optional_opt_args[12].opt = stripesize_ARG; +commands[22].optional_opt_args[12].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[22].optional_opt_args[13].opt = regionsize_ARG; +commands[22].optional_opt_args[13].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[22].optional_opt_args[14].opt = alloc_ARG; +commands[22].optional_opt_args[14].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[22].optional_opt_args[15].opt = background_ARG; +commands[22].optional_opt_args[16].opt = force_ARG; +commands[22].optional_opt_args[17].opt = noudevsync_ARG; +commands[22].optional_opt_args[18].opt = test_ARG; +commands[22].optional_opt_args[19].opt = usepolicies_ARG; + +commands[23].name = "lvconvert"; +commands[23].command_line_id = "lvconvert_general_to_raid"; +commands[23].command_line_enum = lvconvert_general_to_raid_CMD; +commands[23].fn = lvconvert; +commands[23].ro_count = 1; +commands[23].rp_count = 1; +commands[23].oo_count = 20; +commands[23].op_count = 1; +commands[23].desc = "DESC: Convert LV to type raid. DESC: Change LV raid type."; +commands[23].usage = "lvconvert --type raid LV_linear_striped_raid" +" [ --mirrors [+|-]Number, --stripes Number, --stripesize Number[k|unit], --regionsize Number[m|unit], --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]" +" [ PV ... ]"; +commands[23].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[23].required_opt_args[0].opt = type_ARG; +commands[23].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[23].required_opt_args[0].def.str = "raid"; +commands[23].required_pos_args[0].pos = 1; +commands[23].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[23].required_pos_args[0].def.lv_types = ARG_DEF_LV_LINEAR | ARG_DEF_LV_STRIPED | ARG_DEF_LV_RAID; +commands[23].optional_opt_args[0].opt = commandprofile_ARG; +commands[23].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[23].optional_opt_args[1].opt = config_ARG; +commands[23].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[23].optional_opt_args[2].opt = debug_ARG; +commands[23].optional_opt_args[3].opt = driverloaded_ARG; +commands[23].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[23].optional_opt_args[4].opt = help_ARG; +commands[23].optional_opt_args[5].opt = profile_ARG; +commands[23].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[23].optional_opt_args[6].opt = quiet_ARG; +commands[23].optional_opt_args[7].opt = verbose_ARG; +commands[23].optional_opt_args[8].opt = version_ARG; +commands[23].optional_opt_args[9].opt = yes_ARG; +commands[23].optional_opt_args[10].opt = mirrors_ARG; +commands[23].optional_opt_args[10].def.val_bits = val_enum_to_bit(numsigned_VAL); +commands[23].optional_opt_args[11].opt = stripes_long_ARG; +commands[23].optional_opt_args[11].def.val_bits = val_enum_to_bit(number_VAL); +commands[23].optional_opt_args[12].opt = stripesize_ARG; +commands[23].optional_opt_args[12].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[23].optional_opt_args[13].opt = regionsize_ARG; +commands[23].optional_opt_args[13].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[23].optional_opt_args[14].opt = alloc_ARG; +commands[23].optional_opt_args[14].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[23].optional_opt_args[15].opt = background_ARG; +commands[23].optional_opt_args[16].opt = force_ARG; +commands[23].optional_opt_args[17].opt = noudevsync_ARG; +commands[23].optional_opt_args[18].opt = test_ARG; +commands[23].optional_opt_args[19].opt = usepolicies_ARG; +commands[23].optional_pos_args[0].pos = 2; +commands[23].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[23].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[24].name = "lvconvert"; +commands[24].command_line_id = "lvconvert_change_mirror_images"; +commands[24].command_line_enum = lvconvert_change_mirror_images_CMD; +commands[24].fn = lvconvert; +commands[24].ro_count = 1; +commands[24].rp_count = 1; +commands[24].oo_count = 16; +commands[24].op_count = 1; +commands[24].desc = "DESC: Change the number of mirror images in the LV."; +commands[24].usage = "lvconvert --mirrors [+|-]Number LV_mirror_raid" +" [ --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]" +" [ PV ... ]"; +commands[24].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[24].required_opt_args[0].opt = mirrors_ARG; +commands[24].required_opt_args[0].def.val_bits = val_enum_to_bit(numsigned_VAL); +commands[24].required_pos_args[0].pos = 1; +commands[24].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[24].required_pos_args[0].def.lv_types = ARG_DEF_LV_MIRROR | ARG_DEF_LV_RAID; +commands[24].optional_opt_args[0].opt = commandprofile_ARG; +commands[24].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[24].optional_opt_args[1].opt = config_ARG; +commands[24].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[24].optional_opt_args[2].opt = debug_ARG; +commands[24].optional_opt_args[3].opt = driverloaded_ARG; +commands[24].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[24].optional_opt_args[4].opt = help_ARG; +commands[24].optional_opt_args[5].opt = profile_ARG; +commands[24].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[24].optional_opt_args[6].opt = quiet_ARG; +commands[24].optional_opt_args[7].opt = verbose_ARG; +commands[24].optional_opt_args[8].opt = version_ARG; +commands[24].optional_opt_args[9].opt = yes_ARG; +commands[24].optional_opt_args[10].opt = alloc_ARG; +commands[24].optional_opt_args[10].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[24].optional_opt_args[11].opt = background_ARG; +commands[24].optional_opt_args[12].opt = force_ARG; +commands[24].optional_opt_args[13].opt = noudevsync_ARG; +commands[24].optional_opt_args[14].opt = test_ARG; +commands[24].optional_opt_args[15].opt = usepolicies_ARG; +commands[24].optional_pos_args[0].pos = 2; +commands[24].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[24].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[25].name = "lvconvert"; +commands[25].command_line_id = "lvconvert_raid_to_striped"; +commands[25].command_line_enum = lvconvert_raid_to_striped_CMD; +commands[25].fn = lvconvert; +commands[25].ro_count = 1; +commands[25].rp_count = 1; +commands[25].oo_count = 20; +commands[25].op_count = 1; +commands[25].desc = "DESC: Convert LV to type striped."; +commands[25].usage = "lvconvert --type striped LV_raid" +" [ --mirrors [+|-]Number, --stripes Number, --stripesize Number[k|unit], --regionsize Number[m|unit], --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]" +" [ PV ... ]"; +commands[25].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[25].required_opt_args[0].opt = type_ARG; +commands[25].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[25].required_opt_args[0].def.str = "striped"; +commands[25].required_pos_args[0].pos = 1; +commands[25].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[25].required_pos_args[0].def.lv_types = ARG_DEF_LV_RAID; +commands[25].optional_opt_args[0].opt = commandprofile_ARG; +commands[25].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[25].optional_opt_args[1].opt = config_ARG; +commands[25].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[25].optional_opt_args[2].opt = debug_ARG; +commands[25].optional_opt_args[3].opt = driverloaded_ARG; +commands[25].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[25].optional_opt_args[4].opt = help_ARG; +commands[25].optional_opt_args[5].opt = profile_ARG; +commands[25].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[25].optional_opt_args[6].opt = quiet_ARG; +commands[25].optional_opt_args[7].opt = verbose_ARG; +commands[25].optional_opt_args[8].opt = version_ARG; +commands[25].optional_opt_args[9].opt = yes_ARG; +commands[25].optional_opt_args[10].opt = mirrors_ARG; +commands[25].optional_opt_args[10].def.val_bits = val_enum_to_bit(numsigned_VAL); +commands[25].optional_opt_args[11].opt = stripes_long_ARG; +commands[25].optional_opt_args[11].def.val_bits = val_enum_to_bit(number_VAL); +commands[25].optional_opt_args[12].opt = stripesize_ARG; +commands[25].optional_opt_args[12].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[25].optional_opt_args[13].opt = regionsize_ARG; +commands[25].optional_opt_args[13].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[25].optional_opt_args[14].opt = alloc_ARG; +commands[25].optional_opt_args[14].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[25].optional_opt_args[15].opt = background_ARG; +commands[25].optional_opt_args[16].opt = force_ARG; +commands[25].optional_opt_args[17].opt = noudevsync_ARG; +commands[25].optional_opt_args[18].opt = test_ARG; +commands[25].optional_opt_args[19].opt = usepolicies_ARG; +commands[25].optional_pos_args[0].pos = 2; +commands[25].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[25].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[26].name = "lvconvert"; +commands[26].command_line_id = "lvconvert_raid_or_mirror_to_linear"; +commands[26].command_line_enum = lvconvert_raid_or_mirror_to_linear_CMD; +commands[26].fn = lvconvert; +commands[26].ro_count = 1; +commands[26].rp_count = 1; +commands[26].oo_count = 16; +commands[26].op_count = 0; +commands[26].desc = "DESC: Convert LV to type linear."; +commands[26].usage = "lvconvert --type linear LV_mirror_raid" +" [ --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]"; +commands[26].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[26].required_opt_args[0].opt = type_ARG; +commands[26].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[26].required_opt_args[0].def.str = "linear"; +commands[26].required_pos_args[0].pos = 1; +commands[26].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[26].required_pos_args[0].def.lv_types = ARG_DEF_LV_MIRROR | ARG_DEF_LV_RAID; +commands[26].optional_opt_args[0].opt = commandprofile_ARG; +commands[26].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[26].optional_opt_args[1].opt = config_ARG; +commands[26].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[26].optional_opt_args[2].opt = debug_ARG; +commands[26].optional_opt_args[3].opt = driverloaded_ARG; +commands[26].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[26].optional_opt_args[4].opt = help_ARG; +commands[26].optional_opt_args[5].opt = profile_ARG; +commands[26].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[26].optional_opt_args[6].opt = quiet_ARG; +commands[26].optional_opt_args[7].opt = verbose_ARG; +commands[26].optional_opt_args[8].opt = version_ARG; +commands[26].optional_opt_args[9].opt = yes_ARG; +commands[26].optional_opt_args[10].opt = alloc_ARG; +commands[26].optional_opt_args[10].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[26].optional_opt_args[11].opt = background_ARG; +commands[26].optional_opt_args[12].opt = force_ARG; +commands[26].optional_opt_args[13].opt = noudevsync_ARG; +commands[26].optional_opt_args[14].opt = test_ARG; +commands[26].optional_opt_args[15].opt = usepolicies_ARG; + +commands[27].name = "lvconvert"; +commands[27].command_line_id = "lvconvert_split_mirror_images_to_new"; +commands[27].command_line_enum = lvconvert_split_mirror_images_to_new_CMD; +commands[27].fn = lvconvert; +commands[27].ro_count = 2; +commands[27].rp_count = 1; +commands[27].oo_count = 16; +commands[27].op_count = 0; +commands[27].desc = "DESC: Split images from a raid1 or mirror LV and use them to create a new LV."; +commands[27].usage = "lvconvert --splitmirrors Number --name LV_new LV_mirror_raid1_cache" +" [ --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]"; +commands[27].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[27].required_opt_args[0].opt = splitmirrors_ARG; +commands[27].required_opt_args[0].def.val_bits = val_enum_to_bit(number_VAL); +commands[27].required_opt_args[1].opt = name_ARG; +commands[27].required_opt_args[1].def.val_bits = val_enum_to_bit(lv_VAL); +commands[27].required_opt_args[1].def.flags = ARG_DEF_FLAG_NEW; +commands[27].required_pos_args[0].pos = 1; +commands[27].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[27].required_pos_args[0].def.lv_types = ARG_DEF_LV_MIRROR | ARG_DEF_LV_RAID1 | ARG_DEF_LV_CACHE; +commands[27].optional_opt_args[0].opt = commandprofile_ARG; +commands[27].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[27].optional_opt_args[1].opt = config_ARG; +commands[27].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[27].optional_opt_args[2].opt = debug_ARG; +commands[27].optional_opt_args[3].opt = driverloaded_ARG; +commands[27].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[27].optional_opt_args[4].opt = help_ARG; +commands[27].optional_opt_args[5].opt = profile_ARG; +commands[27].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[27].optional_opt_args[6].opt = quiet_ARG; +commands[27].optional_opt_args[7].opt = verbose_ARG; +commands[27].optional_opt_args[8].opt = version_ARG; +commands[27].optional_opt_args[9].opt = yes_ARG; +commands[27].optional_opt_args[10].opt = alloc_ARG; +commands[27].optional_opt_args[10].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[27].optional_opt_args[11].opt = background_ARG; +commands[27].optional_opt_args[12].opt = force_ARG; +commands[27].optional_opt_args[13].opt = noudevsync_ARG; +commands[27].optional_opt_args[14].opt = test_ARG; +commands[27].optional_opt_args[15].opt = usepolicies_ARG; + +commands[28].name = "lvconvert"; +commands[28].command_line_id = "lvconvert_split_mirror_images_and_track"; +commands[28].command_line_enum = lvconvert_split_mirror_images_and_track_CMD; +commands[28].fn = lvconvert; +commands[28].ro_count = 2; +commands[28].rp_count = 1; +commands[28].oo_count = 16; +commands[28].op_count = 0; +commands[28].desc = "DESC: Split images from a raid1 LV and track changes to origin."; +commands[28].usage = "lvconvert --splitmirrors Number --trackchanges LV_raid1_cache" +" [ --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]"; +commands[28].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[28].required_opt_args[0].opt = splitmirrors_ARG; +commands[28].required_opt_args[0].def.val_bits = val_enum_to_bit(number_VAL); +commands[28].required_opt_args[1].opt = trackchanges_ARG; +commands[28].required_pos_args[0].pos = 1; +commands[28].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[28].required_pos_args[0].def.lv_types = ARG_DEF_LV_RAID1 | ARG_DEF_LV_CACHE; +commands[28].optional_opt_args[0].opt = commandprofile_ARG; +commands[28].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[28].optional_opt_args[1].opt = config_ARG; +commands[28].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[28].optional_opt_args[2].opt = debug_ARG; +commands[28].optional_opt_args[3].opt = driverloaded_ARG; +commands[28].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[28].optional_opt_args[4].opt = help_ARG; +commands[28].optional_opt_args[5].opt = profile_ARG; +commands[28].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[28].optional_opt_args[6].opt = quiet_ARG; +commands[28].optional_opt_args[7].opt = verbose_ARG; +commands[28].optional_opt_args[8].opt = version_ARG; +commands[28].optional_opt_args[9].opt = yes_ARG; +commands[28].optional_opt_args[10].opt = alloc_ARG; +commands[28].optional_opt_args[10].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[28].optional_opt_args[11].opt = background_ARG; +commands[28].optional_opt_args[12].opt = force_ARG; +commands[28].optional_opt_args[13].opt = noudevsync_ARG; +commands[28].optional_opt_args[14].opt = test_ARG; +commands[28].optional_opt_args[15].opt = usepolicies_ARG; + +commands[29].name = "lvconvert"; +commands[29].command_line_id = "lvconvert_repair_pvs_or_thinpool"; +commands[29].command_line_enum = lvconvert_repair_pvs_or_thinpool_CMD; +commands[29].fn = lvconvert; +commands[29].ro_count = 1; +commands[29].rp_count = 1; +commands[29].oo_count = 16; +commands[29].op_count = 0; +commands[29].desc = "DESC: Replace failed PVs in a raid or mirror LV. DESC: Repair a thin pool."; +commands[29].usage = "lvconvert --repair LV_mirror_raid_thinpool" +" [ --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]"; +commands[29].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[29].required_opt_args[0].opt = repair_ARG; +commands[29].required_pos_args[0].pos = 1; +commands[29].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[29].required_pos_args[0].def.lv_types = ARG_DEF_LV_MIRROR | ARG_DEF_LV_RAID | ARG_DEF_LV_THINPOOL; +commands[29].optional_opt_args[0].opt = commandprofile_ARG; +commands[29].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[29].optional_opt_args[1].opt = config_ARG; +commands[29].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[29].optional_opt_args[2].opt = debug_ARG; +commands[29].optional_opt_args[3].opt = driverloaded_ARG; +commands[29].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[29].optional_opt_args[4].opt = help_ARG; +commands[29].optional_opt_args[5].opt = profile_ARG; +commands[29].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[29].optional_opt_args[6].opt = quiet_ARG; +commands[29].optional_opt_args[7].opt = verbose_ARG; +commands[29].optional_opt_args[8].opt = version_ARG; +commands[29].optional_opt_args[9].opt = yes_ARG; +commands[29].optional_opt_args[10].opt = alloc_ARG; +commands[29].optional_opt_args[10].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[29].optional_opt_args[11].opt = background_ARG; +commands[29].optional_opt_args[12].opt = force_ARG; +commands[29].optional_opt_args[13].opt = noudevsync_ARG; +commands[29].optional_opt_args[14].opt = test_ARG; +commands[29].optional_opt_args[15].opt = usepolicies_ARG; + +commands[30].name = "lvconvert"; +commands[30].command_line_id = "lvconvert_replace_pv"; +commands[30].command_line_enum = lvconvert_replace_pv_CMD; +commands[30].fn = lvconvert; +commands[30].ro_count = 1; +commands[30].rp_count = 1; +commands[30].oo_count = 16; +commands[30].op_count = 1; +commands[30].desc = "DESC: Replace specific PV(s) in a raid* LV with another PV."; +commands[30].usage = "lvconvert --replace PV LV_raid" +" [ --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]" +" [ PV ... ]"; +commands[30].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[30].required_opt_args[0].opt = replace_ARG; +commands[30].required_opt_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[30].required_pos_args[0].pos = 1; +commands[30].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[30].required_pos_args[0].def.lv_types = ARG_DEF_LV_RAID; +commands[30].optional_opt_args[0].opt = commandprofile_ARG; +commands[30].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[30].optional_opt_args[1].opt = config_ARG; +commands[30].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[30].optional_opt_args[2].opt = debug_ARG; +commands[30].optional_opt_args[3].opt = driverloaded_ARG; +commands[30].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[30].optional_opt_args[4].opt = help_ARG; +commands[30].optional_opt_args[5].opt = profile_ARG; +commands[30].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[30].optional_opt_args[6].opt = quiet_ARG; +commands[30].optional_opt_args[7].opt = verbose_ARG; +commands[30].optional_opt_args[8].opt = version_ARG; +commands[30].optional_opt_args[9].opt = yes_ARG; +commands[30].optional_opt_args[10].opt = alloc_ARG; +commands[30].optional_opt_args[10].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[30].optional_opt_args[11].opt = background_ARG; +commands[30].optional_opt_args[12].opt = force_ARG; +commands[30].optional_opt_args[13].opt = noudevsync_ARG; +commands[30].optional_opt_args[14].opt = test_ARG; +commands[30].optional_opt_args[15].opt = usepolicies_ARG; +commands[30].optional_pos_args[0].pos = 2; +commands[30].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[30].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[31].name = "lvconvert"; +commands[31].command_line_id = "lvconvert_change_mirrorlog"; +commands[31].command_line_enum = lvconvert_change_mirrorlog_CMD; +commands[31].fn = lvconvert; +commands[31].ro_count = 1; +commands[31].rp_count = 1; +commands[31].oo_count = 16; +commands[31].op_count = 0; +commands[31].desc = "DESC: Change the type of log used by LV."; +commands[31].usage = "lvconvert --mirrorlog core|disk LV_mirror" +" [ --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]"; +commands[31].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[31].required_opt_args[0].opt = mirrorlog_ARG; +commands[31].required_opt_args[0].def.val_bits = val_enum_to_bit(mirrorlog_VAL); +commands[31].required_pos_args[0].pos = 1; +commands[31].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[31].required_pos_args[0].def.lv_types = ARG_DEF_LV_MIRROR; +commands[31].optional_opt_args[0].opt = commandprofile_ARG; +commands[31].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[31].optional_opt_args[1].opt = config_ARG; +commands[31].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[31].optional_opt_args[2].opt = debug_ARG; +commands[31].optional_opt_args[3].opt = driverloaded_ARG; +commands[31].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[31].optional_opt_args[4].opt = help_ARG; +commands[31].optional_opt_args[5].opt = profile_ARG; +commands[31].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[31].optional_opt_args[6].opt = quiet_ARG; +commands[31].optional_opt_args[7].opt = verbose_ARG; +commands[31].optional_opt_args[8].opt = version_ARG; +commands[31].optional_opt_args[9].opt = yes_ARG; +commands[31].optional_opt_args[10].opt = alloc_ARG; +commands[31].optional_opt_args[10].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[31].optional_opt_args[11].opt = background_ARG; +commands[31].optional_opt_args[12].opt = force_ARG; +commands[31].optional_opt_args[13].opt = noudevsync_ARG; +commands[31].optional_opt_args[14].opt = test_ARG; +commands[31].optional_opt_args[15].opt = usepolicies_ARG; + +commands[32].name = "lvconvert"; +commands[32].command_line_id = "lvconvert_split_and_keep_cachepool"; +commands[32].command_line_enum = lvconvert_split_and_keep_cachepool_CMD; +commands[32].fn = lvconvert; +commands[32].ro_count = 1; +commands[32].rp_count = 1; +commands[32].oo_count = 16; +commands[32].op_count = 0; +commands[32].desc = "DESC: Separate and preserve a cache pool from a cache LV."; +commands[32].usage = "lvconvert --splitcache LV_thinpool_cache_cachepool" +" [ --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]"; +commands[32].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[32].required_opt_args[0].opt = splitcache_ARG; +commands[32].required_pos_args[0].pos = 1; +commands[32].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[32].required_pos_args[0].def.lv_types = ARG_DEF_LV_THINPOOL | ARG_DEF_LV_CACHE | ARG_DEF_LV_CACHEPOOL; +commands[32].optional_opt_args[0].opt = commandprofile_ARG; +commands[32].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[32].optional_opt_args[1].opt = config_ARG; +commands[32].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[32].optional_opt_args[2].opt = debug_ARG; +commands[32].optional_opt_args[3].opt = driverloaded_ARG; +commands[32].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[32].optional_opt_args[4].opt = help_ARG; +commands[32].optional_opt_args[5].opt = profile_ARG; +commands[32].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[32].optional_opt_args[6].opt = quiet_ARG; +commands[32].optional_opt_args[7].opt = verbose_ARG; +commands[32].optional_opt_args[8].opt = version_ARG; +commands[32].optional_opt_args[9].opt = yes_ARG; +commands[32].optional_opt_args[10].opt = alloc_ARG; +commands[32].optional_opt_args[10].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[32].optional_opt_args[11].opt = background_ARG; +commands[32].optional_opt_args[12].opt = force_ARG; +commands[32].optional_opt_args[13].opt = noudevsync_ARG; +commands[32].optional_opt_args[14].opt = test_ARG; +commands[32].optional_opt_args[15].opt = usepolicies_ARG; + +commands[33].name = "lvconvert"; +commands[33].command_line_id = "lvconvert_split_and_delete_cachepool"; +commands[33].command_line_enum = lvconvert_split_and_delete_cachepool_CMD; +commands[33].fn = lvconvert; +commands[33].ro_count = 1; +commands[33].rp_count = 1; +commands[33].oo_count = 16; +commands[33].op_count = 0; +commands[33].desc = "DESC: Separate and remove a cache pool from a cache LV."; +commands[33].usage = "lvconvert --uncache LV_thinpool_cache" +" [ --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]"; +commands[33].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[33].required_opt_args[0].opt = uncache_ARG; +commands[33].required_pos_args[0].pos = 1; +commands[33].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[33].required_pos_args[0].def.lv_types = ARG_DEF_LV_THINPOOL | ARG_DEF_LV_CACHE; +commands[33].optional_opt_args[0].opt = commandprofile_ARG; +commands[33].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[33].optional_opt_args[1].opt = config_ARG; +commands[33].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[33].optional_opt_args[2].opt = debug_ARG; +commands[33].optional_opt_args[3].opt = driverloaded_ARG; +commands[33].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[33].optional_opt_args[4].opt = help_ARG; +commands[33].optional_opt_args[5].opt = profile_ARG; +commands[33].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[33].optional_opt_args[6].opt = quiet_ARG; +commands[33].optional_opt_args[7].opt = verbose_ARG; +commands[33].optional_opt_args[8].opt = version_ARG; +commands[33].optional_opt_args[9].opt = yes_ARG; +commands[33].optional_opt_args[10].opt = alloc_ARG; +commands[33].optional_opt_args[10].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[33].optional_opt_args[11].opt = background_ARG; +commands[33].optional_opt_args[12].opt = force_ARG; +commands[33].optional_opt_args[13].opt = noudevsync_ARG; +commands[33].optional_opt_args[14].opt = test_ARG; +commands[33].optional_opt_args[15].opt = usepolicies_ARG; + +commands[34].name = "lvconvert"; +commands[34].command_line_id = "lvconvert_split_cow_snapshot"; +commands[34].command_line_enum = lvconvert_split_cow_snapshot_CMD; +commands[34].fn = lvconvert; +commands[34].ro_count = 1; +commands[34].rp_count = 1; +commands[34].oo_count = 16; +commands[34].op_count = 0; +commands[34].desc = "DESC: Separate a COW snapshot from its origin LV."; +commands[34].usage = "lvconvert --splitsnapshot LV_snapshot" +" [ --alloc contiguous|cling|normal|anywhere|inherit, --background, --usepolicies ]"; +commands[34].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[34].required_opt_args[0].opt = splitsnapshot_ARG; +commands[34].required_pos_args[0].pos = 1; +commands[34].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[34].required_pos_args[0].def.lv_types = ARG_DEF_LV_SNAPSHOT; +commands[34].optional_opt_args[0].opt = commandprofile_ARG; +commands[34].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[34].optional_opt_args[1].opt = config_ARG; +commands[34].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[34].optional_opt_args[2].opt = debug_ARG; +commands[34].optional_opt_args[3].opt = driverloaded_ARG; +commands[34].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[34].optional_opt_args[4].opt = help_ARG; +commands[34].optional_opt_args[5].opt = profile_ARG; +commands[34].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[34].optional_opt_args[6].opt = quiet_ARG; +commands[34].optional_opt_args[7].opt = verbose_ARG; +commands[34].optional_opt_args[8].opt = version_ARG; +commands[34].optional_opt_args[9].opt = yes_ARG; +commands[34].optional_opt_args[10].opt = alloc_ARG; +commands[34].optional_opt_args[10].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[34].optional_opt_args[11].opt = background_ARG; +commands[34].optional_opt_args[12].opt = force_ARG; +commands[34].optional_opt_args[13].opt = noudevsync_ARG; +commands[34].optional_opt_args[14].opt = test_ARG; +commands[34].optional_opt_args[15].opt = usepolicies_ARG; + +commands[35].name = "lvconvert"; +commands[35].command_line_id = "lvconvert_poll_mirror"; +commands[35].command_line_enum = lvconvert_poll_mirror_CMD; +commands[35].fn = lvconvert; +commands[35].ro_count = 0; +commands[35].rp_count = 1; +commands[35].oo_count = 10; +commands[35].op_count = 0; +commands[35].desc = "DESC: Poll LV to collapse resync layers."; +commands[35].usage = "lvconvert LV_mirror"; +commands[35].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[35].required_pos_args[0].pos = 1; +commands[35].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[35].required_pos_args[0].def.lv_types = ARG_DEF_LV_MIRROR; +commands[35].optional_opt_args[0].opt = commandprofile_ARG; +commands[35].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[35].optional_opt_args[1].opt = config_ARG; +commands[35].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[35].optional_opt_args[2].opt = debug_ARG; +commands[35].optional_opt_args[3].opt = driverloaded_ARG; +commands[35].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[35].optional_opt_args[4].opt = help_ARG; +commands[35].optional_opt_args[5].opt = profile_ARG; +commands[35].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[35].optional_opt_args[6].opt = quiet_ARG; +commands[35].optional_opt_args[7].opt = verbose_ARG; +commands[35].optional_opt_args[8].opt = version_ARG; +commands[35].optional_opt_args[9].opt = yes_ARG; + +commands[36].name = "lvconvert"; +commands[36].command_line_id = "lvconvert_swap_pool_metadata"; +commands[36].command_line_enum = lvconvert_swap_pool_metadata_CMD; +commands[36].fn = lvconvert; +commands[36].ro_count = 1; +commands[36].rp_count = 1; +commands[36].oo_count = 10; +commands[36].op_count = 0; +commands[36].desc = "DESC: Swap metadata LV in a thin pool or cache pool (temporary command)."; +commands[36].usage = "lvconvert --poolmetadata LV LV_thinpool_cachepool"; +commands[36].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[36].required_opt_args[0].opt = poolmetadata_ARG; +commands[36].required_opt_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[36].required_pos_args[0].pos = 1; +commands[36].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[36].required_pos_args[0].def.lv_types = ARG_DEF_LV_THINPOOL | ARG_DEF_LV_CACHEPOOL; +commands[36].optional_opt_args[0].opt = commandprofile_ARG; +commands[36].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[36].optional_opt_args[1].opt = config_ARG; +commands[36].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[36].optional_opt_args[2].opt = debug_ARG; +commands[36].optional_opt_args[3].opt = driverloaded_ARG; +commands[36].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[36].optional_opt_args[4].opt = help_ARG; +commands[36].optional_opt_args[5].opt = profile_ARG; +commands[36].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[36].optional_opt_args[6].opt = quiet_ARG; +commands[36].optional_opt_args[7].opt = verbose_ARG; +commands[36].optional_opt_args[8].opt = version_ARG; +commands[36].optional_opt_args[9].opt = yes_ARG; + +commands[37].name = "lvcreate"; +commands[37].command_line_id = "lvcreate_error_vol"; +commands[37].command_line_enum = lvcreate_error_vol_CMD; +commands[37].fn = lvcreate; +commands[37].ro_count = 2; +commands[37].rp_count = 1; +commands[37].oo_count = 32; +commands[37].op_count = 0; +commands[37].desc = "DESC: Create an LV that returns errors when used."; +commands[37].usage = "lvcreate --type error --size Number[m|unit] VG" +" [ --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]"; +commands[37].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[37].required_opt_args[0].opt = type_ARG; +commands[37].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[37].required_opt_args[0].def.str = "error"; +commands[37].required_opt_args[1].opt = size_ARG; +commands[37].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[37].required_pos_args[0].pos = 1; +commands[37].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[37].optional_opt_args[0].opt = commandprofile_ARG; +commands[37].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[37].optional_opt_args[1].opt = config_ARG; +commands[37].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[37].optional_opt_args[2].opt = debug_ARG; +commands[37].optional_opt_args[3].opt = driverloaded_ARG; +commands[37].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[37].optional_opt_args[4].opt = help_ARG; +commands[37].optional_opt_args[5].opt = profile_ARG; +commands[37].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[37].optional_opt_args[6].opt = quiet_ARG; +commands[37].optional_opt_args[7].opt = verbose_ARG; +commands[37].optional_opt_args[8].opt = version_ARG; +commands[37].optional_opt_args[9].opt = yes_ARG; +commands[37].optional_opt_args[10].opt = addtag_ARG; +commands[37].optional_opt_args[10].def.val_bits = val_enum_to_bit(tag_VAL); +commands[37].optional_opt_args[11].opt = alloc_ARG; +commands[37].optional_opt_args[11].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[37].optional_opt_args[12].opt = autobackup_ARG; +commands[37].optional_opt_args[12].def.val_bits = val_enum_to_bit(bool_VAL); +commands[37].optional_opt_args[13].opt = activate_ARG; +commands[37].optional_opt_args[13].def.val_bits = val_enum_to_bit(activation_VAL); +commands[37].optional_opt_args[14].opt = contiguous_ARG; +commands[37].optional_opt_args[14].def.val_bits = val_enum_to_bit(bool_VAL); +commands[37].optional_opt_args[15].opt = ignoreactivationskip_ARG; +commands[37].optional_opt_args[16].opt = ignoremonitoring_ARG; +commands[37].optional_opt_args[17].opt = major_ARG; +commands[37].optional_opt_args[17].def.val_bits = val_enum_to_bit(number_VAL); +commands[37].optional_opt_args[18].opt = metadataprofile_ARG; +commands[37].optional_opt_args[18].def.val_bits = val_enum_to_bit(string_VAL); +commands[37].optional_opt_args[19].opt = minor_ARG; +commands[37].optional_opt_args[19].def.val_bits = val_enum_to_bit(number_VAL); +commands[37].optional_opt_args[20].opt = monitor_ARG; +commands[37].optional_opt_args[20].def.val_bits = val_enum_to_bit(bool_VAL); +commands[37].optional_opt_args[21].opt = name_ARG; +commands[37].optional_opt_args[21].def.val_bits = val_enum_to_bit(string_VAL); +commands[37].optional_opt_args[22].opt = nosync_ARG; +commands[37].optional_opt_args[23].opt = noudevsync_ARG; +commands[37].optional_opt_args[24].opt = permission_ARG; +commands[37].optional_opt_args[24].def.val_bits = val_enum_to_bit(permission_VAL); +commands[37].optional_opt_args[25].opt = persistent_ARG; +commands[37].optional_opt_args[25].def.val_bits = val_enum_to_bit(bool_VAL); +commands[37].optional_opt_args[26].opt = readahead_ARG; +commands[37].optional_opt_args[26].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[37].optional_opt_args[27].opt = reportformat_ARG; +commands[37].optional_opt_args[27].def.val_bits = val_enum_to_bit(string_VAL); +commands[37].optional_opt_args[28].opt = setactivationskip_ARG; +commands[37].optional_opt_args[28].def.val_bits = val_enum_to_bit(bool_VAL); +commands[37].optional_opt_args[29].opt = test_ARG; +commands[37].optional_opt_args[30].opt = wipesignatures_ARG; +commands[37].optional_opt_args[30].def.val_bits = val_enum_to_bit(bool_VAL); +commands[37].optional_opt_args[31].opt = zero_ARG; +commands[37].optional_opt_args[31].def.val_bits = val_enum_to_bit(bool_VAL); + +commands[38].name = "lvcreate"; +commands[38].command_line_id = "lvcreate_zero_vol"; +commands[38].command_line_enum = lvcreate_zero_vol_CMD; +commands[38].fn = lvcreate; +commands[38].ro_count = 2; +commands[38].rp_count = 1; +commands[38].oo_count = 32; +commands[38].op_count = 0; +commands[38].desc = "DESC: Create an LV that returns zeros when read."; +commands[38].usage = "lvcreate --type zero --size Number[m|unit] VG" +" [ --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]"; +commands[38].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[38].required_opt_args[0].opt = type_ARG; +commands[38].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[38].required_opt_args[0].def.str = "zero"; +commands[38].required_opt_args[1].opt = size_ARG; +commands[38].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[38].required_pos_args[0].pos = 1; +commands[38].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[38].optional_opt_args[0].opt = commandprofile_ARG; +commands[38].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[38].optional_opt_args[1].opt = config_ARG; +commands[38].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[38].optional_opt_args[2].opt = debug_ARG; +commands[38].optional_opt_args[3].opt = driverloaded_ARG; +commands[38].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[38].optional_opt_args[4].opt = help_ARG; +commands[38].optional_opt_args[5].opt = profile_ARG; +commands[38].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[38].optional_opt_args[6].opt = quiet_ARG; +commands[38].optional_opt_args[7].opt = verbose_ARG; +commands[38].optional_opt_args[8].opt = version_ARG; +commands[38].optional_opt_args[9].opt = yes_ARG; +commands[38].optional_opt_args[10].opt = addtag_ARG; +commands[38].optional_opt_args[10].def.val_bits = val_enum_to_bit(tag_VAL); +commands[38].optional_opt_args[11].opt = alloc_ARG; +commands[38].optional_opt_args[11].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[38].optional_opt_args[12].opt = autobackup_ARG; +commands[38].optional_opt_args[12].def.val_bits = val_enum_to_bit(bool_VAL); +commands[38].optional_opt_args[13].opt = activate_ARG; +commands[38].optional_opt_args[13].def.val_bits = val_enum_to_bit(activation_VAL); +commands[38].optional_opt_args[14].opt = contiguous_ARG; +commands[38].optional_opt_args[14].def.val_bits = val_enum_to_bit(bool_VAL); +commands[38].optional_opt_args[15].opt = ignoreactivationskip_ARG; +commands[38].optional_opt_args[16].opt = ignoremonitoring_ARG; +commands[38].optional_opt_args[17].opt = major_ARG; +commands[38].optional_opt_args[17].def.val_bits = val_enum_to_bit(number_VAL); +commands[38].optional_opt_args[18].opt = metadataprofile_ARG; +commands[38].optional_opt_args[18].def.val_bits = val_enum_to_bit(string_VAL); +commands[38].optional_opt_args[19].opt = minor_ARG; +commands[38].optional_opt_args[19].def.val_bits = val_enum_to_bit(number_VAL); +commands[38].optional_opt_args[20].opt = monitor_ARG; +commands[38].optional_opt_args[20].def.val_bits = val_enum_to_bit(bool_VAL); +commands[38].optional_opt_args[21].opt = name_ARG; +commands[38].optional_opt_args[21].def.val_bits = val_enum_to_bit(string_VAL); +commands[38].optional_opt_args[22].opt = nosync_ARG; +commands[38].optional_opt_args[23].opt = noudevsync_ARG; +commands[38].optional_opt_args[24].opt = permission_ARG; +commands[38].optional_opt_args[24].def.val_bits = val_enum_to_bit(permission_VAL); +commands[38].optional_opt_args[25].opt = persistent_ARG; +commands[38].optional_opt_args[25].def.val_bits = val_enum_to_bit(bool_VAL); +commands[38].optional_opt_args[26].opt = readahead_ARG; +commands[38].optional_opt_args[26].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[38].optional_opt_args[27].opt = reportformat_ARG; +commands[38].optional_opt_args[27].def.val_bits = val_enum_to_bit(string_VAL); +commands[38].optional_opt_args[28].opt = setactivationskip_ARG; +commands[38].optional_opt_args[28].def.val_bits = val_enum_to_bit(bool_VAL); +commands[38].optional_opt_args[29].opt = test_ARG; +commands[38].optional_opt_args[30].opt = wipesignatures_ARG; +commands[38].optional_opt_args[30].def.val_bits = val_enum_to_bit(bool_VAL); +commands[38].optional_opt_args[31].opt = zero_ARG; +commands[38].optional_opt_args[31].def.val_bits = val_enum_to_bit(bool_VAL); + +commands[39].name = "lvcreate"; +commands[39].command_line_id = "lvcreate_linear"; +commands[39].command_line_enum = lvcreate_linear_CMD; +commands[39].fn = lvcreate; +commands[39].ro_count = 2; +commands[39].rp_count = 1; +commands[39].oo_count = 32; +commands[39].op_count = 1; +commands[39].desc = "DESC: Create a linear LV."; +commands[39].usage = "lvcreate --type linear --size Number[m|unit] VG" +" [ --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[39].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[39].required_opt_args[0].opt = type_ARG; +commands[39].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[39].required_opt_args[0].def.str = "linear"; +commands[39].required_opt_args[1].opt = size_ARG; +commands[39].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[39].required_pos_args[0].pos = 1; +commands[39].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[39].optional_opt_args[0].opt = commandprofile_ARG; +commands[39].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[39].optional_opt_args[1].opt = config_ARG; +commands[39].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[39].optional_opt_args[2].opt = debug_ARG; +commands[39].optional_opt_args[3].opt = driverloaded_ARG; +commands[39].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[39].optional_opt_args[4].opt = help_ARG; +commands[39].optional_opt_args[5].opt = profile_ARG; +commands[39].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[39].optional_opt_args[6].opt = quiet_ARG; +commands[39].optional_opt_args[7].opt = verbose_ARG; +commands[39].optional_opt_args[8].opt = version_ARG; +commands[39].optional_opt_args[9].opt = yes_ARG; +commands[39].optional_opt_args[10].opt = addtag_ARG; +commands[39].optional_opt_args[10].def.val_bits = val_enum_to_bit(tag_VAL); +commands[39].optional_opt_args[11].opt = alloc_ARG; +commands[39].optional_opt_args[11].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[39].optional_opt_args[12].opt = autobackup_ARG; +commands[39].optional_opt_args[12].def.val_bits = val_enum_to_bit(bool_VAL); +commands[39].optional_opt_args[13].opt = activate_ARG; +commands[39].optional_opt_args[13].def.val_bits = val_enum_to_bit(activation_VAL); +commands[39].optional_opt_args[14].opt = contiguous_ARG; +commands[39].optional_opt_args[14].def.val_bits = val_enum_to_bit(bool_VAL); +commands[39].optional_opt_args[15].opt = ignoreactivationskip_ARG; +commands[39].optional_opt_args[16].opt = ignoremonitoring_ARG; +commands[39].optional_opt_args[17].opt = major_ARG; +commands[39].optional_opt_args[17].def.val_bits = val_enum_to_bit(number_VAL); +commands[39].optional_opt_args[18].opt = metadataprofile_ARG; +commands[39].optional_opt_args[18].def.val_bits = val_enum_to_bit(string_VAL); +commands[39].optional_opt_args[19].opt = minor_ARG; +commands[39].optional_opt_args[19].def.val_bits = val_enum_to_bit(number_VAL); +commands[39].optional_opt_args[20].opt = monitor_ARG; +commands[39].optional_opt_args[20].def.val_bits = val_enum_to_bit(bool_VAL); +commands[39].optional_opt_args[21].opt = name_ARG; +commands[39].optional_opt_args[21].def.val_bits = val_enum_to_bit(string_VAL); +commands[39].optional_opt_args[22].opt = nosync_ARG; +commands[39].optional_opt_args[23].opt = noudevsync_ARG; +commands[39].optional_opt_args[24].opt = permission_ARG; +commands[39].optional_opt_args[24].def.val_bits = val_enum_to_bit(permission_VAL); +commands[39].optional_opt_args[25].opt = persistent_ARG; +commands[39].optional_opt_args[25].def.val_bits = val_enum_to_bit(bool_VAL); +commands[39].optional_opt_args[26].opt = readahead_ARG; +commands[39].optional_opt_args[26].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[39].optional_opt_args[27].opt = reportformat_ARG; +commands[39].optional_opt_args[27].def.val_bits = val_enum_to_bit(string_VAL); +commands[39].optional_opt_args[28].opt = setactivationskip_ARG; +commands[39].optional_opt_args[28].def.val_bits = val_enum_to_bit(bool_VAL); +commands[39].optional_opt_args[29].opt = test_ARG; +commands[39].optional_opt_args[30].opt = wipesignatures_ARG; +commands[39].optional_opt_args[30].def.val_bits = val_enum_to_bit(bool_VAL); +commands[39].optional_opt_args[31].opt = zero_ARG; +commands[39].optional_opt_args[31].def.val_bits = val_enum_to_bit(bool_VAL); +commands[39].optional_pos_args[0].pos = 2; +commands[39].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[39].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[40].name = "lvcreate"; +commands[40].command_line_id = "lvcreate_linear"; +commands[40].command_line_enum = lvcreate_linear_CMD; +commands[40].fn = lvcreate; +commands[40].ro_count = 1; +commands[40].rp_count = 1; +commands[40].oo_count = 33; +commands[40].op_count = 1; +commands[40].desc = "DESC: Create a linear LV (default --type linear). DESC: When --name is omitted, the name is generated.!"; +commands[40].usage = "lvcreate --size Number[m|unit] VG" +" [ --type linear, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[40].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[40].required_opt_args[0].opt = size_ARG; +commands[40].required_opt_args[0].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[40].required_pos_args[0].pos = 1; +commands[40].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[40].optional_opt_args[0].opt = commandprofile_ARG; +commands[40].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[40].optional_opt_args[1].opt = config_ARG; +commands[40].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[40].optional_opt_args[2].opt = debug_ARG; +commands[40].optional_opt_args[3].opt = driverloaded_ARG; +commands[40].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[40].optional_opt_args[4].opt = help_ARG; +commands[40].optional_opt_args[5].opt = profile_ARG; +commands[40].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[40].optional_opt_args[6].opt = quiet_ARG; +commands[40].optional_opt_args[7].opt = verbose_ARG; +commands[40].optional_opt_args[8].opt = version_ARG; +commands[40].optional_opt_args[9].opt = yes_ARG; +commands[40].optional_opt_args[10].opt = type_ARG; +commands[40].optional_opt_args[10].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[40].optional_opt_args[10].def.str = "linear"; +commands[40].optional_opt_args[11].opt = addtag_ARG; +commands[40].optional_opt_args[11].def.val_bits = val_enum_to_bit(tag_VAL); +commands[40].optional_opt_args[12].opt = alloc_ARG; +commands[40].optional_opt_args[12].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[40].optional_opt_args[13].opt = autobackup_ARG; +commands[40].optional_opt_args[13].def.val_bits = val_enum_to_bit(bool_VAL); +commands[40].optional_opt_args[14].opt = activate_ARG; +commands[40].optional_opt_args[14].def.val_bits = val_enum_to_bit(activation_VAL); +commands[40].optional_opt_args[15].opt = contiguous_ARG; +commands[40].optional_opt_args[15].def.val_bits = val_enum_to_bit(bool_VAL); +commands[40].optional_opt_args[16].opt = ignoreactivationskip_ARG; +commands[40].optional_opt_args[17].opt = ignoremonitoring_ARG; +commands[40].optional_opt_args[18].opt = major_ARG; +commands[40].optional_opt_args[18].def.val_bits = val_enum_to_bit(number_VAL); +commands[40].optional_opt_args[19].opt = metadataprofile_ARG; +commands[40].optional_opt_args[19].def.val_bits = val_enum_to_bit(string_VAL); +commands[40].optional_opt_args[20].opt = minor_ARG; +commands[40].optional_opt_args[20].def.val_bits = val_enum_to_bit(number_VAL); +commands[40].optional_opt_args[21].opt = monitor_ARG; +commands[40].optional_opt_args[21].def.val_bits = val_enum_to_bit(bool_VAL); +commands[40].optional_opt_args[22].opt = name_ARG; +commands[40].optional_opt_args[22].def.val_bits = val_enum_to_bit(string_VAL); +commands[40].optional_opt_args[23].opt = nosync_ARG; +commands[40].optional_opt_args[24].opt = noudevsync_ARG; +commands[40].optional_opt_args[25].opt = permission_ARG; +commands[40].optional_opt_args[25].def.val_bits = val_enum_to_bit(permission_VAL); +commands[40].optional_opt_args[26].opt = persistent_ARG; +commands[40].optional_opt_args[26].def.val_bits = val_enum_to_bit(bool_VAL); +commands[40].optional_opt_args[27].opt = readahead_ARG; +commands[40].optional_opt_args[27].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[40].optional_opt_args[28].opt = reportformat_ARG; +commands[40].optional_opt_args[28].def.val_bits = val_enum_to_bit(string_VAL); +commands[40].optional_opt_args[29].opt = setactivationskip_ARG; +commands[40].optional_opt_args[29].def.val_bits = val_enum_to_bit(bool_VAL); +commands[40].optional_opt_args[30].opt = test_ARG; +commands[40].optional_opt_args[31].opt = wipesignatures_ARG; +commands[40].optional_opt_args[31].def.val_bits = val_enum_to_bit(bool_VAL); +commands[40].optional_opt_args[32].opt = zero_ARG; +commands[40].optional_opt_args[32].def.val_bits = val_enum_to_bit(bool_VAL); +commands[40].optional_pos_args[0].pos = 2; +commands[40].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[40].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[41].name = "lvcreate"; +commands[41].command_line_id = "lvcreate_striped"; +commands[41].command_line_enum = lvcreate_striped_CMD; +commands[41].fn = lvcreate; +commands[41].ro_count = 2; +commands[41].rp_count = 1; +commands[41].oo_count = 34; +commands[41].op_count = 1; +commands[41].desc = "DESC: Create a striped LV."; +commands[41].usage = "lvcreate --type striped --size Number[m|unit] VG" +" [ --stripes Number, --stripesize Number[k|unit], --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[41].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[41].required_opt_args[0].opt = type_ARG; +commands[41].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[41].required_opt_args[0].def.str = "striped"; +commands[41].required_opt_args[1].opt = size_ARG; +commands[41].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[41].required_pos_args[0].pos = 1; +commands[41].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[41].optional_opt_args[0].opt = commandprofile_ARG; +commands[41].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[41].optional_opt_args[1].opt = config_ARG; +commands[41].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[41].optional_opt_args[2].opt = debug_ARG; +commands[41].optional_opt_args[3].opt = driverloaded_ARG; +commands[41].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[41].optional_opt_args[4].opt = help_ARG; +commands[41].optional_opt_args[5].opt = profile_ARG; +commands[41].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[41].optional_opt_args[6].opt = quiet_ARG; +commands[41].optional_opt_args[7].opt = verbose_ARG; +commands[41].optional_opt_args[8].opt = version_ARG; +commands[41].optional_opt_args[9].opt = yes_ARG; +commands[41].optional_opt_args[10].opt = stripes_ARG; +commands[41].optional_opt_args[10].def.val_bits = val_enum_to_bit(number_VAL); +commands[41].optional_opt_args[11].opt = stripesize_ARG; +commands[41].optional_opt_args[11].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[41].optional_opt_args[12].opt = addtag_ARG; +commands[41].optional_opt_args[12].def.val_bits = val_enum_to_bit(tag_VAL); +commands[41].optional_opt_args[13].opt = alloc_ARG; +commands[41].optional_opt_args[13].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[41].optional_opt_args[14].opt = autobackup_ARG; +commands[41].optional_opt_args[14].def.val_bits = val_enum_to_bit(bool_VAL); +commands[41].optional_opt_args[15].opt = activate_ARG; +commands[41].optional_opt_args[15].def.val_bits = val_enum_to_bit(activation_VAL); +commands[41].optional_opt_args[16].opt = contiguous_ARG; +commands[41].optional_opt_args[16].def.val_bits = val_enum_to_bit(bool_VAL); +commands[41].optional_opt_args[17].opt = ignoreactivationskip_ARG; +commands[41].optional_opt_args[18].opt = ignoremonitoring_ARG; +commands[41].optional_opt_args[19].opt = major_ARG; +commands[41].optional_opt_args[19].def.val_bits = val_enum_to_bit(number_VAL); +commands[41].optional_opt_args[20].opt = metadataprofile_ARG; +commands[41].optional_opt_args[20].def.val_bits = val_enum_to_bit(string_VAL); +commands[41].optional_opt_args[21].opt = minor_ARG; +commands[41].optional_opt_args[21].def.val_bits = val_enum_to_bit(number_VAL); +commands[41].optional_opt_args[22].opt = monitor_ARG; +commands[41].optional_opt_args[22].def.val_bits = val_enum_to_bit(bool_VAL); +commands[41].optional_opt_args[23].opt = name_ARG; +commands[41].optional_opt_args[23].def.val_bits = val_enum_to_bit(string_VAL); +commands[41].optional_opt_args[24].opt = nosync_ARG; +commands[41].optional_opt_args[25].opt = noudevsync_ARG; +commands[41].optional_opt_args[26].opt = permission_ARG; +commands[41].optional_opt_args[26].def.val_bits = val_enum_to_bit(permission_VAL); +commands[41].optional_opt_args[27].opt = persistent_ARG; +commands[41].optional_opt_args[27].def.val_bits = val_enum_to_bit(bool_VAL); +commands[41].optional_opt_args[28].opt = readahead_ARG; +commands[41].optional_opt_args[28].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[41].optional_opt_args[29].opt = reportformat_ARG; +commands[41].optional_opt_args[29].def.val_bits = val_enum_to_bit(string_VAL); +commands[41].optional_opt_args[30].opt = setactivationskip_ARG; +commands[41].optional_opt_args[30].def.val_bits = val_enum_to_bit(bool_VAL); +commands[41].optional_opt_args[31].opt = test_ARG; +commands[41].optional_opt_args[32].opt = wipesignatures_ARG; +commands[41].optional_opt_args[32].def.val_bits = val_enum_to_bit(bool_VAL); +commands[41].optional_opt_args[33].opt = zero_ARG; +commands[41].optional_opt_args[33].def.val_bits = val_enum_to_bit(bool_VAL); +commands[41].optional_pos_args[0].pos = 2; +commands[41].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[41].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[42].name = "lvcreate"; +commands[42].command_line_id = "lvcreate_striped"; +commands[42].command_line_enum = lvcreate_striped_CMD; +commands[42].fn = lvcreate; +commands[42].ro_count = 2; +commands[42].rp_count = 1; +commands[42].oo_count = 34; +commands[42].op_count = 1; +commands[42].desc = "DESC: Create a striped LV (infers --type striped)."; +commands[42].usage = "lvcreate --stripes Number --size Number[m|unit] VG" +" [ --type striped, --stripesize Number[k|unit], --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[42].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[42].required_opt_args[0].opt = stripes_ARG; +commands[42].required_opt_args[0].def.val_bits = val_enum_to_bit(number_VAL); +commands[42].required_opt_args[1].opt = size_ARG; +commands[42].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[42].required_pos_args[0].pos = 1; +commands[42].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[42].optional_opt_args[0].opt = commandprofile_ARG; +commands[42].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[42].optional_opt_args[1].opt = config_ARG; +commands[42].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[42].optional_opt_args[2].opt = debug_ARG; +commands[42].optional_opt_args[3].opt = driverloaded_ARG; +commands[42].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[42].optional_opt_args[4].opt = help_ARG; +commands[42].optional_opt_args[5].opt = profile_ARG; +commands[42].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[42].optional_opt_args[6].opt = quiet_ARG; +commands[42].optional_opt_args[7].opt = verbose_ARG; +commands[42].optional_opt_args[8].opt = version_ARG; +commands[42].optional_opt_args[9].opt = yes_ARG; +commands[42].optional_opt_args[10].opt = type_ARG; +commands[42].optional_opt_args[10].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[42].optional_opt_args[10].def.str = "striped"; +commands[42].optional_opt_args[11].opt = stripesize_ARG; +commands[42].optional_opt_args[11].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[42].optional_opt_args[12].opt = addtag_ARG; +commands[42].optional_opt_args[12].def.val_bits = val_enum_to_bit(tag_VAL); +commands[42].optional_opt_args[13].opt = alloc_ARG; +commands[42].optional_opt_args[13].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[42].optional_opt_args[14].opt = autobackup_ARG; +commands[42].optional_opt_args[14].def.val_bits = val_enum_to_bit(bool_VAL); +commands[42].optional_opt_args[15].opt = activate_ARG; +commands[42].optional_opt_args[15].def.val_bits = val_enum_to_bit(activation_VAL); +commands[42].optional_opt_args[16].opt = contiguous_ARG; +commands[42].optional_opt_args[16].def.val_bits = val_enum_to_bit(bool_VAL); +commands[42].optional_opt_args[17].opt = ignoreactivationskip_ARG; +commands[42].optional_opt_args[18].opt = ignoremonitoring_ARG; +commands[42].optional_opt_args[19].opt = major_ARG; +commands[42].optional_opt_args[19].def.val_bits = val_enum_to_bit(number_VAL); +commands[42].optional_opt_args[20].opt = metadataprofile_ARG; +commands[42].optional_opt_args[20].def.val_bits = val_enum_to_bit(string_VAL); +commands[42].optional_opt_args[21].opt = minor_ARG; +commands[42].optional_opt_args[21].def.val_bits = val_enum_to_bit(number_VAL); +commands[42].optional_opt_args[22].opt = monitor_ARG; +commands[42].optional_opt_args[22].def.val_bits = val_enum_to_bit(bool_VAL); +commands[42].optional_opt_args[23].opt = name_ARG; +commands[42].optional_opt_args[23].def.val_bits = val_enum_to_bit(string_VAL); +commands[42].optional_opt_args[24].opt = nosync_ARG; +commands[42].optional_opt_args[25].opt = noudevsync_ARG; +commands[42].optional_opt_args[26].opt = permission_ARG; +commands[42].optional_opt_args[26].def.val_bits = val_enum_to_bit(permission_VAL); +commands[42].optional_opt_args[27].opt = persistent_ARG; +commands[42].optional_opt_args[27].def.val_bits = val_enum_to_bit(bool_VAL); +commands[42].optional_opt_args[28].opt = readahead_ARG; +commands[42].optional_opt_args[28].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[42].optional_opt_args[29].opt = reportformat_ARG; +commands[42].optional_opt_args[29].def.val_bits = val_enum_to_bit(string_VAL); +commands[42].optional_opt_args[30].opt = setactivationskip_ARG; +commands[42].optional_opt_args[30].def.val_bits = val_enum_to_bit(bool_VAL); +commands[42].optional_opt_args[31].opt = test_ARG; +commands[42].optional_opt_args[32].opt = wipesignatures_ARG; +commands[42].optional_opt_args[32].def.val_bits = val_enum_to_bit(bool_VAL); +commands[42].optional_opt_args[33].opt = zero_ARG; +commands[42].optional_opt_args[33].def.val_bits = val_enum_to_bit(bool_VAL); +commands[42].optional_pos_args[0].pos = 2; +commands[42].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[42].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[43].name = "lvcreate"; +commands[43].command_line_id = "lvcreate_mirror"; +commands[43].command_line_enum = lvcreate_mirror_CMD; +commands[43].fn = lvcreate; +commands[43].ro_count = 2; +commands[43].rp_count = 1; +commands[43].oo_count = 36; +commands[43].op_count = 1; +commands[43].desc = "DESC: Create a mirror LV."; +commands[43].usage = "lvcreate --type mirror --size Number[m|unit] VG" +" [ --mirrors [+|-]Number, --mirrorlog core|disk, --corelog, --regionsize Number[m|unit], --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[43].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[43].required_opt_args[0].opt = type_ARG; +commands[43].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[43].required_opt_args[0].def.str = "mirror"; +commands[43].required_opt_args[1].opt = size_ARG; +commands[43].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[43].required_pos_args[0].pos = 1; +commands[43].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[43].optional_opt_args[0].opt = commandprofile_ARG; +commands[43].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[43].optional_opt_args[1].opt = config_ARG; +commands[43].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[43].optional_opt_args[2].opt = debug_ARG; +commands[43].optional_opt_args[3].opt = driverloaded_ARG; +commands[43].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[43].optional_opt_args[4].opt = help_ARG; +commands[43].optional_opt_args[5].opt = profile_ARG; +commands[43].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[43].optional_opt_args[6].opt = quiet_ARG; +commands[43].optional_opt_args[7].opt = verbose_ARG; +commands[43].optional_opt_args[8].opt = version_ARG; +commands[43].optional_opt_args[9].opt = yes_ARG; +commands[43].optional_opt_args[10].opt = mirrors_ARG; +commands[43].optional_opt_args[10].def.val_bits = val_enum_to_bit(numsigned_VAL); +commands[43].optional_opt_args[11].opt = mirrorlog_ARG; +commands[43].optional_opt_args[11].def.val_bits = val_enum_to_bit(mirrorlog_VAL); +commands[43].optional_opt_args[12].opt = corelog_ARG; +commands[43].optional_opt_args[13].opt = regionsize_ARG; +commands[43].optional_opt_args[13].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[43].optional_opt_args[14].opt = addtag_ARG; +commands[43].optional_opt_args[14].def.val_bits = val_enum_to_bit(tag_VAL); +commands[43].optional_opt_args[15].opt = alloc_ARG; +commands[43].optional_opt_args[15].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[43].optional_opt_args[16].opt = autobackup_ARG; +commands[43].optional_opt_args[16].def.val_bits = val_enum_to_bit(bool_VAL); +commands[43].optional_opt_args[17].opt = activate_ARG; +commands[43].optional_opt_args[17].def.val_bits = val_enum_to_bit(activation_VAL); +commands[43].optional_opt_args[18].opt = contiguous_ARG; +commands[43].optional_opt_args[18].def.val_bits = val_enum_to_bit(bool_VAL); +commands[43].optional_opt_args[19].opt = ignoreactivationskip_ARG; +commands[43].optional_opt_args[20].opt = ignoremonitoring_ARG; +commands[43].optional_opt_args[21].opt = major_ARG; +commands[43].optional_opt_args[21].def.val_bits = val_enum_to_bit(number_VAL); +commands[43].optional_opt_args[22].opt = metadataprofile_ARG; +commands[43].optional_opt_args[22].def.val_bits = val_enum_to_bit(string_VAL); +commands[43].optional_opt_args[23].opt = minor_ARG; +commands[43].optional_opt_args[23].def.val_bits = val_enum_to_bit(number_VAL); +commands[43].optional_opt_args[24].opt = monitor_ARG; +commands[43].optional_opt_args[24].def.val_bits = val_enum_to_bit(bool_VAL); +commands[43].optional_opt_args[25].opt = name_ARG; +commands[43].optional_opt_args[25].def.val_bits = val_enum_to_bit(string_VAL); +commands[43].optional_opt_args[26].opt = nosync_ARG; +commands[43].optional_opt_args[27].opt = noudevsync_ARG; +commands[43].optional_opt_args[28].opt = permission_ARG; +commands[43].optional_opt_args[28].def.val_bits = val_enum_to_bit(permission_VAL); +commands[43].optional_opt_args[29].opt = persistent_ARG; +commands[43].optional_opt_args[29].def.val_bits = val_enum_to_bit(bool_VAL); +commands[43].optional_opt_args[30].opt = readahead_ARG; +commands[43].optional_opt_args[30].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[43].optional_opt_args[31].opt = reportformat_ARG; +commands[43].optional_opt_args[31].def.val_bits = val_enum_to_bit(string_VAL); +commands[43].optional_opt_args[32].opt = setactivationskip_ARG; +commands[43].optional_opt_args[32].def.val_bits = val_enum_to_bit(bool_VAL); +commands[43].optional_opt_args[33].opt = test_ARG; +commands[43].optional_opt_args[34].opt = wipesignatures_ARG; +commands[43].optional_opt_args[34].def.val_bits = val_enum_to_bit(bool_VAL); +commands[43].optional_opt_args[35].opt = zero_ARG; +commands[43].optional_opt_args[35].def.val_bits = val_enum_to_bit(bool_VAL); +commands[43].optional_pos_args[0].pos = 2; +commands[43].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[43].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[44].name = "lvcreate"; +commands[44].command_line_id = "lvcreate_mirror"; +commands[44].command_line_enum = lvcreate_mirror_CMD; +commands[44].fn = lvcreate; +commands[44].ro_count = 2; +commands[44].rp_count = 1; +commands[44].oo_count = 42; +commands[44].op_count = 1; +commands[44].desc = "DESC: Create a raid1 or mirror LV (variant, infers --type raid1|mirror)."; +commands[44].usage = "lvcreate --mirrors [+|-]Number --size Number[m|unit] VG" +" [ --type raid1, --type mirror, --mirrorlog core|disk, --corelog, --mirrors [+|-]Number, --stripes Number, --stripesize Number[k|unit], --regionsize Number[m|unit], --minrecoveryrate Number[k|unit], --maxrecoveryrate Number[k|unit], --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[44].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[44].required_opt_args[0].opt = mirrors_ARG; +commands[44].required_opt_args[0].def.val_bits = val_enum_to_bit(numsigned_VAL); +commands[44].required_opt_args[1].opt = size_ARG; +commands[44].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[44].required_pos_args[0].pos = 1; +commands[44].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[44].optional_opt_args[0].opt = commandprofile_ARG; +commands[44].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[44].optional_opt_args[1].opt = config_ARG; +commands[44].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[44].optional_opt_args[2].opt = debug_ARG; +commands[44].optional_opt_args[3].opt = driverloaded_ARG; +commands[44].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[44].optional_opt_args[4].opt = help_ARG; +commands[44].optional_opt_args[5].opt = profile_ARG; +commands[44].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[44].optional_opt_args[6].opt = quiet_ARG; +commands[44].optional_opt_args[7].opt = verbose_ARG; +commands[44].optional_opt_args[8].opt = version_ARG; +commands[44].optional_opt_args[9].opt = yes_ARG; +commands[44].optional_opt_args[10].opt = type_ARG; +commands[44].optional_opt_args[10].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[44].optional_opt_args[10].def.str = "raid1"; +commands[44].optional_opt_args[11].opt = type_ARG; +commands[44].optional_opt_args[11].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[44].optional_opt_args[11].def.str = "mirror"; +commands[44].optional_opt_args[12].opt = mirrorlog_ARG; +commands[44].optional_opt_args[12].def.val_bits = val_enum_to_bit(mirrorlog_VAL); +commands[44].optional_opt_args[13].opt = corelog_ARG; +commands[44].optional_opt_args[14].opt = mirrors_ARG; +commands[44].optional_opt_args[14].def.val_bits = val_enum_to_bit(numsigned_VAL); +commands[44].optional_opt_args[15].opt = stripes_ARG; +commands[44].optional_opt_args[15].def.val_bits = val_enum_to_bit(number_VAL); +commands[44].optional_opt_args[16].opt = stripesize_ARG; +commands[44].optional_opt_args[16].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[44].optional_opt_args[17].opt = regionsize_ARG; +commands[44].optional_opt_args[17].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[44].optional_opt_args[18].opt = minrecoveryrate_ARG; +commands[44].optional_opt_args[18].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[44].optional_opt_args[19].opt = maxrecoveryrate_ARG; +commands[44].optional_opt_args[19].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[44].optional_opt_args[20].opt = addtag_ARG; +commands[44].optional_opt_args[20].def.val_bits = val_enum_to_bit(tag_VAL); +commands[44].optional_opt_args[21].opt = alloc_ARG; +commands[44].optional_opt_args[21].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[44].optional_opt_args[22].opt = autobackup_ARG; +commands[44].optional_opt_args[22].def.val_bits = val_enum_to_bit(bool_VAL); +commands[44].optional_opt_args[23].opt = activate_ARG; +commands[44].optional_opt_args[23].def.val_bits = val_enum_to_bit(activation_VAL); +commands[44].optional_opt_args[24].opt = contiguous_ARG; +commands[44].optional_opt_args[24].def.val_bits = val_enum_to_bit(bool_VAL); +commands[44].optional_opt_args[25].opt = ignoreactivationskip_ARG; +commands[44].optional_opt_args[26].opt = ignoremonitoring_ARG; +commands[44].optional_opt_args[27].opt = major_ARG; +commands[44].optional_opt_args[27].def.val_bits = val_enum_to_bit(number_VAL); +commands[44].optional_opt_args[28].opt = metadataprofile_ARG; +commands[44].optional_opt_args[28].def.val_bits = val_enum_to_bit(string_VAL); +commands[44].optional_opt_args[29].opt = minor_ARG; +commands[44].optional_opt_args[29].def.val_bits = val_enum_to_bit(number_VAL); +commands[44].optional_opt_args[30].opt = monitor_ARG; +commands[44].optional_opt_args[30].def.val_bits = val_enum_to_bit(bool_VAL); +commands[44].optional_opt_args[31].opt = name_ARG; +commands[44].optional_opt_args[31].def.val_bits = val_enum_to_bit(string_VAL); +commands[44].optional_opt_args[32].opt = nosync_ARG; +commands[44].optional_opt_args[33].opt = noudevsync_ARG; +commands[44].optional_opt_args[34].opt = permission_ARG; +commands[44].optional_opt_args[34].def.val_bits = val_enum_to_bit(permission_VAL); +commands[44].optional_opt_args[35].opt = persistent_ARG; +commands[44].optional_opt_args[35].def.val_bits = val_enum_to_bit(bool_VAL); +commands[44].optional_opt_args[36].opt = readahead_ARG; +commands[44].optional_opt_args[36].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[44].optional_opt_args[37].opt = reportformat_ARG; +commands[44].optional_opt_args[37].def.val_bits = val_enum_to_bit(string_VAL); +commands[44].optional_opt_args[38].opt = setactivationskip_ARG; +commands[44].optional_opt_args[38].def.val_bits = val_enum_to_bit(bool_VAL); +commands[44].optional_opt_args[39].opt = test_ARG; +commands[44].optional_opt_args[40].opt = wipesignatures_ARG; +commands[44].optional_opt_args[40].def.val_bits = val_enum_to_bit(bool_VAL); +commands[44].optional_opt_args[41].opt = zero_ARG; +commands[44].optional_opt_args[41].def.val_bits = val_enum_to_bit(bool_VAL); +commands[44].optional_pos_args[0].pos = 2; +commands[44].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[44].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[45].name = "lvcreate"; +commands[45].command_line_id = "lvcreate_raid_any"; +commands[45].command_line_enum = lvcreate_raid_any_CMD; +commands[45].fn = lvcreate; +commands[45].ro_count = 2; +commands[45].rp_count = 1; +commands[45].oo_count = 38; +commands[45].op_count = 1; +commands[45].desc = "DESC: Create a raid LV (a specific raid level must be used, e.g. raid1.)"; +commands[45].usage = "lvcreate --type raid --size Number[m|unit] VG" +" [ --mirrors [+|-]Number, --stripes Number, --stripesize Number[k|unit], --regionsize Number[m|unit], --minrecoveryrate Number[k|unit], --maxrecoveryrate Number[k|unit], --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[45].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[45].required_opt_args[0].opt = type_ARG; +commands[45].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[45].required_opt_args[0].def.str = "raid"; +commands[45].required_opt_args[1].opt = size_ARG; +commands[45].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[45].required_pos_args[0].pos = 1; +commands[45].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[45].optional_opt_args[0].opt = commandprofile_ARG; +commands[45].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[45].optional_opt_args[1].opt = config_ARG; +commands[45].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[45].optional_opt_args[2].opt = debug_ARG; +commands[45].optional_opt_args[3].opt = driverloaded_ARG; +commands[45].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[45].optional_opt_args[4].opt = help_ARG; +commands[45].optional_opt_args[5].opt = profile_ARG; +commands[45].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[45].optional_opt_args[6].opt = quiet_ARG; +commands[45].optional_opt_args[7].opt = verbose_ARG; +commands[45].optional_opt_args[8].opt = version_ARG; +commands[45].optional_opt_args[9].opt = yes_ARG; +commands[45].optional_opt_args[10].opt = mirrors_ARG; +commands[45].optional_opt_args[10].def.val_bits = val_enum_to_bit(numsigned_VAL); +commands[45].optional_opt_args[11].opt = stripes_ARG; +commands[45].optional_opt_args[11].def.val_bits = val_enum_to_bit(number_VAL); +commands[45].optional_opt_args[12].opt = stripesize_ARG; +commands[45].optional_opt_args[12].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[45].optional_opt_args[13].opt = regionsize_ARG; +commands[45].optional_opt_args[13].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[45].optional_opt_args[14].opt = minrecoveryrate_ARG; +commands[45].optional_opt_args[14].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[45].optional_opt_args[15].opt = maxrecoveryrate_ARG; +commands[45].optional_opt_args[15].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[45].optional_opt_args[16].opt = addtag_ARG; +commands[45].optional_opt_args[16].def.val_bits = val_enum_to_bit(tag_VAL); +commands[45].optional_opt_args[17].opt = alloc_ARG; +commands[45].optional_opt_args[17].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[45].optional_opt_args[18].opt = autobackup_ARG; +commands[45].optional_opt_args[18].def.val_bits = val_enum_to_bit(bool_VAL); +commands[45].optional_opt_args[19].opt = activate_ARG; +commands[45].optional_opt_args[19].def.val_bits = val_enum_to_bit(activation_VAL); +commands[45].optional_opt_args[20].opt = contiguous_ARG; +commands[45].optional_opt_args[20].def.val_bits = val_enum_to_bit(bool_VAL); +commands[45].optional_opt_args[21].opt = ignoreactivationskip_ARG; +commands[45].optional_opt_args[22].opt = ignoremonitoring_ARG; +commands[45].optional_opt_args[23].opt = major_ARG; +commands[45].optional_opt_args[23].def.val_bits = val_enum_to_bit(number_VAL); +commands[45].optional_opt_args[24].opt = metadataprofile_ARG; +commands[45].optional_opt_args[24].def.val_bits = val_enum_to_bit(string_VAL); +commands[45].optional_opt_args[25].opt = minor_ARG; +commands[45].optional_opt_args[25].def.val_bits = val_enum_to_bit(number_VAL); +commands[45].optional_opt_args[26].opt = monitor_ARG; +commands[45].optional_opt_args[26].def.val_bits = val_enum_to_bit(bool_VAL); +commands[45].optional_opt_args[27].opt = name_ARG; +commands[45].optional_opt_args[27].def.val_bits = val_enum_to_bit(string_VAL); +commands[45].optional_opt_args[28].opt = nosync_ARG; +commands[45].optional_opt_args[29].opt = noudevsync_ARG; +commands[45].optional_opt_args[30].opt = permission_ARG; +commands[45].optional_opt_args[30].def.val_bits = val_enum_to_bit(permission_VAL); +commands[45].optional_opt_args[31].opt = persistent_ARG; +commands[45].optional_opt_args[31].def.val_bits = val_enum_to_bit(bool_VAL); +commands[45].optional_opt_args[32].opt = readahead_ARG; +commands[45].optional_opt_args[32].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[45].optional_opt_args[33].opt = reportformat_ARG; +commands[45].optional_opt_args[33].def.val_bits = val_enum_to_bit(string_VAL); +commands[45].optional_opt_args[34].opt = setactivationskip_ARG; +commands[45].optional_opt_args[34].def.val_bits = val_enum_to_bit(bool_VAL); +commands[45].optional_opt_args[35].opt = test_ARG; +commands[45].optional_opt_args[36].opt = wipesignatures_ARG; +commands[45].optional_opt_args[36].def.val_bits = val_enum_to_bit(bool_VAL); +commands[45].optional_opt_args[37].opt = zero_ARG; +commands[45].optional_opt_args[37].def.val_bits = val_enum_to_bit(bool_VAL); +commands[45].optional_pos_args[0].pos = 2; +commands[45].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[45].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[46].name = "lvcreate"; +commands[46].command_line_id = "lvcreate_cow_snapshot"; +commands[46].command_line_enum = lvcreate_cow_snapshot_CMD; +commands[46].fn = lvcreate; +commands[46].ro_count = 2; +commands[46].rp_count = 1; +commands[46].oo_count = 33; +commands[46].op_count = 1; +commands[46].desc = "DESC: Create a COW snapshot LV from an origin LV."; +commands[46].usage = "lvcreate --type snapshot --size Number[m|unit] LV" +" [ --snapshot, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[46].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[46].required_opt_args[0].opt = type_ARG; +commands[46].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[46].required_opt_args[0].def.str = "snapshot"; +commands[46].required_opt_args[1].opt = size_ARG; +commands[46].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[46].required_pos_args[0].pos = 1; +commands[46].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[46].optional_opt_args[0].opt = commandprofile_ARG; +commands[46].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[46].optional_opt_args[1].opt = config_ARG; +commands[46].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[46].optional_opt_args[2].opt = debug_ARG; +commands[46].optional_opt_args[3].opt = driverloaded_ARG; +commands[46].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[46].optional_opt_args[4].opt = help_ARG; +commands[46].optional_opt_args[5].opt = profile_ARG; +commands[46].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[46].optional_opt_args[6].opt = quiet_ARG; +commands[46].optional_opt_args[7].opt = verbose_ARG; +commands[46].optional_opt_args[8].opt = version_ARG; +commands[46].optional_opt_args[9].opt = yes_ARG; +commands[46].optional_opt_args[10].opt = snapshot_ARG; +commands[46].optional_opt_args[11].opt = addtag_ARG; +commands[46].optional_opt_args[11].def.val_bits = val_enum_to_bit(tag_VAL); +commands[46].optional_opt_args[12].opt = alloc_ARG; +commands[46].optional_opt_args[12].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[46].optional_opt_args[13].opt = autobackup_ARG; +commands[46].optional_opt_args[13].def.val_bits = val_enum_to_bit(bool_VAL); +commands[46].optional_opt_args[14].opt = activate_ARG; +commands[46].optional_opt_args[14].def.val_bits = val_enum_to_bit(activation_VAL); +commands[46].optional_opt_args[15].opt = contiguous_ARG; +commands[46].optional_opt_args[15].def.val_bits = val_enum_to_bit(bool_VAL); +commands[46].optional_opt_args[16].opt = ignoreactivationskip_ARG; +commands[46].optional_opt_args[17].opt = ignoremonitoring_ARG; +commands[46].optional_opt_args[18].opt = major_ARG; +commands[46].optional_opt_args[18].def.val_bits = val_enum_to_bit(number_VAL); +commands[46].optional_opt_args[19].opt = metadataprofile_ARG; +commands[46].optional_opt_args[19].def.val_bits = val_enum_to_bit(string_VAL); +commands[46].optional_opt_args[20].opt = minor_ARG; +commands[46].optional_opt_args[20].def.val_bits = val_enum_to_bit(number_VAL); +commands[46].optional_opt_args[21].opt = monitor_ARG; +commands[46].optional_opt_args[21].def.val_bits = val_enum_to_bit(bool_VAL); +commands[46].optional_opt_args[22].opt = name_ARG; +commands[46].optional_opt_args[22].def.val_bits = val_enum_to_bit(string_VAL); +commands[46].optional_opt_args[23].opt = nosync_ARG; +commands[46].optional_opt_args[24].opt = noudevsync_ARG; +commands[46].optional_opt_args[25].opt = permission_ARG; +commands[46].optional_opt_args[25].def.val_bits = val_enum_to_bit(permission_VAL); +commands[46].optional_opt_args[26].opt = persistent_ARG; +commands[46].optional_opt_args[26].def.val_bits = val_enum_to_bit(bool_VAL); +commands[46].optional_opt_args[27].opt = readahead_ARG; +commands[46].optional_opt_args[27].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[46].optional_opt_args[28].opt = reportformat_ARG; +commands[46].optional_opt_args[28].def.val_bits = val_enum_to_bit(string_VAL); +commands[46].optional_opt_args[29].opt = setactivationskip_ARG; +commands[46].optional_opt_args[29].def.val_bits = val_enum_to_bit(bool_VAL); +commands[46].optional_opt_args[30].opt = test_ARG; +commands[46].optional_opt_args[31].opt = wipesignatures_ARG; +commands[46].optional_opt_args[31].def.val_bits = val_enum_to_bit(bool_VAL); +commands[46].optional_opt_args[32].opt = zero_ARG; +commands[46].optional_opt_args[32].def.val_bits = val_enum_to_bit(bool_VAL); +commands[46].optional_pos_args[0].pos = 2; +commands[46].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[46].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[47].name = "lvcreate"; +commands[47].command_line_id = "lvcreate_cow_snapshot"; +commands[47].command_line_enum = lvcreate_cow_snapshot_CMD; +commands[47].fn = lvcreate; +commands[47].ro_count = 2; +commands[47].rp_count = 1; +commands[47].oo_count = 33; +commands[47].op_count = 1; +commands[47].desc = "DESC: Create a COW snapshot LV from an origin LV DESC: (infers --type snapshot)."; +commands[47].usage = "lvcreate --snapshot --size Number[m|unit] LV" +" [ --type snapshot, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[47].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[47].required_opt_args[0].opt = snapshot_ARG; +commands[47].required_opt_args[1].opt = size_ARG; +commands[47].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[47].required_pos_args[0].pos = 1; +commands[47].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[47].optional_opt_args[0].opt = commandprofile_ARG; +commands[47].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[47].optional_opt_args[1].opt = config_ARG; +commands[47].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[47].optional_opt_args[2].opt = debug_ARG; +commands[47].optional_opt_args[3].opt = driverloaded_ARG; +commands[47].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[47].optional_opt_args[4].opt = help_ARG; +commands[47].optional_opt_args[5].opt = profile_ARG; +commands[47].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[47].optional_opt_args[6].opt = quiet_ARG; +commands[47].optional_opt_args[7].opt = verbose_ARG; +commands[47].optional_opt_args[8].opt = version_ARG; +commands[47].optional_opt_args[9].opt = yes_ARG; +commands[47].optional_opt_args[10].opt = type_ARG; +commands[47].optional_opt_args[10].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[47].optional_opt_args[10].def.str = "snapshot"; +commands[47].optional_opt_args[11].opt = addtag_ARG; +commands[47].optional_opt_args[11].def.val_bits = val_enum_to_bit(tag_VAL); +commands[47].optional_opt_args[12].opt = alloc_ARG; +commands[47].optional_opt_args[12].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[47].optional_opt_args[13].opt = autobackup_ARG; +commands[47].optional_opt_args[13].def.val_bits = val_enum_to_bit(bool_VAL); +commands[47].optional_opt_args[14].opt = activate_ARG; +commands[47].optional_opt_args[14].def.val_bits = val_enum_to_bit(activation_VAL); +commands[47].optional_opt_args[15].opt = contiguous_ARG; +commands[47].optional_opt_args[15].def.val_bits = val_enum_to_bit(bool_VAL); +commands[47].optional_opt_args[16].opt = ignoreactivationskip_ARG; +commands[47].optional_opt_args[17].opt = ignoremonitoring_ARG; +commands[47].optional_opt_args[18].opt = major_ARG; +commands[47].optional_opt_args[18].def.val_bits = val_enum_to_bit(number_VAL); +commands[47].optional_opt_args[19].opt = metadataprofile_ARG; +commands[47].optional_opt_args[19].def.val_bits = val_enum_to_bit(string_VAL); +commands[47].optional_opt_args[20].opt = minor_ARG; +commands[47].optional_opt_args[20].def.val_bits = val_enum_to_bit(number_VAL); +commands[47].optional_opt_args[21].opt = monitor_ARG; +commands[47].optional_opt_args[21].def.val_bits = val_enum_to_bit(bool_VAL); +commands[47].optional_opt_args[22].opt = name_ARG; +commands[47].optional_opt_args[22].def.val_bits = val_enum_to_bit(string_VAL); +commands[47].optional_opt_args[23].opt = nosync_ARG; +commands[47].optional_opt_args[24].opt = noudevsync_ARG; +commands[47].optional_opt_args[25].opt = permission_ARG; +commands[47].optional_opt_args[25].def.val_bits = val_enum_to_bit(permission_VAL); +commands[47].optional_opt_args[26].opt = persistent_ARG; +commands[47].optional_opt_args[26].def.val_bits = val_enum_to_bit(bool_VAL); +commands[47].optional_opt_args[27].opt = readahead_ARG; +commands[47].optional_opt_args[27].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[47].optional_opt_args[28].opt = reportformat_ARG; +commands[47].optional_opt_args[28].def.val_bits = val_enum_to_bit(string_VAL); +commands[47].optional_opt_args[29].opt = setactivationskip_ARG; +commands[47].optional_opt_args[29].def.val_bits = val_enum_to_bit(bool_VAL); +commands[47].optional_opt_args[30].opt = test_ARG; +commands[47].optional_opt_args[31].opt = wipesignatures_ARG; +commands[47].optional_opt_args[31].def.val_bits = val_enum_to_bit(bool_VAL); +commands[47].optional_opt_args[32].opt = zero_ARG; +commands[47].optional_opt_args[32].def.val_bits = val_enum_to_bit(bool_VAL); +commands[47].optional_pos_args[0].pos = 2; +commands[47].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[47].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[48].name = "lvcreate"; +commands[48].command_line_id = "lvcreate_cow_snapshot_with_virtual_origin"; +commands[48].command_line_enum = lvcreate_cow_snapshot_with_virtual_origin_CMD; +commands[48].fn = lvcreate; +commands[48].ro_count = 3; +commands[48].rp_count = 1; +commands[48].oo_count = 34; +commands[48].op_count = 1; +commands[48].desc = "DESC: Create a sparse COW snapshot LV of a virtual origin LV."; +commands[48].usage = "lvcreate --type snapshot --size Number[m|unit] --virtualsize Number[m|unit] VG" +" [ --snapshot, --virtualoriginsize Number[m|unit], --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[48].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[48].required_opt_args[0].opt = type_ARG; +commands[48].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[48].required_opt_args[0].def.str = "snapshot"; +commands[48].required_opt_args[1].opt = size_ARG; +commands[48].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[48].required_opt_args[2].opt = virtualsize_ARG; +commands[48].required_opt_args[2].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[48].required_pos_args[0].pos = 1; +commands[48].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[48].optional_opt_args[0].opt = commandprofile_ARG; +commands[48].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[48].optional_opt_args[1].opt = config_ARG; +commands[48].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[48].optional_opt_args[2].opt = debug_ARG; +commands[48].optional_opt_args[3].opt = driverloaded_ARG; +commands[48].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[48].optional_opt_args[4].opt = help_ARG; +commands[48].optional_opt_args[5].opt = profile_ARG; +commands[48].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[48].optional_opt_args[6].opt = quiet_ARG; +commands[48].optional_opt_args[7].opt = verbose_ARG; +commands[48].optional_opt_args[8].opt = version_ARG; +commands[48].optional_opt_args[9].opt = yes_ARG; +commands[48].optional_opt_args[10].opt = snapshot_ARG; +commands[48].optional_opt_args[11].opt = virtualoriginsize_ARG; +commands[48].optional_opt_args[11].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[48].optional_opt_args[12].opt = addtag_ARG; +commands[48].optional_opt_args[12].def.val_bits = val_enum_to_bit(tag_VAL); +commands[48].optional_opt_args[13].opt = alloc_ARG; +commands[48].optional_opt_args[13].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[48].optional_opt_args[14].opt = autobackup_ARG; +commands[48].optional_opt_args[14].def.val_bits = val_enum_to_bit(bool_VAL); +commands[48].optional_opt_args[15].opt = activate_ARG; +commands[48].optional_opt_args[15].def.val_bits = val_enum_to_bit(activation_VAL); +commands[48].optional_opt_args[16].opt = contiguous_ARG; +commands[48].optional_opt_args[16].def.val_bits = val_enum_to_bit(bool_VAL); +commands[48].optional_opt_args[17].opt = ignoreactivationskip_ARG; +commands[48].optional_opt_args[18].opt = ignoremonitoring_ARG; +commands[48].optional_opt_args[19].opt = major_ARG; +commands[48].optional_opt_args[19].def.val_bits = val_enum_to_bit(number_VAL); +commands[48].optional_opt_args[20].opt = metadataprofile_ARG; +commands[48].optional_opt_args[20].def.val_bits = val_enum_to_bit(string_VAL); +commands[48].optional_opt_args[21].opt = minor_ARG; +commands[48].optional_opt_args[21].def.val_bits = val_enum_to_bit(number_VAL); +commands[48].optional_opt_args[22].opt = monitor_ARG; +commands[48].optional_opt_args[22].def.val_bits = val_enum_to_bit(bool_VAL); +commands[48].optional_opt_args[23].opt = name_ARG; +commands[48].optional_opt_args[23].def.val_bits = val_enum_to_bit(string_VAL); +commands[48].optional_opt_args[24].opt = nosync_ARG; +commands[48].optional_opt_args[25].opt = noudevsync_ARG; +commands[48].optional_opt_args[26].opt = permission_ARG; +commands[48].optional_opt_args[26].def.val_bits = val_enum_to_bit(permission_VAL); +commands[48].optional_opt_args[27].opt = persistent_ARG; +commands[48].optional_opt_args[27].def.val_bits = val_enum_to_bit(bool_VAL); +commands[48].optional_opt_args[28].opt = readahead_ARG; +commands[48].optional_opt_args[28].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[48].optional_opt_args[29].opt = reportformat_ARG; +commands[48].optional_opt_args[29].def.val_bits = val_enum_to_bit(string_VAL); +commands[48].optional_opt_args[30].opt = setactivationskip_ARG; +commands[48].optional_opt_args[30].def.val_bits = val_enum_to_bit(bool_VAL); +commands[48].optional_opt_args[31].opt = test_ARG; +commands[48].optional_opt_args[32].opt = wipesignatures_ARG; +commands[48].optional_opt_args[32].def.val_bits = val_enum_to_bit(bool_VAL); +commands[48].optional_opt_args[33].opt = zero_ARG; +commands[48].optional_opt_args[33].def.val_bits = val_enum_to_bit(bool_VAL); +commands[48].optional_pos_args[0].pos = 2; +commands[48].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[48].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[49].name = "lvcreate"; +commands[49].command_line_id = "lvcreate_thinpool"; +commands[49].command_line_enum = lvcreate_thinpool_CMD; +commands[49].fn = lvcreate; +commands[49].ro_count = 2; +commands[49].rp_count = 1; +commands[49].oo_count = 37; +commands[49].op_count = 1; +commands[49].desc = "DESC: Create a thin pool."; +commands[49].usage = "lvcreate --type thin-pool --size Number[m|unit] VG" +" [ --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --chunksize Number[k|unit], --discards passdown|nopassdown|ignore, --errorwhenfull y|n, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[49].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[49].required_opt_args[0].opt = type_ARG; +commands[49].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[49].required_opt_args[0].def.str = "thin-pool"; +commands[49].required_opt_args[1].opt = size_ARG; +commands[49].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[49].required_pos_args[0].pos = 1; +commands[49].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[49].optional_opt_args[0].opt = commandprofile_ARG; +commands[49].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[49].optional_opt_args[1].opt = config_ARG; +commands[49].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[49].optional_opt_args[2].opt = debug_ARG; +commands[49].optional_opt_args[3].opt = driverloaded_ARG; +commands[49].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[49].optional_opt_args[4].opt = help_ARG; +commands[49].optional_opt_args[5].opt = profile_ARG; +commands[49].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[49].optional_opt_args[6].opt = quiet_ARG; +commands[49].optional_opt_args[7].opt = verbose_ARG; +commands[49].optional_opt_args[8].opt = version_ARG; +commands[49].optional_opt_args[9].opt = yes_ARG; +commands[49].optional_opt_args[10].opt = poolmetadatasize_ARG; +commands[49].optional_opt_args[10].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[49].optional_opt_args[11].opt = poolmetadataspare_ARG; +commands[49].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[49].optional_opt_args[12].opt = chunksize_ARG; +commands[49].optional_opt_args[12].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[49].optional_opt_args[13].opt = discards_ARG; +commands[49].optional_opt_args[13].def.val_bits = val_enum_to_bit(discards_VAL); +commands[49].optional_opt_args[14].opt = errorwhenfull_ARG; +commands[49].optional_opt_args[14].def.val_bits = val_enum_to_bit(bool_VAL); +commands[49].optional_opt_args[15].opt = addtag_ARG; +commands[49].optional_opt_args[15].def.val_bits = val_enum_to_bit(tag_VAL); +commands[49].optional_opt_args[16].opt = alloc_ARG; +commands[49].optional_opt_args[16].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[49].optional_opt_args[17].opt = autobackup_ARG; +commands[49].optional_opt_args[17].def.val_bits = val_enum_to_bit(bool_VAL); +commands[49].optional_opt_args[18].opt = activate_ARG; +commands[49].optional_opt_args[18].def.val_bits = val_enum_to_bit(activation_VAL); +commands[49].optional_opt_args[19].opt = contiguous_ARG; +commands[49].optional_opt_args[19].def.val_bits = val_enum_to_bit(bool_VAL); +commands[49].optional_opt_args[20].opt = ignoreactivationskip_ARG; +commands[49].optional_opt_args[21].opt = ignoremonitoring_ARG; +commands[49].optional_opt_args[22].opt = major_ARG; +commands[49].optional_opt_args[22].def.val_bits = val_enum_to_bit(number_VAL); +commands[49].optional_opt_args[23].opt = metadataprofile_ARG; +commands[49].optional_opt_args[23].def.val_bits = val_enum_to_bit(string_VAL); +commands[49].optional_opt_args[24].opt = minor_ARG; +commands[49].optional_opt_args[24].def.val_bits = val_enum_to_bit(number_VAL); +commands[49].optional_opt_args[25].opt = monitor_ARG; +commands[49].optional_opt_args[25].def.val_bits = val_enum_to_bit(bool_VAL); +commands[49].optional_opt_args[26].opt = name_ARG; +commands[49].optional_opt_args[26].def.val_bits = val_enum_to_bit(string_VAL); +commands[49].optional_opt_args[27].opt = nosync_ARG; +commands[49].optional_opt_args[28].opt = noudevsync_ARG; +commands[49].optional_opt_args[29].opt = permission_ARG; +commands[49].optional_opt_args[29].def.val_bits = val_enum_to_bit(permission_VAL); +commands[49].optional_opt_args[30].opt = persistent_ARG; +commands[49].optional_opt_args[30].def.val_bits = val_enum_to_bit(bool_VAL); +commands[49].optional_opt_args[31].opt = readahead_ARG; +commands[49].optional_opt_args[31].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[49].optional_opt_args[32].opt = reportformat_ARG; +commands[49].optional_opt_args[32].def.val_bits = val_enum_to_bit(string_VAL); +commands[49].optional_opt_args[33].opt = setactivationskip_ARG; +commands[49].optional_opt_args[33].def.val_bits = val_enum_to_bit(bool_VAL); +commands[49].optional_opt_args[34].opt = test_ARG; +commands[49].optional_opt_args[35].opt = wipesignatures_ARG; +commands[49].optional_opt_args[35].def.val_bits = val_enum_to_bit(bool_VAL); +commands[49].optional_opt_args[36].opt = zero_ARG; +commands[49].optional_opt_args[36].def.val_bits = val_enum_to_bit(bool_VAL); +commands[49].optional_pos_args[0].pos = 2; +commands[49].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[49].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[50].name = "lvcreate"; +commands[50].command_line_id = "lvcreate_thinpool"; +commands[50].command_line_enum = lvcreate_thinpool_CMD; +commands[50].fn = lvcreate; +commands[50].ro_count = 2; +commands[50].rp_count = 1; +commands[50].oo_count = 38; +commands[50].op_count = 1; +commands[50].desc = "DESC: Create a thin pool (variant, infers --type thin-pool)."; +commands[50].usage = "lvcreate --thin --size Number[m|unit] VG" +" [ --type thin-pool, --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --chunksize Number[k|unit], --discards passdown|nopassdown|ignore, --errorwhenfull y|n, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[50].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[50].required_opt_args[0].opt = thin_ARG; +commands[50].required_opt_args[1].opt = size_ARG; +commands[50].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[50].required_pos_args[0].pos = 1; +commands[50].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[50].optional_opt_args[0].opt = commandprofile_ARG; +commands[50].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[50].optional_opt_args[1].opt = config_ARG; +commands[50].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[50].optional_opt_args[2].opt = debug_ARG; +commands[50].optional_opt_args[3].opt = driverloaded_ARG; +commands[50].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[50].optional_opt_args[4].opt = help_ARG; +commands[50].optional_opt_args[5].opt = profile_ARG; +commands[50].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[50].optional_opt_args[6].opt = quiet_ARG; +commands[50].optional_opt_args[7].opt = verbose_ARG; +commands[50].optional_opt_args[8].opt = version_ARG; +commands[50].optional_opt_args[9].opt = yes_ARG; +commands[50].optional_opt_args[10].opt = type_ARG; +commands[50].optional_opt_args[10].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[50].optional_opt_args[10].def.str = "thin-pool"; +commands[50].optional_opt_args[11].opt = poolmetadatasize_ARG; +commands[50].optional_opt_args[11].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[50].optional_opt_args[12].opt = poolmetadataspare_ARG; +commands[50].optional_opt_args[12].def.val_bits = val_enum_to_bit(bool_VAL); +commands[50].optional_opt_args[13].opt = chunksize_ARG; +commands[50].optional_opt_args[13].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[50].optional_opt_args[14].opt = discards_ARG; +commands[50].optional_opt_args[14].def.val_bits = val_enum_to_bit(discards_VAL); +commands[50].optional_opt_args[15].opt = errorwhenfull_ARG; +commands[50].optional_opt_args[15].def.val_bits = val_enum_to_bit(bool_VAL); +commands[50].optional_opt_args[16].opt = addtag_ARG; +commands[50].optional_opt_args[16].def.val_bits = val_enum_to_bit(tag_VAL); +commands[50].optional_opt_args[17].opt = alloc_ARG; +commands[50].optional_opt_args[17].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[50].optional_opt_args[18].opt = autobackup_ARG; +commands[50].optional_opt_args[18].def.val_bits = val_enum_to_bit(bool_VAL); +commands[50].optional_opt_args[19].opt = activate_ARG; +commands[50].optional_opt_args[19].def.val_bits = val_enum_to_bit(activation_VAL); +commands[50].optional_opt_args[20].opt = contiguous_ARG; +commands[50].optional_opt_args[20].def.val_bits = val_enum_to_bit(bool_VAL); +commands[50].optional_opt_args[21].opt = ignoreactivationskip_ARG; +commands[50].optional_opt_args[22].opt = ignoremonitoring_ARG; +commands[50].optional_opt_args[23].opt = major_ARG; +commands[50].optional_opt_args[23].def.val_bits = val_enum_to_bit(number_VAL); +commands[50].optional_opt_args[24].opt = metadataprofile_ARG; +commands[50].optional_opt_args[24].def.val_bits = val_enum_to_bit(string_VAL); +commands[50].optional_opt_args[25].opt = minor_ARG; +commands[50].optional_opt_args[25].def.val_bits = val_enum_to_bit(number_VAL); +commands[50].optional_opt_args[26].opt = monitor_ARG; +commands[50].optional_opt_args[26].def.val_bits = val_enum_to_bit(bool_VAL); +commands[50].optional_opt_args[27].opt = name_ARG; +commands[50].optional_opt_args[27].def.val_bits = val_enum_to_bit(string_VAL); +commands[50].optional_opt_args[28].opt = nosync_ARG; +commands[50].optional_opt_args[29].opt = noudevsync_ARG; +commands[50].optional_opt_args[30].opt = permission_ARG; +commands[50].optional_opt_args[30].def.val_bits = val_enum_to_bit(permission_VAL); +commands[50].optional_opt_args[31].opt = persistent_ARG; +commands[50].optional_opt_args[31].def.val_bits = val_enum_to_bit(bool_VAL); +commands[50].optional_opt_args[32].opt = readahead_ARG; +commands[50].optional_opt_args[32].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[50].optional_opt_args[33].opt = reportformat_ARG; +commands[50].optional_opt_args[33].def.val_bits = val_enum_to_bit(string_VAL); +commands[50].optional_opt_args[34].opt = setactivationskip_ARG; +commands[50].optional_opt_args[34].def.val_bits = val_enum_to_bit(bool_VAL); +commands[50].optional_opt_args[35].opt = test_ARG; +commands[50].optional_opt_args[36].opt = wipesignatures_ARG; +commands[50].optional_opt_args[36].def.val_bits = val_enum_to_bit(bool_VAL); +commands[50].optional_opt_args[37].opt = zero_ARG; +commands[50].optional_opt_args[37].def.val_bits = val_enum_to_bit(bool_VAL); +commands[50].optional_pos_args[0].pos = 2; +commands[50].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[50].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[51].name = "lvcreate"; +commands[51].command_line_id = "lvcreate_cachepool"; +commands[51].command_line_enum = lvcreate_cachepool_CMD; +commands[51].fn = lvcreate; +commands[51].ro_count = 2; +commands[51].rp_count = 1; +commands[51].oo_count = 38; +commands[51].op_count = 1; +commands[51].desc = "DESC: Create a cache pool."; +commands[51].usage = "lvcreate --type cache-pool --size Number[m|unit] VG" +" [ --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --chunksize Number[k|unit], --cachemode writethrough|writeback, --cachepolicy String, --cachesettings String, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[51].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[51].required_opt_args[0].opt = type_ARG; +commands[51].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[51].required_opt_args[0].def.str = "cache-pool"; +commands[51].required_opt_args[1].opt = size_ARG; +commands[51].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[51].required_pos_args[0].pos = 1; +commands[51].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[51].optional_opt_args[0].opt = commandprofile_ARG; +commands[51].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[51].optional_opt_args[1].opt = config_ARG; +commands[51].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[51].optional_opt_args[2].opt = debug_ARG; +commands[51].optional_opt_args[3].opt = driverloaded_ARG; +commands[51].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[51].optional_opt_args[4].opt = help_ARG; +commands[51].optional_opt_args[5].opt = profile_ARG; +commands[51].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[51].optional_opt_args[6].opt = quiet_ARG; +commands[51].optional_opt_args[7].opt = verbose_ARG; +commands[51].optional_opt_args[8].opt = version_ARG; +commands[51].optional_opt_args[9].opt = yes_ARG; +commands[51].optional_opt_args[10].opt = poolmetadatasize_ARG; +commands[51].optional_opt_args[10].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[51].optional_opt_args[11].opt = poolmetadataspare_ARG; +commands[51].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[51].optional_opt_args[12].opt = chunksize_ARG; +commands[51].optional_opt_args[12].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[51].optional_opt_args[13].opt = cachemode_ARG; +commands[51].optional_opt_args[13].def.val_bits = val_enum_to_bit(cachemode_VAL); +commands[51].optional_opt_args[14].opt = cachepolicy_ARG; +commands[51].optional_opt_args[14].def.val_bits = val_enum_to_bit(string_VAL); +commands[51].optional_opt_args[15].opt = cachesettings_ARG; +commands[51].optional_opt_args[15].def.val_bits = val_enum_to_bit(string_VAL); +commands[51].optional_opt_args[16].opt = addtag_ARG; +commands[51].optional_opt_args[16].def.val_bits = val_enum_to_bit(tag_VAL); +commands[51].optional_opt_args[17].opt = alloc_ARG; +commands[51].optional_opt_args[17].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[51].optional_opt_args[18].opt = autobackup_ARG; +commands[51].optional_opt_args[18].def.val_bits = val_enum_to_bit(bool_VAL); +commands[51].optional_opt_args[19].opt = activate_ARG; +commands[51].optional_opt_args[19].def.val_bits = val_enum_to_bit(activation_VAL); +commands[51].optional_opt_args[20].opt = contiguous_ARG; +commands[51].optional_opt_args[20].def.val_bits = val_enum_to_bit(bool_VAL); +commands[51].optional_opt_args[21].opt = ignoreactivationskip_ARG; +commands[51].optional_opt_args[22].opt = ignoremonitoring_ARG; +commands[51].optional_opt_args[23].opt = major_ARG; +commands[51].optional_opt_args[23].def.val_bits = val_enum_to_bit(number_VAL); +commands[51].optional_opt_args[24].opt = metadataprofile_ARG; +commands[51].optional_opt_args[24].def.val_bits = val_enum_to_bit(string_VAL); +commands[51].optional_opt_args[25].opt = minor_ARG; +commands[51].optional_opt_args[25].def.val_bits = val_enum_to_bit(number_VAL); +commands[51].optional_opt_args[26].opt = monitor_ARG; +commands[51].optional_opt_args[26].def.val_bits = val_enum_to_bit(bool_VAL); +commands[51].optional_opt_args[27].opt = name_ARG; +commands[51].optional_opt_args[27].def.val_bits = val_enum_to_bit(string_VAL); +commands[51].optional_opt_args[28].opt = nosync_ARG; +commands[51].optional_opt_args[29].opt = noudevsync_ARG; +commands[51].optional_opt_args[30].opt = permission_ARG; +commands[51].optional_opt_args[30].def.val_bits = val_enum_to_bit(permission_VAL); +commands[51].optional_opt_args[31].opt = persistent_ARG; +commands[51].optional_opt_args[31].def.val_bits = val_enum_to_bit(bool_VAL); +commands[51].optional_opt_args[32].opt = readahead_ARG; +commands[51].optional_opt_args[32].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[51].optional_opt_args[33].opt = reportformat_ARG; +commands[51].optional_opt_args[33].def.val_bits = val_enum_to_bit(string_VAL); +commands[51].optional_opt_args[34].opt = setactivationskip_ARG; +commands[51].optional_opt_args[34].def.val_bits = val_enum_to_bit(bool_VAL); +commands[51].optional_opt_args[35].opt = test_ARG; +commands[51].optional_opt_args[36].opt = wipesignatures_ARG; +commands[51].optional_opt_args[36].def.val_bits = val_enum_to_bit(bool_VAL); +commands[51].optional_opt_args[37].opt = zero_ARG; +commands[51].optional_opt_args[37].def.val_bits = val_enum_to_bit(bool_VAL); +commands[51].optional_pos_args[0].pos = 2; +commands[51].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[51].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[52].name = "lvcreate"; +commands[52].command_line_id = "lvcreate_cachepool"; +commands[52].command_line_enum = lvcreate_cachepool_CMD; +commands[52].fn = lvcreate; +commands[52].ro_count = 2; +commands[52].rp_count = 1; +commands[52].oo_count = 39; +commands[52].op_count = 1; +commands[52].desc = "DESC: Create a cache pool (variant, infers --type cache-pool)."; +commands[52].usage = "lvcreate --cache --size Number[m|unit] VG" +" [ --type cache-pool, --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --chunksize Number[k|unit], --cachemode writethrough|writeback, --cachepolicy String, --cachesettings String, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[52].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[52].required_opt_args[0].opt = cache_ARG; +commands[52].required_opt_args[1].opt = size_ARG; +commands[52].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[52].required_pos_args[0].pos = 1; +commands[52].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[52].optional_opt_args[0].opt = commandprofile_ARG; +commands[52].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[52].optional_opt_args[1].opt = config_ARG; +commands[52].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[52].optional_opt_args[2].opt = debug_ARG; +commands[52].optional_opt_args[3].opt = driverloaded_ARG; +commands[52].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[52].optional_opt_args[4].opt = help_ARG; +commands[52].optional_opt_args[5].opt = profile_ARG; +commands[52].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[52].optional_opt_args[6].opt = quiet_ARG; +commands[52].optional_opt_args[7].opt = verbose_ARG; +commands[52].optional_opt_args[8].opt = version_ARG; +commands[52].optional_opt_args[9].opt = yes_ARG; +commands[52].optional_opt_args[10].opt = type_ARG; +commands[52].optional_opt_args[10].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[52].optional_opt_args[10].def.str = "cache-pool"; +commands[52].optional_opt_args[11].opt = poolmetadatasize_ARG; +commands[52].optional_opt_args[11].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[52].optional_opt_args[12].opt = poolmetadataspare_ARG; +commands[52].optional_opt_args[12].def.val_bits = val_enum_to_bit(bool_VAL); +commands[52].optional_opt_args[13].opt = chunksize_ARG; +commands[52].optional_opt_args[13].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[52].optional_opt_args[14].opt = cachemode_ARG; +commands[52].optional_opt_args[14].def.val_bits = val_enum_to_bit(cachemode_VAL); +commands[52].optional_opt_args[15].opt = cachepolicy_ARG; +commands[52].optional_opt_args[15].def.val_bits = val_enum_to_bit(string_VAL); +commands[52].optional_opt_args[16].opt = cachesettings_ARG; +commands[52].optional_opt_args[16].def.val_bits = val_enum_to_bit(string_VAL); +commands[52].optional_opt_args[17].opt = addtag_ARG; +commands[52].optional_opt_args[17].def.val_bits = val_enum_to_bit(tag_VAL); +commands[52].optional_opt_args[18].opt = alloc_ARG; +commands[52].optional_opt_args[18].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[52].optional_opt_args[19].opt = autobackup_ARG; +commands[52].optional_opt_args[19].def.val_bits = val_enum_to_bit(bool_VAL); +commands[52].optional_opt_args[20].opt = activate_ARG; +commands[52].optional_opt_args[20].def.val_bits = val_enum_to_bit(activation_VAL); +commands[52].optional_opt_args[21].opt = contiguous_ARG; +commands[52].optional_opt_args[21].def.val_bits = val_enum_to_bit(bool_VAL); +commands[52].optional_opt_args[22].opt = ignoreactivationskip_ARG; +commands[52].optional_opt_args[23].opt = ignoremonitoring_ARG; +commands[52].optional_opt_args[24].opt = major_ARG; +commands[52].optional_opt_args[24].def.val_bits = val_enum_to_bit(number_VAL); +commands[52].optional_opt_args[25].opt = metadataprofile_ARG; +commands[52].optional_opt_args[25].def.val_bits = val_enum_to_bit(string_VAL); +commands[52].optional_opt_args[26].opt = minor_ARG; +commands[52].optional_opt_args[26].def.val_bits = val_enum_to_bit(number_VAL); +commands[52].optional_opt_args[27].opt = monitor_ARG; +commands[52].optional_opt_args[27].def.val_bits = val_enum_to_bit(bool_VAL); +commands[52].optional_opt_args[28].opt = name_ARG; +commands[52].optional_opt_args[28].def.val_bits = val_enum_to_bit(string_VAL); +commands[52].optional_opt_args[29].opt = nosync_ARG; +commands[52].optional_opt_args[30].opt = noudevsync_ARG; +commands[52].optional_opt_args[31].opt = permission_ARG; +commands[52].optional_opt_args[31].def.val_bits = val_enum_to_bit(permission_VAL); +commands[52].optional_opt_args[32].opt = persistent_ARG; +commands[52].optional_opt_args[32].def.val_bits = val_enum_to_bit(bool_VAL); +commands[52].optional_opt_args[33].opt = readahead_ARG; +commands[52].optional_opt_args[33].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[52].optional_opt_args[34].opt = reportformat_ARG; +commands[52].optional_opt_args[34].def.val_bits = val_enum_to_bit(string_VAL); +commands[52].optional_opt_args[35].opt = setactivationskip_ARG; +commands[52].optional_opt_args[35].def.val_bits = val_enum_to_bit(bool_VAL); +commands[52].optional_opt_args[36].opt = test_ARG; +commands[52].optional_opt_args[37].opt = wipesignatures_ARG; +commands[52].optional_opt_args[37].def.val_bits = val_enum_to_bit(bool_VAL); +commands[52].optional_opt_args[38].opt = zero_ARG; +commands[52].optional_opt_args[38].def.val_bits = val_enum_to_bit(bool_VAL); +commands[52].optional_pos_args[0].pos = 2; +commands[52].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[52].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[53].name = "lvcreate"; +commands[53].command_line_id = "lvcreate_thin_vol"; +commands[53].command_line_enum = lvcreate_thin_vol_CMD; +commands[53].fn = lvcreate; +commands[53].ro_count = 3; +commands[53].rp_count = 0; +commands[53].oo_count = 38; +commands[53].op_count = 0; +commands[53].desc = "DESC: Create a thin LV in a thin pool."; +commands[53].usage = "lvcreate --type thin --virtualsize Number[m|unit] --thinpool LV_thinpool" +" [ --thin, --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --chunksize Number[k|unit], --discards passdown|nopassdown|ignore, --errorwhenfull y|n, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]"; +commands[53].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[53].required_opt_args[0].opt = type_ARG; +commands[53].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[53].required_opt_args[0].def.str = "thin"; +commands[53].required_opt_args[1].opt = virtualsize_ARG; +commands[53].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[53].required_opt_args[2].opt = thinpool_ARG; +commands[53].required_opt_args[2].def.val_bits = val_enum_to_bit(lv_VAL); +commands[53].required_opt_args[2].def.lv_types = ARG_DEF_LV_THINPOOL; +commands[53].optional_opt_args[0].opt = commandprofile_ARG; +commands[53].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[53].optional_opt_args[1].opt = config_ARG; +commands[53].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[53].optional_opt_args[2].opt = debug_ARG; +commands[53].optional_opt_args[3].opt = driverloaded_ARG; +commands[53].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[53].optional_opt_args[4].opt = help_ARG; +commands[53].optional_opt_args[5].opt = profile_ARG; +commands[53].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[53].optional_opt_args[6].opt = quiet_ARG; +commands[53].optional_opt_args[7].opt = verbose_ARG; +commands[53].optional_opt_args[8].opt = version_ARG; +commands[53].optional_opt_args[9].opt = yes_ARG; +commands[53].optional_opt_args[10].opt = thin_ARG; +commands[53].optional_opt_args[11].opt = poolmetadatasize_ARG; +commands[53].optional_opt_args[11].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[53].optional_opt_args[12].opt = poolmetadataspare_ARG; +commands[53].optional_opt_args[12].def.val_bits = val_enum_to_bit(bool_VAL); +commands[53].optional_opt_args[13].opt = chunksize_ARG; +commands[53].optional_opt_args[13].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[53].optional_opt_args[14].opt = discards_ARG; +commands[53].optional_opt_args[14].def.val_bits = val_enum_to_bit(discards_VAL); +commands[53].optional_opt_args[15].opt = errorwhenfull_ARG; +commands[53].optional_opt_args[15].def.val_bits = val_enum_to_bit(bool_VAL); +commands[53].optional_opt_args[16].opt = addtag_ARG; +commands[53].optional_opt_args[16].def.val_bits = val_enum_to_bit(tag_VAL); +commands[53].optional_opt_args[17].opt = alloc_ARG; +commands[53].optional_opt_args[17].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[53].optional_opt_args[18].opt = autobackup_ARG; +commands[53].optional_opt_args[18].def.val_bits = val_enum_to_bit(bool_VAL); +commands[53].optional_opt_args[19].opt = activate_ARG; +commands[53].optional_opt_args[19].def.val_bits = val_enum_to_bit(activation_VAL); +commands[53].optional_opt_args[20].opt = contiguous_ARG; +commands[53].optional_opt_args[20].def.val_bits = val_enum_to_bit(bool_VAL); +commands[53].optional_opt_args[21].opt = ignoreactivationskip_ARG; +commands[53].optional_opt_args[22].opt = ignoremonitoring_ARG; +commands[53].optional_opt_args[23].opt = major_ARG; +commands[53].optional_opt_args[23].def.val_bits = val_enum_to_bit(number_VAL); +commands[53].optional_opt_args[24].opt = metadataprofile_ARG; +commands[53].optional_opt_args[24].def.val_bits = val_enum_to_bit(string_VAL); +commands[53].optional_opt_args[25].opt = minor_ARG; +commands[53].optional_opt_args[25].def.val_bits = val_enum_to_bit(number_VAL); +commands[53].optional_opt_args[26].opt = monitor_ARG; +commands[53].optional_opt_args[26].def.val_bits = val_enum_to_bit(bool_VAL); +commands[53].optional_opt_args[27].opt = name_ARG; +commands[53].optional_opt_args[27].def.val_bits = val_enum_to_bit(string_VAL); +commands[53].optional_opt_args[28].opt = nosync_ARG; +commands[53].optional_opt_args[29].opt = noudevsync_ARG; +commands[53].optional_opt_args[30].opt = permission_ARG; +commands[53].optional_opt_args[30].def.val_bits = val_enum_to_bit(permission_VAL); +commands[53].optional_opt_args[31].opt = persistent_ARG; +commands[53].optional_opt_args[31].def.val_bits = val_enum_to_bit(bool_VAL); +commands[53].optional_opt_args[32].opt = readahead_ARG; +commands[53].optional_opt_args[32].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[53].optional_opt_args[33].opt = reportformat_ARG; +commands[53].optional_opt_args[33].def.val_bits = val_enum_to_bit(string_VAL); +commands[53].optional_opt_args[34].opt = setactivationskip_ARG; +commands[53].optional_opt_args[34].def.val_bits = val_enum_to_bit(bool_VAL); +commands[53].optional_opt_args[35].opt = test_ARG; +commands[53].optional_opt_args[36].opt = wipesignatures_ARG; +commands[53].optional_opt_args[36].def.val_bits = val_enum_to_bit(bool_VAL); +commands[53].optional_opt_args[37].opt = zero_ARG; +commands[53].optional_opt_args[37].def.val_bits = val_enum_to_bit(bool_VAL); + +commands[54].name = "lvcreate"; +commands[54].command_line_id = "lvcreate_thin_vol"; +commands[54].command_line_enum = lvcreate_thin_vol_CMD; +commands[54].fn = lvcreate; +commands[54].ro_count = 2; +commands[54].rp_count = 0; +commands[54].oo_count = 36; +commands[54].op_count = 0; +commands[54].desc = "DESC: Create a thin LV in a thin pool (variant, infers --type thin)."; +commands[54].usage = "lvcreate --virtualsize Number[m|unit] --thinpool LV_thinpool" +" [ --type thin, --thin, --discards passdown|nopassdown|ignore, --errorwhenfull y|n, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]"; +commands[54].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[54].required_opt_args[0].opt = virtualsize_ARG; +commands[54].required_opt_args[0].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[54].required_opt_args[1].opt = thinpool_ARG; +commands[54].required_opt_args[1].def.val_bits = val_enum_to_bit(lv_VAL); +commands[54].required_opt_args[1].def.lv_types = ARG_DEF_LV_THINPOOL; +commands[54].optional_opt_args[0].opt = commandprofile_ARG; +commands[54].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[54].optional_opt_args[1].opt = config_ARG; +commands[54].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[54].optional_opt_args[2].opt = debug_ARG; +commands[54].optional_opt_args[3].opt = driverloaded_ARG; +commands[54].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[54].optional_opt_args[4].opt = help_ARG; +commands[54].optional_opt_args[5].opt = profile_ARG; +commands[54].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[54].optional_opt_args[6].opt = quiet_ARG; +commands[54].optional_opt_args[7].opt = verbose_ARG; +commands[54].optional_opt_args[8].opt = version_ARG; +commands[54].optional_opt_args[9].opt = yes_ARG; +commands[54].optional_opt_args[10].opt = type_ARG; +commands[54].optional_opt_args[10].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[54].optional_opt_args[10].def.str = "thin"; +commands[54].optional_opt_args[11].opt = thin_ARG; +commands[54].optional_opt_args[12].opt = discards_ARG; +commands[54].optional_opt_args[12].def.val_bits = val_enum_to_bit(discards_VAL); +commands[54].optional_opt_args[13].opt = errorwhenfull_ARG; +commands[54].optional_opt_args[13].def.val_bits = val_enum_to_bit(bool_VAL); +commands[54].optional_opt_args[14].opt = addtag_ARG; +commands[54].optional_opt_args[14].def.val_bits = val_enum_to_bit(tag_VAL); +commands[54].optional_opt_args[15].opt = alloc_ARG; +commands[54].optional_opt_args[15].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[54].optional_opt_args[16].opt = autobackup_ARG; +commands[54].optional_opt_args[16].def.val_bits = val_enum_to_bit(bool_VAL); +commands[54].optional_opt_args[17].opt = activate_ARG; +commands[54].optional_opt_args[17].def.val_bits = val_enum_to_bit(activation_VAL); +commands[54].optional_opt_args[18].opt = contiguous_ARG; +commands[54].optional_opt_args[18].def.val_bits = val_enum_to_bit(bool_VAL); +commands[54].optional_opt_args[19].opt = ignoreactivationskip_ARG; +commands[54].optional_opt_args[20].opt = ignoremonitoring_ARG; +commands[54].optional_opt_args[21].opt = major_ARG; +commands[54].optional_opt_args[21].def.val_bits = val_enum_to_bit(number_VAL); +commands[54].optional_opt_args[22].opt = metadataprofile_ARG; +commands[54].optional_opt_args[22].def.val_bits = val_enum_to_bit(string_VAL); +commands[54].optional_opt_args[23].opt = minor_ARG; +commands[54].optional_opt_args[23].def.val_bits = val_enum_to_bit(number_VAL); +commands[54].optional_opt_args[24].opt = monitor_ARG; +commands[54].optional_opt_args[24].def.val_bits = val_enum_to_bit(bool_VAL); +commands[54].optional_opt_args[25].opt = name_ARG; +commands[54].optional_opt_args[25].def.val_bits = val_enum_to_bit(string_VAL); +commands[54].optional_opt_args[26].opt = nosync_ARG; +commands[54].optional_opt_args[27].opt = noudevsync_ARG; +commands[54].optional_opt_args[28].opt = permission_ARG; +commands[54].optional_opt_args[28].def.val_bits = val_enum_to_bit(permission_VAL); +commands[54].optional_opt_args[29].opt = persistent_ARG; +commands[54].optional_opt_args[29].def.val_bits = val_enum_to_bit(bool_VAL); +commands[54].optional_opt_args[30].opt = readahead_ARG; +commands[54].optional_opt_args[30].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[54].optional_opt_args[31].opt = reportformat_ARG; +commands[54].optional_opt_args[31].def.val_bits = val_enum_to_bit(string_VAL); +commands[54].optional_opt_args[32].opt = setactivationskip_ARG; +commands[54].optional_opt_args[32].def.val_bits = val_enum_to_bit(bool_VAL); +commands[54].optional_opt_args[33].opt = test_ARG; +commands[54].optional_opt_args[34].opt = wipesignatures_ARG; +commands[54].optional_opt_args[34].def.val_bits = val_enum_to_bit(bool_VAL); +commands[54].optional_opt_args[35].opt = zero_ARG; +commands[54].optional_opt_args[35].def.val_bits = val_enum_to_bit(bool_VAL); + +commands[55].name = "lvcreate"; +commands[55].command_line_id = "lvcreate_thin_vol"; +commands[55].command_line_enum = lvcreate_thin_vol_CMD; +commands[55].fn = lvcreate; +commands[55].ro_count = 1; +commands[55].rp_count = 1; +commands[55].oo_count = 36; +commands[55].op_count = 0; +commands[55].desc = "DESC: Create a thin LV in the thin pool named in arg pos 1 DESC: (variant, infers --type thin)."; +commands[55].usage = "lvcreate --virtualsize Number[m|unit] LV_thinpool" +" [ --type thin, --thin, --discards passdown|nopassdown|ignore, --errorwhenfull y|n, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]"; +commands[55].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[55].required_opt_args[0].opt = virtualsize_ARG; +commands[55].required_opt_args[0].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[55].required_pos_args[0].pos = 1; +commands[55].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[55].required_pos_args[0].def.lv_types = ARG_DEF_LV_THINPOOL; +commands[55].optional_opt_args[0].opt = commandprofile_ARG; +commands[55].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[55].optional_opt_args[1].opt = config_ARG; +commands[55].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[55].optional_opt_args[2].opt = debug_ARG; +commands[55].optional_opt_args[3].opt = driverloaded_ARG; +commands[55].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[55].optional_opt_args[4].opt = help_ARG; +commands[55].optional_opt_args[5].opt = profile_ARG; +commands[55].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[55].optional_opt_args[6].opt = quiet_ARG; +commands[55].optional_opt_args[7].opt = verbose_ARG; +commands[55].optional_opt_args[8].opt = version_ARG; +commands[55].optional_opt_args[9].opt = yes_ARG; +commands[55].optional_opt_args[10].opt = type_ARG; +commands[55].optional_opt_args[10].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[55].optional_opt_args[10].def.str = "thin"; +commands[55].optional_opt_args[11].opt = thin_ARG; +commands[55].optional_opt_args[12].opt = discards_ARG; +commands[55].optional_opt_args[12].def.val_bits = val_enum_to_bit(discards_VAL); +commands[55].optional_opt_args[13].opt = errorwhenfull_ARG; +commands[55].optional_opt_args[13].def.val_bits = val_enum_to_bit(bool_VAL); +commands[55].optional_opt_args[14].opt = addtag_ARG; +commands[55].optional_opt_args[14].def.val_bits = val_enum_to_bit(tag_VAL); +commands[55].optional_opt_args[15].opt = alloc_ARG; +commands[55].optional_opt_args[15].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[55].optional_opt_args[16].opt = autobackup_ARG; +commands[55].optional_opt_args[16].def.val_bits = val_enum_to_bit(bool_VAL); +commands[55].optional_opt_args[17].opt = activate_ARG; +commands[55].optional_opt_args[17].def.val_bits = val_enum_to_bit(activation_VAL); +commands[55].optional_opt_args[18].opt = contiguous_ARG; +commands[55].optional_opt_args[18].def.val_bits = val_enum_to_bit(bool_VAL); +commands[55].optional_opt_args[19].opt = ignoreactivationskip_ARG; +commands[55].optional_opt_args[20].opt = ignoremonitoring_ARG; +commands[55].optional_opt_args[21].opt = major_ARG; +commands[55].optional_opt_args[21].def.val_bits = val_enum_to_bit(number_VAL); +commands[55].optional_opt_args[22].opt = metadataprofile_ARG; +commands[55].optional_opt_args[22].def.val_bits = val_enum_to_bit(string_VAL); +commands[55].optional_opt_args[23].opt = minor_ARG; +commands[55].optional_opt_args[23].def.val_bits = val_enum_to_bit(number_VAL); +commands[55].optional_opt_args[24].opt = monitor_ARG; +commands[55].optional_opt_args[24].def.val_bits = val_enum_to_bit(bool_VAL); +commands[55].optional_opt_args[25].opt = name_ARG; +commands[55].optional_opt_args[25].def.val_bits = val_enum_to_bit(string_VAL); +commands[55].optional_opt_args[26].opt = nosync_ARG; +commands[55].optional_opt_args[27].opt = noudevsync_ARG; +commands[55].optional_opt_args[28].opt = permission_ARG; +commands[55].optional_opt_args[28].def.val_bits = val_enum_to_bit(permission_VAL); +commands[55].optional_opt_args[29].opt = persistent_ARG; +commands[55].optional_opt_args[29].def.val_bits = val_enum_to_bit(bool_VAL); +commands[55].optional_opt_args[30].opt = readahead_ARG; +commands[55].optional_opt_args[30].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[55].optional_opt_args[31].opt = reportformat_ARG; +commands[55].optional_opt_args[31].def.val_bits = val_enum_to_bit(string_VAL); +commands[55].optional_opt_args[32].opt = setactivationskip_ARG; +commands[55].optional_opt_args[32].def.val_bits = val_enum_to_bit(bool_VAL); +commands[55].optional_opt_args[33].opt = test_ARG; +commands[55].optional_opt_args[34].opt = wipesignatures_ARG; +commands[55].optional_opt_args[34].def.val_bits = val_enum_to_bit(bool_VAL); +commands[55].optional_opt_args[35].opt = zero_ARG; +commands[55].optional_opt_args[35].def.val_bits = val_enum_to_bit(bool_VAL); + +commands[56].name = "lvcreate"; +commands[56].command_line_id = "lvcreate_thin_snapshot"; +commands[56].command_line_enum = lvcreate_thin_snapshot_CMD; +commands[56].fn = lvcreate; +commands[56].ro_count = 1; +commands[56].rp_count = 1; +commands[56].oo_count = 34; +commands[56].op_count = 0; +commands[56].desc = "DESC: Create a thin LV that is a snapshot of an existing thin LV."; +commands[56].usage = "lvcreate --type thin LV_thin" +" [ --discards passdown|nopassdown|ignore, --errorwhenfull y|n, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]"; +commands[56].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[56].required_opt_args[0].opt = type_ARG; +commands[56].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[56].required_opt_args[0].def.str = "thin"; +commands[56].required_pos_args[0].pos = 1; +commands[56].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[56].required_pos_args[0].def.lv_types = ARG_DEF_LV_THIN; +commands[56].optional_opt_args[0].opt = commandprofile_ARG; +commands[56].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[56].optional_opt_args[1].opt = config_ARG; +commands[56].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[56].optional_opt_args[2].opt = debug_ARG; +commands[56].optional_opt_args[3].opt = driverloaded_ARG; +commands[56].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[56].optional_opt_args[4].opt = help_ARG; +commands[56].optional_opt_args[5].opt = profile_ARG; +commands[56].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[56].optional_opt_args[6].opt = quiet_ARG; +commands[56].optional_opt_args[7].opt = verbose_ARG; +commands[56].optional_opt_args[8].opt = version_ARG; +commands[56].optional_opt_args[9].opt = yes_ARG; +commands[56].optional_opt_args[10].opt = discards_ARG; +commands[56].optional_opt_args[10].def.val_bits = val_enum_to_bit(discards_VAL); +commands[56].optional_opt_args[11].opt = errorwhenfull_ARG; +commands[56].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[56].optional_opt_args[12].opt = addtag_ARG; +commands[56].optional_opt_args[12].def.val_bits = val_enum_to_bit(tag_VAL); +commands[56].optional_opt_args[13].opt = alloc_ARG; +commands[56].optional_opt_args[13].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[56].optional_opt_args[14].opt = autobackup_ARG; +commands[56].optional_opt_args[14].def.val_bits = val_enum_to_bit(bool_VAL); +commands[56].optional_opt_args[15].opt = activate_ARG; +commands[56].optional_opt_args[15].def.val_bits = val_enum_to_bit(activation_VAL); +commands[56].optional_opt_args[16].opt = contiguous_ARG; +commands[56].optional_opt_args[16].def.val_bits = val_enum_to_bit(bool_VAL); +commands[56].optional_opt_args[17].opt = ignoreactivationskip_ARG; +commands[56].optional_opt_args[18].opt = ignoremonitoring_ARG; +commands[56].optional_opt_args[19].opt = major_ARG; +commands[56].optional_opt_args[19].def.val_bits = val_enum_to_bit(number_VAL); +commands[56].optional_opt_args[20].opt = metadataprofile_ARG; +commands[56].optional_opt_args[20].def.val_bits = val_enum_to_bit(string_VAL); +commands[56].optional_opt_args[21].opt = minor_ARG; +commands[56].optional_opt_args[21].def.val_bits = val_enum_to_bit(number_VAL); +commands[56].optional_opt_args[22].opt = monitor_ARG; +commands[56].optional_opt_args[22].def.val_bits = val_enum_to_bit(bool_VAL); +commands[56].optional_opt_args[23].opt = name_ARG; +commands[56].optional_opt_args[23].def.val_bits = val_enum_to_bit(string_VAL); +commands[56].optional_opt_args[24].opt = nosync_ARG; +commands[56].optional_opt_args[25].opt = noudevsync_ARG; +commands[56].optional_opt_args[26].opt = permission_ARG; +commands[56].optional_opt_args[26].def.val_bits = val_enum_to_bit(permission_VAL); +commands[56].optional_opt_args[27].opt = persistent_ARG; +commands[56].optional_opt_args[27].def.val_bits = val_enum_to_bit(bool_VAL); +commands[56].optional_opt_args[28].opt = readahead_ARG; +commands[56].optional_opt_args[28].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[56].optional_opt_args[29].opt = reportformat_ARG; +commands[56].optional_opt_args[29].def.val_bits = val_enum_to_bit(string_VAL); +commands[56].optional_opt_args[30].opt = setactivationskip_ARG; +commands[56].optional_opt_args[30].def.val_bits = val_enum_to_bit(bool_VAL); +commands[56].optional_opt_args[31].opt = test_ARG; +commands[56].optional_opt_args[32].opt = wipesignatures_ARG; +commands[56].optional_opt_args[32].def.val_bits = val_enum_to_bit(bool_VAL); +commands[56].optional_opt_args[33].opt = zero_ARG; +commands[56].optional_opt_args[33].def.val_bits = val_enum_to_bit(bool_VAL); + +commands[57].name = "lvcreate"; +commands[57].command_line_id = "lvcreate_thin_snapshot"; +commands[57].command_line_enum = lvcreate_thin_snapshot_CMD; +commands[57].fn = lvcreate; +commands[57].ro_count = 1; +commands[57].rp_count = 1; +commands[57].oo_count = 35; +commands[57].op_count = 0; +commands[57].desc = "DESC: Create a thin LV that is a snapshot of an existing thin LV DESC: (infers --type thin)."; +commands[57].usage = "lvcreate --snapshot LV_thin" +" [ --type thin, --discards passdown|nopassdown|ignore, --errorwhenfull y|n, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]"; +commands[57].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[57].required_opt_args[0].opt = snapshot_ARG; +commands[57].required_pos_args[0].pos = 1; +commands[57].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[57].required_pos_args[0].def.lv_types = ARG_DEF_LV_THIN; +commands[57].optional_opt_args[0].opt = commandprofile_ARG; +commands[57].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[57].optional_opt_args[1].opt = config_ARG; +commands[57].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[57].optional_opt_args[2].opt = debug_ARG; +commands[57].optional_opt_args[3].opt = driverloaded_ARG; +commands[57].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[57].optional_opt_args[4].opt = help_ARG; +commands[57].optional_opt_args[5].opt = profile_ARG; +commands[57].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[57].optional_opt_args[6].opt = quiet_ARG; +commands[57].optional_opt_args[7].opt = verbose_ARG; +commands[57].optional_opt_args[8].opt = version_ARG; +commands[57].optional_opt_args[9].opt = yes_ARG; +commands[57].optional_opt_args[10].opt = type_ARG; +commands[57].optional_opt_args[10].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[57].optional_opt_args[10].def.str = "thin"; +commands[57].optional_opt_args[11].opt = discards_ARG; +commands[57].optional_opt_args[11].def.val_bits = val_enum_to_bit(discards_VAL); +commands[57].optional_opt_args[12].opt = errorwhenfull_ARG; +commands[57].optional_opt_args[12].def.val_bits = val_enum_to_bit(bool_VAL); +commands[57].optional_opt_args[13].opt = addtag_ARG; +commands[57].optional_opt_args[13].def.val_bits = val_enum_to_bit(tag_VAL); +commands[57].optional_opt_args[14].opt = alloc_ARG; +commands[57].optional_opt_args[14].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[57].optional_opt_args[15].opt = autobackup_ARG; +commands[57].optional_opt_args[15].def.val_bits = val_enum_to_bit(bool_VAL); +commands[57].optional_opt_args[16].opt = activate_ARG; +commands[57].optional_opt_args[16].def.val_bits = val_enum_to_bit(activation_VAL); +commands[57].optional_opt_args[17].opt = contiguous_ARG; +commands[57].optional_opt_args[17].def.val_bits = val_enum_to_bit(bool_VAL); +commands[57].optional_opt_args[18].opt = ignoreactivationskip_ARG; +commands[57].optional_opt_args[19].opt = ignoremonitoring_ARG; +commands[57].optional_opt_args[20].opt = major_ARG; +commands[57].optional_opt_args[20].def.val_bits = val_enum_to_bit(number_VAL); +commands[57].optional_opt_args[21].opt = metadataprofile_ARG; +commands[57].optional_opt_args[21].def.val_bits = val_enum_to_bit(string_VAL); +commands[57].optional_opt_args[22].opt = minor_ARG; +commands[57].optional_opt_args[22].def.val_bits = val_enum_to_bit(number_VAL); +commands[57].optional_opt_args[23].opt = monitor_ARG; +commands[57].optional_opt_args[23].def.val_bits = val_enum_to_bit(bool_VAL); +commands[57].optional_opt_args[24].opt = name_ARG; +commands[57].optional_opt_args[24].def.val_bits = val_enum_to_bit(string_VAL); +commands[57].optional_opt_args[25].opt = nosync_ARG; +commands[57].optional_opt_args[26].opt = noudevsync_ARG; +commands[57].optional_opt_args[27].opt = permission_ARG; +commands[57].optional_opt_args[27].def.val_bits = val_enum_to_bit(permission_VAL); +commands[57].optional_opt_args[28].opt = persistent_ARG; +commands[57].optional_opt_args[28].def.val_bits = val_enum_to_bit(bool_VAL); +commands[57].optional_opt_args[29].opt = readahead_ARG; +commands[57].optional_opt_args[29].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[57].optional_opt_args[30].opt = reportformat_ARG; +commands[57].optional_opt_args[30].def.val_bits = val_enum_to_bit(string_VAL); +commands[57].optional_opt_args[31].opt = setactivationskip_ARG; +commands[57].optional_opt_args[31].def.val_bits = val_enum_to_bit(bool_VAL); +commands[57].optional_opt_args[32].opt = test_ARG; +commands[57].optional_opt_args[33].opt = wipesignatures_ARG; +commands[57].optional_opt_args[33].def.val_bits = val_enum_to_bit(bool_VAL); +commands[57].optional_opt_args[34].opt = zero_ARG; +commands[57].optional_opt_args[34].def.val_bits = val_enum_to_bit(bool_VAL); + +commands[58].name = "lvcreate"; +commands[58].command_line_id = "lvcreate_thin_snapshot_of_external"; +commands[58].command_line_enum = lvcreate_thin_snapshot_of_external_CMD; +commands[58].fn = lvcreate; +commands[58].ro_count = 2; +commands[58].rp_count = 1; +commands[58].oo_count = 37; +commands[58].op_count = 0; +commands[58].desc = "DESC: Create a thin LV that is a snapshot of an external origin LV."; +commands[58].usage = "lvcreate --type thin --thinpool LV_thinpool LV" +" [ --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --chunksize Number[k|unit], --discards passdown|nopassdown|ignore, --errorwhenfull y|n, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]"; +commands[58].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[58].required_opt_args[0].opt = type_ARG; +commands[58].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[58].required_opt_args[0].def.str = "thin"; +commands[58].required_opt_args[1].opt = thinpool_ARG; +commands[58].required_opt_args[1].def.val_bits = val_enum_to_bit(lv_VAL); +commands[58].required_opt_args[1].def.lv_types = ARG_DEF_LV_THINPOOL; +commands[58].required_pos_args[0].pos = 1; +commands[58].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[58].optional_opt_args[0].opt = commandprofile_ARG; +commands[58].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[58].optional_opt_args[1].opt = config_ARG; +commands[58].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[58].optional_opt_args[2].opt = debug_ARG; +commands[58].optional_opt_args[3].opt = driverloaded_ARG; +commands[58].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[58].optional_opt_args[4].opt = help_ARG; +commands[58].optional_opt_args[5].opt = profile_ARG; +commands[58].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[58].optional_opt_args[6].opt = quiet_ARG; +commands[58].optional_opt_args[7].opt = verbose_ARG; +commands[58].optional_opt_args[8].opt = version_ARG; +commands[58].optional_opt_args[9].opt = yes_ARG; +commands[58].optional_opt_args[10].opt = poolmetadatasize_ARG; +commands[58].optional_opt_args[10].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[58].optional_opt_args[11].opt = poolmetadataspare_ARG; +commands[58].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[58].optional_opt_args[12].opt = chunksize_ARG; +commands[58].optional_opt_args[12].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[58].optional_opt_args[13].opt = discards_ARG; +commands[58].optional_opt_args[13].def.val_bits = val_enum_to_bit(discards_VAL); +commands[58].optional_opt_args[14].opt = errorwhenfull_ARG; +commands[58].optional_opt_args[14].def.val_bits = val_enum_to_bit(bool_VAL); +commands[58].optional_opt_args[15].opt = addtag_ARG; +commands[58].optional_opt_args[15].def.val_bits = val_enum_to_bit(tag_VAL); +commands[58].optional_opt_args[16].opt = alloc_ARG; +commands[58].optional_opt_args[16].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[58].optional_opt_args[17].opt = autobackup_ARG; +commands[58].optional_opt_args[17].def.val_bits = val_enum_to_bit(bool_VAL); +commands[58].optional_opt_args[18].opt = activate_ARG; +commands[58].optional_opt_args[18].def.val_bits = val_enum_to_bit(activation_VAL); +commands[58].optional_opt_args[19].opt = contiguous_ARG; +commands[58].optional_opt_args[19].def.val_bits = val_enum_to_bit(bool_VAL); +commands[58].optional_opt_args[20].opt = ignoreactivationskip_ARG; +commands[58].optional_opt_args[21].opt = ignoremonitoring_ARG; +commands[58].optional_opt_args[22].opt = major_ARG; +commands[58].optional_opt_args[22].def.val_bits = val_enum_to_bit(number_VAL); +commands[58].optional_opt_args[23].opt = metadataprofile_ARG; +commands[58].optional_opt_args[23].def.val_bits = val_enum_to_bit(string_VAL); +commands[58].optional_opt_args[24].opt = minor_ARG; +commands[58].optional_opt_args[24].def.val_bits = val_enum_to_bit(number_VAL); +commands[58].optional_opt_args[25].opt = monitor_ARG; +commands[58].optional_opt_args[25].def.val_bits = val_enum_to_bit(bool_VAL); +commands[58].optional_opt_args[26].opt = name_ARG; +commands[58].optional_opt_args[26].def.val_bits = val_enum_to_bit(string_VAL); +commands[58].optional_opt_args[27].opt = nosync_ARG; +commands[58].optional_opt_args[28].opt = noudevsync_ARG; +commands[58].optional_opt_args[29].opt = permission_ARG; +commands[58].optional_opt_args[29].def.val_bits = val_enum_to_bit(permission_VAL); +commands[58].optional_opt_args[30].opt = persistent_ARG; +commands[58].optional_opt_args[30].def.val_bits = val_enum_to_bit(bool_VAL); +commands[58].optional_opt_args[31].opt = readahead_ARG; +commands[58].optional_opt_args[31].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[58].optional_opt_args[32].opt = reportformat_ARG; +commands[58].optional_opt_args[32].def.val_bits = val_enum_to_bit(string_VAL); +commands[58].optional_opt_args[33].opt = setactivationskip_ARG; +commands[58].optional_opt_args[33].def.val_bits = val_enum_to_bit(bool_VAL); +commands[58].optional_opt_args[34].opt = test_ARG; +commands[58].optional_opt_args[35].opt = wipesignatures_ARG; +commands[58].optional_opt_args[35].def.val_bits = val_enum_to_bit(bool_VAL); +commands[58].optional_opt_args[36].opt = zero_ARG; +commands[58].optional_opt_args[36].def.val_bits = val_enum_to_bit(bool_VAL); + +commands[59].name = "lvcreate"; +commands[59].command_line_id = "lvcreate_thin_snapshot_of_external"; +commands[59].command_line_enum = lvcreate_thin_snapshot_of_external_CMD; +commands[59].fn = lvcreate; +commands[59].ro_count = 2; +commands[59].rp_count = 1; +commands[59].oo_count = 35; +commands[59].op_count = 0; +commands[59].desc = "DESC: Create a thin LV that is a snapshot of an external origin LV DESC: (infers --type thin)."; +commands[59].usage = "lvcreate --snapshot --thinpool LV_thinpool LV" +" [ --type thin, --discards passdown|nopassdown|ignore, --errorwhenfull y|n, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]"; +commands[59].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[59].required_opt_args[0].opt = snapshot_ARG; +commands[59].required_opt_args[1].opt = thinpool_ARG; +commands[59].required_opt_args[1].def.val_bits = val_enum_to_bit(lv_VAL); +commands[59].required_opt_args[1].def.lv_types = ARG_DEF_LV_THINPOOL; +commands[59].required_pos_args[0].pos = 1; +commands[59].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[59].optional_opt_args[0].opt = commandprofile_ARG; +commands[59].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[59].optional_opt_args[1].opt = config_ARG; +commands[59].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[59].optional_opt_args[2].opt = debug_ARG; +commands[59].optional_opt_args[3].opt = driverloaded_ARG; +commands[59].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[59].optional_opt_args[4].opt = help_ARG; +commands[59].optional_opt_args[5].opt = profile_ARG; +commands[59].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[59].optional_opt_args[6].opt = quiet_ARG; +commands[59].optional_opt_args[7].opt = verbose_ARG; +commands[59].optional_opt_args[8].opt = version_ARG; +commands[59].optional_opt_args[9].opt = yes_ARG; +commands[59].optional_opt_args[10].opt = type_ARG; +commands[59].optional_opt_args[10].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[59].optional_opt_args[10].def.str = "thin"; +commands[59].optional_opt_args[11].opt = discards_ARG; +commands[59].optional_opt_args[11].def.val_bits = val_enum_to_bit(discards_VAL); +commands[59].optional_opt_args[12].opt = errorwhenfull_ARG; +commands[59].optional_opt_args[12].def.val_bits = val_enum_to_bit(bool_VAL); +commands[59].optional_opt_args[13].opt = addtag_ARG; +commands[59].optional_opt_args[13].def.val_bits = val_enum_to_bit(tag_VAL); +commands[59].optional_opt_args[14].opt = alloc_ARG; +commands[59].optional_opt_args[14].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[59].optional_opt_args[15].opt = autobackup_ARG; +commands[59].optional_opt_args[15].def.val_bits = val_enum_to_bit(bool_VAL); +commands[59].optional_opt_args[16].opt = activate_ARG; +commands[59].optional_opt_args[16].def.val_bits = val_enum_to_bit(activation_VAL); +commands[59].optional_opt_args[17].opt = contiguous_ARG; +commands[59].optional_opt_args[17].def.val_bits = val_enum_to_bit(bool_VAL); +commands[59].optional_opt_args[18].opt = ignoreactivationskip_ARG; +commands[59].optional_opt_args[19].opt = ignoremonitoring_ARG; +commands[59].optional_opt_args[20].opt = major_ARG; +commands[59].optional_opt_args[20].def.val_bits = val_enum_to_bit(number_VAL); +commands[59].optional_opt_args[21].opt = metadataprofile_ARG; +commands[59].optional_opt_args[21].def.val_bits = val_enum_to_bit(string_VAL); +commands[59].optional_opt_args[22].opt = minor_ARG; +commands[59].optional_opt_args[22].def.val_bits = val_enum_to_bit(number_VAL); +commands[59].optional_opt_args[23].opt = monitor_ARG; +commands[59].optional_opt_args[23].def.val_bits = val_enum_to_bit(bool_VAL); +commands[59].optional_opt_args[24].opt = name_ARG; +commands[59].optional_opt_args[24].def.val_bits = val_enum_to_bit(string_VAL); +commands[59].optional_opt_args[25].opt = nosync_ARG; +commands[59].optional_opt_args[26].opt = noudevsync_ARG; +commands[59].optional_opt_args[27].opt = permission_ARG; +commands[59].optional_opt_args[27].def.val_bits = val_enum_to_bit(permission_VAL); +commands[59].optional_opt_args[28].opt = persistent_ARG; +commands[59].optional_opt_args[28].def.val_bits = val_enum_to_bit(bool_VAL); +commands[59].optional_opt_args[29].opt = readahead_ARG; +commands[59].optional_opt_args[29].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[59].optional_opt_args[30].opt = reportformat_ARG; +commands[59].optional_opt_args[30].def.val_bits = val_enum_to_bit(string_VAL); +commands[59].optional_opt_args[31].opt = setactivationskip_ARG; +commands[59].optional_opt_args[31].def.val_bits = val_enum_to_bit(bool_VAL); +commands[59].optional_opt_args[32].opt = test_ARG; +commands[59].optional_opt_args[33].opt = wipesignatures_ARG; +commands[59].optional_opt_args[33].def.val_bits = val_enum_to_bit(bool_VAL); +commands[59].optional_opt_args[34].opt = zero_ARG; +commands[59].optional_opt_args[34].def.val_bits = val_enum_to_bit(bool_VAL); + +commands[60].name = "lvcreate"; +commands[60].command_line_id = "lvcreate_thin_vol_with_thinpool"; +commands[60].command_line_enum = lvcreate_thin_vol_with_thinpool_CMD; +commands[60].fn = lvcreate; +commands[60].ro_count = 4; +commands[60].rp_count = 0; +commands[60].oo_count = 37; +commands[60].op_count = 1; +commands[60].desc = "DESC: Create a thin LV, first creating a thin pool for it, DESC: where the new thin pool is named by the --thinpool arg."; +commands[60].usage = "lvcreate --type thin --virtualsize Number[m|unit] --size Number[m|unit] --thinpool LV_new" +" [ --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --chunksize Number[k|unit], --discards passdown|nopassdown|ignore, --errorwhenfull y|n, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[60].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[60].required_opt_args[0].opt = type_ARG; +commands[60].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[60].required_opt_args[0].def.str = "thin"; +commands[60].required_opt_args[1].opt = virtualsize_ARG; +commands[60].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[60].required_opt_args[2].opt = size_ARG; +commands[60].required_opt_args[2].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[60].required_opt_args[3].opt = thinpool_ARG; +commands[60].required_opt_args[3].def.val_bits = val_enum_to_bit(lv_VAL); +commands[60].required_opt_args[3].def.flags = ARG_DEF_FLAG_NEW; +commands[60].optional_opt_args[0].opt = commandprofile_ARG; +commands[60].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[60].optional_opt_args[1].opt = config_ARG; +commands[60].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[60].optional_opt_args[2].opt = debug_ARG; +commands[60].optional_opt_args[3].opt = driverloaded_ARG; +commands[60].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[60].optional_opt_args[4].opt = help_ARG; +commands[60].optional_opt_args[5].opt = profile_ARG; +commands[60].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[60].optional_opt_args[6].opt = quiet_ARG; +commands[60].optional_opt_args[7].opt = verbose_ARG; +commands[60].optional_opt_args[8].opt = version_ARG; +commands[60].optional_opt_args[9].opt = yes_ARG; +commands[60].optional_opt_args[10].opt = poolmetadatasize_ARG; +commands[60].optional_opt_args[10].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[60].optional_opt_args[11].opt = poolmetadataspare_ARG; +commands[60].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[60].optional_opt_args[12].opt = chunksize_ARG; +commands[60].optional_opt_args[12].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[60].optional_opt_args[13].opt = discards_ARG; +commands[60].optional_opt_args[13].def.val_bits = val_enum_to_bit(discards_VAL); +commands[60].optional_opt_args[14].opt = errorwhenfull_ARG; +commands[60].optional_opt_args[14].def.val_bits = val_enum_to_bit(bool_VAL); +commands[60].optional_opt_args[15].opt = addtag_ARG; +commands[60].optional_opt_args[15].def.val_bits = val_enum_to_bit(tag_VAL); +commands[60].optional_opt_args[16].opt = alloc_ARG; +commands[60].optional_opt_args[16].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[60].optional_opt_args[17].opt = autobackup_ARG; +commands[60].optional_opt_args[17].def.val_bits = val_enum_to_bit(bool_VAL); +commands[60].optional_opt_args[18].opt = activate_ARG; +commands[60].optional_opt_args[18].def.val_bits = val_enum_to_bit(activation_VAL); +commands[60].optional_opt_args[19].opt = contiguous_ARG; +commands[60].optional_opt_args[19].def.val_bits = val_enum_to_bit(bool_VAL); +commands[60].optional_opt_args[20].opt = ignoreactivationskip_ARG; +commands[60].optional_opt_args[21].opt = ignoremonitoring_ARG; +commands[60].optional_opt_args[22].opt = major_ARG; +commands[60].optional_opt_args[22].def.val_bits = val_enum_to_bit(number_VAL); +commands[60].optional_opt_args[23].opt = metadataprofile_ARG; +commands[60].optional_opt_args[23].def.val_bits = val_enum_to_bit(string_VAL); +commands[60].optional_opt_args[24].opt = minor_ARG; +commands[60].optional_opt_args[24].def.val_bits = val_enum_to_bit(number_VAL); +commands[60].optional_opt_args[25].opt = monitor_ARG; +commands[60].optional_opt_args[25].def.val_bits = val_enum_to_bit(bool_VAL); +commands[60].optional_opt_args[26].opt = name_ARG; +commands[60].optional_opt_args[26].def.val_bits = val_enum_to_bit(string_VAL); +commands[60].optional_opt_args[27].opt = nosync_ARG; +commands[60].optional_opt_args[28].opt = noudevsync_ARG; +commands[60].optional_opt_args[29].opt = permission_ARG; +commands[60].optional_opt_args[29].def.val_bits = val_enum_to_bit(permission_VAL); +commands[60].optional_opt_args[30].opt = persistent_ARG; +commands[60].optional_opt_args[30].def.val_bits = val_enum_to_bit(bool_VAL); +commands[60].optional_opt_args[31].opt = readahead_ARG; +commands[60].optional_opt_args[31].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[60].optional_opt_args[32].opt = reportformat_ARG; +commands[60].optional_opt_args[32].def.val_bits = val_enum_to_bit(string_VAL); +commands[60].optional_opt_args[33].opt = setactivationskip_ARG; +commands[60].optional_opt_args[33].def.val_bits = val_enum_to_bit(bool_VAL); +commands[60].optional_opt_args[34].opt = test_ARG; +commands[60].optional_opt_args[35].opt = wipesignatures_ARG; +commands[60].optional_opt_args[35].def.val_bits = val_enum_to_bit(bool_VAL); +commands[60].optional_opt_args[36].opt = zero_ARG; +commands[60].optional_opt_args[36].def.val_bits = val_enum_to_bit(bool_VAL); +commands[60].optional_pos_args[0].pos = 1; +commands[60].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[60].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[61].name = "lvcreate"; +commands[61].command_line_id = "lvcreate_thin_vol_with_thinpool"; +commands[61].command_line_enum = lvcreate_thin_vol_with_thinpool_CMD; +commands[61].fn = lvcreate; +commands[61].ro_count = 4; +commands[61].rp_count = 0; +commands[61].oo_count = 38; +commands[61].op_count = 1; +commands[61].desc = "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)."; +commands[61].usage = "lvcreate --thin --virtualsize Number[m|unit] --size Number[m|unit] --thinpool LV_new" +" [ --type thin, --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --chunksize Number[k|unit], --discards passdown|nopassdown|ignore, --errorwhenfull y|n, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[61].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[61].required_opt_args[0].opt = thin_ARG; +commands[61].required_opt_args[1].opt = virtualsize_ARG; +commands[61].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[61].required_opt_args[2].opt = size_ARG; +commands[61].required_opt_args[2].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[61].required_opt_args[3].opt = thinpool_ARG; +commands[61].required_opt_args[3].def.val_bits = val_enum_to_bit(lv_VAL); +commands[61].required_opt_args[3].def.flags = ARG_DEF_FLAG_NEW; +commands[61].optional_opt_args[0].opt = commandprofile_ARG; +commands[61].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[61].optional_opt_args[1].opt = config_ARG; +commands[61].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[61].optional_opt_args[2].opt = debug_ARG; +commands[61].optional_opt_args[3].opt = driverloaded_ARG; +commands[61].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[61].optional_opt_args[4].opt = help_ARG; +commands[61].optional_opt_args[5].opt = profile_ARG; +commands[61].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[61].optional_opt_args[6].opt = quiet_ARG; +commands[61].optional_opt_args[7].opt = verbose_ARG; +commands[61].optional_opt_args[8].opt = version_ARG; +commands[61].optional_opt_args[9].opt = yes_ARG; +commands[61].optional_opt_args[10].opt = type_ARG; +commands[61].optional_opt_args[10].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[61].optional_opt_args[10].def.str = "thin"; +commands[61].optional_opt_args[11].opt = poolmetadatasize_ARG; +commands[61].optional_opt_args[11].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[61].optional_opt_args[12].opt = poolmetadataspare_ARG; +commands[61].optional_opt_args[12].def.val_bits = val_enum_to_bit(bool_VAL); +commands[61].optional_opt_args[13].opt = chunksize_ARG; +commands[61].optional_opt_args[13].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[61].optional_opt_args[14].opt = discards_ARG; +commands[61].optional_opt_args[14].def.val_bits = val_enum_to_bit(discards_VAL); +commands[61].optional_opt_args[15].opt = errorwhenfull_ARG; +commands[61].optional_opt_args[15].def.val_bits = val_enum_to_bit(bool_VAL); +commands[61].optional_opt_args[16].opt = addtag_ARG; +commands[61].optional_opt_args[16].def.val_bits = val_enum_to_bit(tag_VAL); +commands[61].optional_opt_args[17].opt = alloc_ARG; +commands[61].optional_opt_args[17].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[61].optional_opt_args[18].opt = autobackup_ARG; +commands[61].optional_opt_args[18].def.val_bits = val_enum_to_bit(bool_VAL); +commands[61].optional_opt_args[19].opt = activate_ARG; +commands[61].optional_opt_args[19].def.val_bits = val_enum_to_bit(activation_VAL); +commands[61].optional_opt_args[20].opt = contiguous_ARG; +commands[61].optional_opt_args[20].def.val_bits = val_enum_to_bit(bool_VAL); +commands[61].optional_opt_args[21].opt = ignoreactivationskip_ARG; +commands[61].optional_opt_args[22].opt = ignoremonitoring_ARG; +commands[61].optional_opt_args[23].opt = major_ARG; +commands[61].optional_opt_args[23].def.val_bits = val_enum_to_bit(number_VAL); +commands[61].optional_opt_args[24].opt = metadataprofile_ARG; +commands[61].optional_opt_args[24].def.val_bits = val_enum_to_bit(string_VAL); +commands[61].optional_opt_args[25].opt = minor_ARG; +commands[61].optional_opt_args[25].def.val_bits = val_enum_to_bit(number_VAL); +commands[61].optional_opt_args[26].opt = monitor_ARG; +commands[61].optional_opt_args[26].def.val_bits = val_enum_to_bit(bool_VAL); +commands[61].optional_opt_args[27].opt = name_ARG; +commands[61].optional_opt_args[27].def.val_bits = val_enum_to_bit(string_VAL); +commands[61].optional_opt_args[28].opt = nosync_ARG; +commands[61].optional_opt_args[29].opt = noudevsync_ARG; +commands[61].optional_opt_args[30].opt = permission_ARG; +commands[61].optional_opt_args[30].def.val_bits = val_enum_to_bit(permission_VAL); +commands[61].optional_opt_args[31].opt = persistent_ARG; +commands[61].optional_opt_args[31].def.val_bits = val_enum_to_bit(bool_VAL); +commands[61].optional_opt_args[32].opt = readahead_ARG; +commands[61].optional_opt_args[32].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[61].optional_opt_args[33].opt = reportformat_ARG; +commands[61].optional_opt_args[33].def.val_bits = val_enum_to_bit(string_VAL); +commands[61].optional_opt_args[34].opt = setactivationskip_ARG; +commands[61].optional_opt_args[34].def.val_bits = val_enum_to_bit(bool_VAL); +commands[61].optional_opt_args[35].opt = test_ARG; +commands[61].optional_opt_args[36].opt = wipesignatures_ARG; +commands[61].optional_opt_args[36].def.val_bits = val_enum_to_bit(bool_VAL); +commands[61].optional_opt_args[37].opt = zero_ARG; +commands[61].optional_opt_args[37].def.val_bits = val_enum_to_bit(bool_VAL); +commands[61].optional_pos_args[0].pos = 1; +commands[61].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[61].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[62].name = "lvcreate"; +commands[62].command_line_id = "lvcreate_thin_vol_with_thinpool"; +commands[62].command_line_enum = lvcreate_thin_vol_with_thinpool_CMD; +commands[62].fn = lvcreate; +commands[62].ro_count = 3; +commands[62].rp_count = 1; +commands[62].oo_count = 37; +commands[62].op_count = 1; +commands[62].desc = "DESC: Create a thin LV, first creating a thin pool for it, DESC: where the new thin pool is named in arg pos 1."; +commands[62].usage = "lvcreate --type thin --virtualsize Number[m|unit] --size Number[m|unit] LV_new" +" [ --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --chunksize Number[k|unit], --discards passdown|nopassdown|ignore, --errorwhenfull y|n, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[62].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[62].required_opt_args[0].opt = type_ARG; +commands[62].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[62].required_opt_args[0].def.str = "thin"; +commands[62].required_opt_args[1].opt = virtualsize_ARG; +commands[62].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[62].required_opt_args[2].opt = size_ARG; +commands[62].required_opt_args[2].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[62].required_pos_args[0].pos = 1; +commands[62].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[62].required_pos_args[0].def.flags = ARG_DEF_FLAG_NEW; +commands[62].optional_opt_args[0].opt = commandprofile_ARG; +commands[62].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[62].optional_opt_args[1].opt = config_ARG; +commands[62].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[62].optional_opt_args[2].opt = debug_ARG; +commands[62].optional_opt_args[3].opt = driverloaded_ARG; +commands[62].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[62].optional_opt_args[4].opt = help_ARG; +commands[62].optional_opt_args[5].opt = profile_ARG; +commands[62].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[62].optional_opt_args[6].opt = quiet_ARG; +commands[62].optional_opt_args[7].opt = verbose_ARG; +commands[62].optional_opt_args[8].opt = version_ARG; +commands[62].optional_opt_args[9].opt = yes_ARG; +commands[62].optional_opt_args[10].opt = poolmetadatasize_ARG; +commands[62].optional_opt_args[10].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[62].optional_opt_args[11].opt = poolmetadataspare_ARG; +commands[62].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[62].optional_opt_args[12].opt = chunksize_ARG; +commands[62].optional_opt_args[12].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[62].optional_opt_args[13].opt = discards_ARG; +commands[62].optional_opt_args[13].def.val_bits = val_enum_to_bit(discards_VAL); +commands[62].optional_opt_args[14].opt = errorwhenfull_ARG; +commands[62].optional_opt_args[14].def.val_bits = val_enum_to_bit(bool_VAL); +commands[62].optional_opt_args[15].opt = addtag_ARG; +commands[62].optional_opt_args[15].def.val_bits = val_enum_to_bit(tag_VAL); +commands[62].optional_opt_args[16].opt = alloc_ARG; +commands[62].optional_opt_args[16].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[62].optional_opt_args[17].opt = autobackup_ARG; +commands[62].optional_opt_args[17].def.val_bits = val_enum_to_bit(bool_VAL); +commands[62].optional_opt_args[18].opt = activate_ARG; +commands[62].optional_opt_args[18].def.val_bits = val_enum_to_bit(activation_VAL); +commands[62].optional_opt_args[19].opt = contiguous_ARG; +commands[62].optional_opt_args[19].def.val_bits = val_enum_to_bit(bool_VAL); +commands[62].optional_opt_args[20].opt = ignoreactivationskip_ARG; +commands[62].optional_opt_args[21].opt = ignoremonitoring_ARG; +commands[62].optional_opt_args[22].opt = major_ARG; +commands[62].optional_opt_args[22].def.val_bits = val_enum_to_bit(number_VAL); +commands[62].optional_opt_args[23].opt = metadataprofile_ARG; +commands[62].optional_opt_args[23].def.val_bits = val_enum_to_bit(string_VAL); +commands[62].optional_opt_args[24].opt = minor_ARG; +commands[62].optional_opt_args[24].def.val_bits = val_enum_to_bit(number_VAL); +commands[62].optional_opt_args[25].opt = monitor_ARG; +commands[62].optional_opt_args[25].def.val_bits = val_enum_to_bit(bool_VAL); +commands[62].optional_opt_args[26].opt = name_ARG; +commands[62].optional_opt_args[26].def.val_bits = val_enum_to_bit(string_VAL); +commands[62].optional_opt_args[27].opt = nosync_ARG; +commands[62].optional_opt_args[28].opt = noudevsync_ARG; +commands[62].optional_opt_args[29].opt = permission_ARG; +commands[62].optional_opt_args[29].def.val_bits = val_enum_to_bit(permission_VAL); +commands[62].optional_opt_args[30].opt = persistent_ARG; +commands[62].optional_opt_args[30].def.val_bits = val_enum_to_bit(bool_VAL); +commands[62].optional_opt_args[31].opt = readahead_ARG; +commands[62].optional_opt_args[31].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[62].optional_opt_args[32].opt = reportformat_ARG; +commands[62].optional_opt_args[32].def.val_bits = val_enum_to_bit(string_VAL); +commands[62].optional_opt_args[33].opt = setactivationskip_ARG; +commands[62].optional_opt_args[33].def.val_bits = val_enum_to_bit(bool_VAL); +commands[62].optional_opt_args[34].opt = test_ARG; +commands[62].optional_opt_args[35].opt = wipesignatures_ARG; +commands[62].optional_opt_args[35].def.val_bits = val_enum_to_bit(bool_VAL); +commands[62].optional_opt_args[36].opt = zero_ARG; +commands[62].optional_opt_args[36].def.val_bits = val_enum_to_bit(bool_VAL); +commands[62].optional_pos_args[0].pos = 2; +commands[62].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[62].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[63].name = "lvcreate"; +commands[63].command_line_id = "lvcreate_thin_vol_with_thinpool"; +commands[63].command_line_enum = lvcreate_thin_vol_with_thinpool_CMD; +commands[63].fn = lvcreate; +commands[63].ro_count = 3; +commands[63].rp_count = 1; +commands[63].oo_count = 38; +commands[63].op_count = 1; +commands[63].desc = "DESC: Create a thin LV, first creating a thin pool for it, DESC: where the new thin pool is named in arg pos 1, DESC: (variant, infers --type thin)."; +commands[63].usage = "lvcreate --thin --virtualsize Number[m|unit] --size Number[m|unit] LV_new" +" [ --type thin, --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --chunksize Number[k|unit], --discards passdown|nopassdown|ignore, --errorwhenfull y|n, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[63].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[63].required_opt_args[0].opt = thin_ARG; +commands[63].required_opt_args[1].opt = virtualsize_ARG; +commands[63].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[63].required_opt_args[2].opt = size_ARG; +commands[63].required_opt_args[2].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[63].required_pos_args[0].pos = 1; +commands[63].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[63].required_pos_args[0].def.flags = ARG_DEF_FLAG_NEW; +commands[63].optional_opt_args[0].opt = commandprofile_ARG; +commands[63].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[63].optional_opt_args[1].opt = config_ARG; +commands[63].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[63].optional_opt_args[2].opt = debug_ARG; +commands[63].optional_opt_args[3].opt = driverloaded_ARG; +commands[63].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[63].optional_opt_args[4].opt = help_ARG; +commands[63].optional_opt_args[5].opt = profile_ARG; +commands[63].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[63].optional_opt_args[6].opt = quiet_ARG; +commands[63].optional_opt_args[7].opt = verbose_ARG; +commands[63].optional_opt_args[8].opt = version_ARG; +commands[63].optional_opt_args[9].opt = yes_ARG; +commands[63].optional_opt_args[10].opt = type_ARG; +commands[63].optional_opt_args[10].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[63].optional_opt_args[10].def.str = "thin"; +commands[63].optional_opt_args[11].opt = poolmetadatasize_ARG; +commands[63].optional_opt_args[11].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[63].optional_opt_args[12].opt = poolmetadataspare_ARG; +commands[63].optional_opt_args[12].def.val_bits = val_enum_to_bit(bool_VAL); +commands[63].optional_opt_args[13].opt = chunksize_ARG; +commands[63].optional_opt_args[13].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[63].optional_opt_args[14].opt = discards_ARG; +commands[63].optional_opt_args[14].def.val_bits = val_enum_to_bit(discards_VAL); +commands[63].optional_opt_args[15].opt = errorwhenfull_ARG; +commands[63].optional_opt_args[15].def.val_bits = val_enum_to_bit(bool_VAL); +commands[63].optional_opt_args[16].opt = addtag_ARG; +commands[63].optional_opt_args[16].def.val_bits = val_enum_to_bit(tag_VAL); +commands[63].optional_opt_args[17].opt = alloc_ARG; +commands[63].optional_opt_args[17].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[63].optional_opt_args[18].opt = autobackup_ARG; +commands[63].optional_opt_args[18].def.val_bits = val_enum_to_bit(bool_VAL); +commands[63].optional_opt_args[19].opt = activate_ARG; +commands[63].optional_opt_args[19].def.val_bits = val_enum_to_bit(activation_VAL); +commands[63].optional_opt_args[20].opt = contiguous_ARG; +commands[63].optional_opt_args[20].def.val_bits = val_enum_to_bit(bool_VAL); +commands[63].optional_opt_args[21].opt = ignoreactivationskip_ARG; +commands[63].optional_opt_args[22].opt = ignoremonitoring_ARG; +commands[63].optional_opt_args[23].opt = major_ARG; +commands[63].optional_opt_args[23].def.val_bits = val_enum_to_bit(number_VAL); +commands[63].optional_opt_args[24].opt = metadataprofile_ARG; +commands[63].optional_opt_args[24].def.val_bits = val_enum_to_bit(string_VAL); +commands[63].optional_opt_args[25].opt = minor_ARG; +commands[63].optional_opt_args[25].def.val_bits = val_enum_to_bit(number_VAL); +commands[63].optional_opt_args[26].opt = monitor_ARG; +commands[63].optional_opt_args[26].def.val_bits = val_enum_to_bit(bool_VAL); +commands[63].optional_opt_args[27].opt = name_ARG; +commands[63].optional_opt_args[27].def.val_bits = val_enum_to_bit(string_VAL); +commands[63].optional_opt_args[28].opt = nosync_ARG; +commands[63].optional_opt_args[29].opt = noudevsync_ARG; +commands[63].optional_opt_args[30].opt = permission_ARG; +commands[63].optional_opt_args[30].def.val_bits = val_enum_to_bit(permission_VAL); +commands[63].optional_opt_args[31].opt = persistent_ARG; +commands[63].optional_opt_args[31].def.val_bits = val_enum_to_bit(bool_VAL); +commands[63].optional_opt_args[32].opt = readahead_ARG; +commands[63].optional_opt_args[32].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[63].optional_opt_args[33].opt = reportformat_ARG; +commands[63].optional_opt_args[33].def.val_bits = val_enum_to_bit(string_VAL); +commands[63].optional_opt_args[34].opt = setactivationskip_ARG; +commands[63].optional_opt_args[34].def.val_bits = val_enum_to_bit(bool_VAL); +commands[63].optional_opt_args[35].opt = test_ARG; +commands[63].optional_opt_args[36].opt = wipesignatures_ARG; +commands[63].optional_opt_args[36].def.val_bits = val_enum_to_bit(bool_VAL); +commands[63].optional_opt_args[37].opt = zero_ARG; +commands[63].optional_opt_args[37].def.val_bits = val_enum_to_bit(bool_VAL); +commands[63].optional_pos_args[0].pos = 2; +commands[63].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[63].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[64].name = "lvcreate"; +commands[64].command_line_id = "lvcreate_thin_vol_with_thinpool"; +commands[64].command_line_enum = lvcreate_thin_vol_with_thinpool_CMD; +commands[64].fn = lvcreate; +commands[64].ro_count = 3; +commands[64].rp_count = 1; +commands[64].oo_count = 37; +commands[64].op_count = 1; +commands[64].desc = "DESC: Create a thin LV, first creating a thin pool for it."; +commands[64].usage = "lvcreate --type thin --virtualsize Number[m|unit] --size Number[m|unit] VG" +" [ --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --chunksize Number[k|unit], --discards passdown|nopassdown|ignore, --errorwhenfull y|n, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[64].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[64].required_opt_args[0].opt = type_ARG; +commands[64].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[64].required_opt_args[0].def.str = "thin"; +commands[64].required_opt_args[1].opt = virtualsize_ARG; +commands[64].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[64].required_opt_args[2].opt = size_ARG; +commands[64].required_opt_args[2].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[64].required_pos_args[0].pos = 1; +commands[64].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[64].optional_opt_args[0].opt = commandprofile_ARG; +commands[64].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[64].optional_opt_args[1].opt = config_ARG; +commands[64].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[64].optional_opt_args[2].opt = debug_ARG; +commands[64].optional_opt_args[3].opt = driverloaded_ARG; +commands[64].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[64].optional_opt_args[4].opt = help_ARG; +commands[64].optional_opt_args[5].opt = profile_ARG; +commands[64].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[64].optional_opt_args[6].opt = quiet_ARG; +commands[64].optional_opt_args[7].opt = verbose_ARG; +commands[64].optional_opt_args[8].opt = version_ARG; +commands[64].optional_opt_args[9].opt = yes_ARG; +commands[64].optional_opt_args[10].opt = poolmetadatasize_ARG; +commands[64].optional_opt_args[10].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[64].optional_opt_args[11].opt = poolmetadataspare_ARG; +commands[64].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[64].optional_opt_args[12].opt = chunksize_ARG; +commands[64].optional_opt_args[12].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[64].optional_opt_args[13].opt = discards_ARG; +commands[64].optional_opt_args[13].def.val_bits = val_enum_to_bit(discards_VAL); +commands[64].optional_opt_args[14].opt = errorwhenfull_ARG; +commands[64].optional_opt_args[14].def.val_bits = val_enum_to_bit(bool_VAL); +commands[64].optional_opt_args[15].opt = addtag_ARG; +commands[64].optional_opt_args[15].def.val_bits = val_enum_to_bit(tag_VAL); +commands[64].optional_opt_args[16].opt = alloc_ARG; +commands[64].optional_opt_args[16].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[64].optional_opt_args[17].opt = autobackup_ARG; +commands[64].optional_opt_args[17].def.val_bits = val_enum_to_bit(bool_VAL); +commands[64].optional_opt_args[18].opt = activate_ARG; +commands[64].optional_opt_args[18].def.val_bits = val_enum_to_bit(activation_VAL); +commands[64].optional_opt_args[19].opt = contiguous_ARG; +commands[64].optional_opt_args[19].def.val_bits = val_enum_to_bit(bool_VAL); +commands[64].optional_opt_args[20].opt = ignoreactivationskip_ARG; +commands[64].optional_opt_args[21].opt = ignoremonitoring_ARG; +commands[64].optional_opt_args[22].opt = major_ARG; +commands[64].optional_opt_args[22].def.val_bits = val_enum_to_bit(number_VAL); +commands[64].optional_opt_args[23].opt = metadataprofile_ARG; +commands[64].optional_opt_args[23].def.val_bits = val_enum_to_bit(string_VAL); +commands[64].optional_opt_args[24].opt = minor_ARG; +commands[64].optional_opt_args[24].def.val_bits = val_enum_to_bit(number_VAL); +commands[64].optional_opt_args[25].opt = monitor_ARG; +commands[64].optional_opt_args[25].def.val_bits = val_enum_to_bit(bool_VAL); +commands[64].optional_opt_args[26].opt = name_ARG; +commands[64].optional_opt_args[26].def.val_bits = val_enum_to_bit(string_VAL); +commands[64].optional_opt_args[27].opt = nosync_ARG; +commands[64].optional_opt_args[28].opt = noudevsync_ARG; +commands[64].optional_opt_args[29].opt = permission_ARG; +commands[64].optional_opt_args[29].def.val_bits = val_enum_to_bit(permission_VAL); +commands[64].optional_opt_args[30].opt = persistent_ARG; +commands[64].optional_opt_args[30].def.val_bits = val_enum_to_bit(bool_VAL); +commands[64].optional_opt_args[31].opt = readahead_ARG; +commands[64].optional_opt_args[31].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[64].optional_opt_args[32].opt = reportformat_ARG; +commands[64].optional_opt_args[32].def.val_bits = val_enum_to_bit(string_VAL); +commands[64].optional_opt_args[33].opt = setactivationskip_ARG; +commands[64].optional_opt_args[33].def.val_bits = val_enum_to_bit(bool_VAL); +commands[64].optional_opt_args[34].opt = test_ARG; +commands[64].optional_opt_args[35].opt = wipesignatures_ARG; +commands[64].optional_opt_args[35].def.val_bits = val_enum_to_bit(bool_VAL); +commands[64].optional_opt_args[36].opt = zero_ARG; +commands[64].optional_opt_args[36].def.val_bits = val_enum_to_bit(bool_VAL); +commands[64].optional_pos_args[0].pos = 2; +commands[64].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[64].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[65].name = "lvcreate"; +commands[65].command_line_id = "lvcreate_thin_vol_with_thinpool_or_sparse_snapshot"; +commands[65].command_line_enum = lvcreate_thin_vol_with_thinpool_or_sparse_snapshot_CMD; +commands[65].fn = lvcreate; +commands[65].ro_count = 2; +commands[65].rp_count = 1; +commands[65].oo_count = 42; +commands[65].op_count = 1; +commands[65].desc = "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: Infers --type thin or --type snapshot according to DESC: confing setting sparse_segtype_default."; +commands[65].usage = "lvcreate --size Number[m|unit] --virtualsize Number[m|unit] VG" +" [ --type thin, --type snapshot, --thin, --snapshot, --virtualoriginsize Number[m|unit], --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --chunksize Number[k|unit], --discards passdown|nopassdown|ignore, --errorwhenfull y|n, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[65].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[65].required_opt_args[0].opt = size_ARG; +commands[65].required_opt_args[0].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[65].required_opt_args[1].opt = virtualsize_ARG; +commands[65].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[65].required_pos_args[0].pos = 1; +commands[65].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[65].optional_opt_args[0].opt = commandprofile_ARG; +commands[65].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[65].optional_opt_args[1].opt = config_ARG; +commands[65].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[65].optional_opt_args[2].opt = debug_ARG; +commands[65].optional_opt_args[3].opt = driverloaded_ARG; +commands[65].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[65].optional_opt_args[4].opt = help_ARG; +commands[65].optional_opt_args[5].opt = profile_ARG; +commands[65].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[65].optional_opt_args[6].opt = quiet_ARG; +commands[65].optional_opt_args[7].opt = verbose_ARG; +commands[65].optional_opt_args[8].opt = version_ARG; +commands[65].optional_opt_args[9].opt = yes_ARG; +commands[65].optional_opt_args[10].opt = type_ARG; +commands[65].optional_opt_args[10].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[65].optional_opt_args[10].def.str = "thin"; +commands[65].optional_opt_args[11].opt = type_ARG; +commands[65].optional_opt_args[11].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[65].optional_opt_args[11].def.str = "snapshot"; +commands[65].optional_opt_args[12].opt = thin_ARG; +commands[65].optional_opt_args[13].opt = snapshot_ARG; +commands[65].optional_opt_args[14].opt = virtualoriginsize_ARG; +commands[65].optional_opt_args[14].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[65].optional_opt_args[15].opt = poolmetadatasize_ARG; +commands[65].optional_opt_args[15].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[65].optional_opt_args[16].opt = poolmetadataspare_ARG; +commands[65].optional_opt_args[16].def.val_bits = val_enum_to_bit(bool_VAL); +commands[65].optional_opt_args[17].opt = chunksize_ARG; +commands[65].optional_opt_args[17].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[65].optional_opt_args[18].opt = discards_ARG; +commands[65].optional_opt_args[18].def.val_bits = val_enum_to_bit(discards_VAL); +commands[65].optional_opt_args[19].opt = errorwhenfull_ARG; +commands[65].optional_opt_args[19].def.val_bits = val_enum_to_bit(bool_VAL); +commands[65].optional_opt_args[20].opt = addtag_ARG; +commands[65].optional_opt_args[20].def.val_bits = val_enum_to_bit(tag_VAL); +commands[65].optional_opt_args[21].opt = alloc_ARG; +commands[65].optional_opt_args[21].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[65].optional_opt_args[22].opt = autobackup_ARG; +commands[65].optional_opt_args[22].def.val_bits = val_enum_to_bit(bool_VAL); +commands[65].optional_opt_args[23].opt = activate_ARG; +commands[65].optional_opt_args[23].def.val_bits = val_enum_to_bit(activation_VAL); +commands[65].optional_opt_args[24].opt = contiguous_ARG; +commands[65].optional_opt_args[24].def.val_bits = val_enum_to_bit(bool_VAL); +commands[65].optional_opt_args[25].opt = ignoreactivationskip_ARG; +commands[65].optional_opt_args[26].opt = ignoremonitoring_ARG; +commands[65].optional_opt_args[27].opt = major_ARG; +commands[65].optional_opt_args[27].def.val_bits = val_enum_to_bit(number_VAL); +commands[65].optional_opt_args[28].opt = metadataprofile_ARG; +commands[65].optional_opt_args[28].def.val_bits = val_enum_to_bit(string_VAL); +commands[65].optional_opt_args[29].opt = minor_ARG; +commands[65].optional_opt_args[29].def.val_bits = val_enum_to_bit(number_VAL); +commands[65].optional_opt_args[30].opt = monitor_ARG; +commands[65].optional_opt_args[30].def.val_bits = val_enum_to_bit(bool_VAL); +commands[65].optional_opt_args[31].opt = name_ARG; +commands[65].optional_opt_args[31].def.val_bits = val_enum_to_bit(string_VAL); +commands[65].optional_opt_args[32].opt = nosync_ARG; +commands[65].optional_opt_args[33].opt = noudevsync_ARG; +commands[65].optional_opt_args[34].opt = permission_ARG; +commands[65].optional_opt_args[34].def.val_bits = val_enum_to_bit(permission_VAL); +commands[65].optional_opt_args[35].opt = persistent_ARG; +commands[65].optional_opt_args[35].def.val_bits = val_enum_to_bit(bool_VAL); +commands[65].optional_opt_args[36].opt = readahead_ARG; +commands[65].optional_opt_args[36].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[65].optional_opt_args[37].opt = reportformat_ARG; +commands[65].optional_opt_args[37].def.val_bits = val_enum_to_bit(string_VAL); +commands[65].optional_opt_args[38].opt = setactivationskip_ARG; +commands[65].optional_opt_args[38].def.val_bits = val_enum_to_bit(bool_VAL); +commands[65].optional_opt_args[39].opt = test_ARG; +commands[65].optional_opt_args[40].opt = wipesignatures_ARG; +commands[65].optional_opt_args[40].def.val_bits = val_enum_to_bit(bool_VAL); +commands[65].optional_opt_args[41].opt = zero_ARG; +commands[65].optional_opt_args[41].def.val_bits = val_enum_to_bit(bool_VAL); +commands[65].optional_pos_args[0].pos = 2; +commands[65].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[65].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[66].name = "lvcreate"; +commands[66].command_line_id = "lvcreate_convert_to_cache_vol_with_cachepool"; +commands[66].command_line_enum = lvcreate_convert_to_cache_vol_with_cachepool_CMD; +commands[66].fn = lvcreate; +commands[66].ro_count = 2; +commands[66].rp_count = 1; +commands[66].oo_count = 38; +commands[66].op_count = 1; +commands[66].desc = "DESC: Convert the specified LV to type cache after creating a new DESC: cache pool LV to use."; +commands[66].usage = "lvcreate --type cache --size Number[m|unit] LV" +" [ --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --chunksize Number[k|unit], --cachemode writethrough|writeback, --cachepolicy String, --cachesettings String, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[66].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[66].required_opt_args[0].opt = type_ARG; +commands[66].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[66].required_opt_args[0].def.str = "cache"; +commands[66].required_opt_args[1].opt = size_ARG; +commands[66].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[66].required_pos_args[0].pos = 1; +commands[66].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[66].optional_opt_args[0].opt = commandprofile_ARG; +commands[66].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[66].optional_opt_args[1].opt = config_ARG; +commands[66].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[66].optional_opt_args[2].opt = debug_ARG; +commands[66].optional_opt_args[3].opt = driverloaded_ARG; +commands[66].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[66].optional_opt_args[4].opt = help_ARG; +commands[66].optional_opt_args[5].opt = profile_ARG; +commands[66].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[66].optional_opt_args[6].opt = quiet_ARG; +commands[66].optional_opt_args[7].opt = verbose_ARG; +commands[66].optional_opt_args[8].opt = version_ARG; +commands[66].optional_opt_args[9].opt = yes_ARG; +commands[66].optional_opt_args[10].opt = poolmetadatasize_ARG; +commands[66].optional_opt_args[10].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[66].optional_opt_args[11].opt = poolmetadataspare_ARG; +commands[66].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[66].optional_opt_args[12].opt = chunksize_ARG; +commands[66].optional_opt_args[12].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[66].optional_opt_args[13].opt = cachemode_ARG; +commands[66].optional_opt_args[13].def.val_bits = val_enum_to_bit(cachemode_VAL); +commands[66].optional_opt_args[14].opt = cachepolicy_ARG; +commands[66].optional_opt_args[14].def.val_bits = val_enum_to_bit(string_VAL); +commands[66].optional_opt_args[15].opt = cachesettings_ARG; +commands[66].optional_opt_args[15].def.val_bits = val_enum_to_bit(string_VAL); +commands[66].optional_opt_args[16].opt = addtag_ARG; +commands[66].optional_opt_args[16].def.val_bits = val_enum_to_bit(tag_VAL); +commands[66].optional_opt_args[17].opt = alloc_ARG; +commands[66].optional_opt_args[17].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[66].optional_opt_args[18].opt = autobackup_ARG; +commands[66].optional_opt_args[18].def.val_bits = val_enum_to_bit(bool_VAL); +commands[66].optional_opt_args[19].opt = activate_ARG; +commands[66].optional_opt_args[19].def.val_bits = val_enum_to_bit(activation_VAL); +commands[66].optional_opt_args[20].opt = contiguous_ARG; +commands[66].optional_opt_args[20].def.val_bits = val_enum_to_bit(bool_VAL); +commands[66].optional_opt_args[21].opt = ignoreactivationskip_ARG; +commands[66].optional_opt_args[22].opt = ignoremonitoring_ARG; +commands[66].optional_opt_args[23].opt = major_ARG; +commands[66].optional_opt_args[23].def.val_bits = val_enum_to_bit(number_VAL); +commands[66].optional_opt_args[24].opt = metadataprofile_ARG; +commands[66].optional_opt_args[24].def.val_bits = val_enum_to_bit(string_VAL); +commands[66].optional_opt_args[25].opt = minor_ARG; +commands[66].optional_opt_args[25].def.val_bits = val_enum_to_bit(number_VAL); +commands[66].optional_opt_args[26].opt = monitor_ARG; +commands[66].optional_opt_args[26].def.val_bits = val_enum_to_bit(bool_VAL); +commands[66].optional_opt_args[27].opt = name_ARG; +commands[66].optional_opt_args[27].def.val_bits = val_enum_to_bit(string_VAL); +commands[66].optional_opt_args[28].opt = nosync_ARG; +commands[66].optional_opt_args[29].opt = noudevsync_ARG; +commands[66].optional_opt_args[30].opt = permission_ARG; +commands[66].optional_opt_args[30].def.val_bits = val_enum_to_bit(permission_VAL); +commands[66].optional_opt_args[31].opt = persistent_ARG; +commands[66].optional_opt_args[31].def.val_bits = val_enum_to_bit(bool_VAL); +commands[66].optional_opt_args[32].opt = readahead_ARG; +commands[66].optional_opt_args[32].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[66].optional_opt_args[33].opt = reportformat_ARG; +commands[66].optional_opt_args[33].def.val_bits = val_enum_to_bit(string_VAL); +commands[66].optional_opt_args[34].opt = setactivationskip_ARG; +commands[66].optional_opt_args[34].def.val_bits = val_enum_to_bit(bool_VAL); +commands[66].optional_opt_args[35].opt = test_ARG; +commands[66].optional_opt_args[36].opt = wipesignatures_ARG; +commands[66].optional_opt_args[36].def.val_bits = val_enum_to_bit(bool_VAL); +commands[66].optional_opt_args[37].opt = zero_ARG; +commands[66].optional_opt_args[37].def.val_bits = val_enum_to_bit(bool_VAL); +commands[66].optional_pos_args[0].pos = 2; +commands[66].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[66].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[67].name = "lvcreate"; +commands[67].command_line_id = "lvcreate_cache_vol_with_new_origin"; +commands[67].command_line_enum = lvcreate_cache_vol_with_new_origin_CMD; +commands[67].fn = lvcreate; +commands[67].ro_count = 3; +commands[67].rp_count = 0; +commands[67].oo_count = 39; +commands[67].op_count = 1; +commands[67].desc = "DESC: Create a cache LV, first creating a new origin LV, DESC: then combining it with the existing cache pool in arg pos 1."; +commands[67].usage = "lvcreate --type cache --size Number[m|unit] --cachepool LV_cachepool" +" [ --cache, --poolmetadatasize Number[m|unit], --poolmetadataspare y|n, --chunksize Number[k|unit], --cachemode writethrough|writeback, --cachepolicy String, --cachesettings String, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[67].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[67].required_opt_args[0].opt = type_ARG; +commands[67].required_opt_args[0].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[67].required_opt_args[0].def.str = "cache"; +commands[67].required_opt_args[1].opt = size_ARG; +commands[67].required_opt_args[1].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[67].required_opt_args[2].opt = cachepool_ARG; +commands[67].required_opt_args[2].def.val_bits = val_enum_to_bit(lv_VAL); +commands[67].required_opt_args[2].def.lv_types = ARG_DEF_LV_CACHEPOOL; +commands[67].optional_opt_args[0].opt = commandprofile_ARG; +commands[67].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[67].optional_opt_args[1].opt = config_ARG; +commands[67].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[67].optional_opt_args[2].opt = debug_ARG; +commands[67].optional_opt_args[3].opt = driverloaded_ARG; +commands[67].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[67].optional_opt_args[4].opt = help_ARG; +commands[67].optional_opt_args[5].opt = profile_ARG; +commands[67].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[67].optional_opt_args[6].opt = quiet_ARG; +commands[67].optional_opt_args[7].opt = verbose_ARG; +commands[67].optional_opt_args[8].opt = version_ARG; +commands[67].optional_opt_args[9].opt = yes_ARG; +commands[67].optional_opt_args[10].opt = cache_ARG; +commands[67].optional_opt_args[11].opt = poolmetadatasize_ARG; +commands[67].optional_opt_args[11].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[67].optional_opt_args[12].opt = poolmetadataspare_ARG; +commands[67].optional_opt_args[12].def.val_bits = val_enum_to_bit(bool_VAL); +commands[67].optional_opt_args[13].opt = chunksize_ARG; +commands[67].optional_opt_args[13].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[67].optional_opt_args[14].opt = cachemode_ARG; +commands[67].optional_opt_args[14].def.val_bits = val_enum_to_bit(cachemode_VAL); +commands[67].optional_opt_args[15].opt = cachepolicy_ARG; +commands[67].optional_opt_args[15].def.val_bits = val_enum_to_bit(string_VAL); +commands[67].optional_opt_args[16].opt = cachesettings_ARG; +commands[67].optional_opt_args[16].def.val_bits = val_enum_to_bit(string_VAL); +commands[67].optional_opt_args[17].opt = addtag_ARG; +commands[67].optional_opt_args[17].def.val_bits = val_enum_to_bit(tag_VAL); +commands[67].optional_opt_args[18].opt = alloc_ARG; +commands[67].optional_opt_args[18].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[67].optional_opt_args[19].opt = autobackup_ARG; +commands[67].optional_opt_args[19].def.val_bits = val_enum_to_bit(bool_VAL); +commands[67].optional_opt_args[20].opt = activate_ARG; +commands[67].optional_opt_args[20].def.val_bits = val_enum_to_bit(activation_VAL); +commands[67].optional_opt_args[21].opt = contiguous_ARG; +commands[67].optional_opt_args[21].def.val_bits = val_enum_to_bit(bool_VAL); +commands[67].optional_opt_args[22].opt = ignoreactivationskip_ARG; +commands[67].optional_opt_args[23].opt = ignoremonitoring_ARG; +commands[67].optional_opt_args[24].opt = major_ARG; +commands[67].optional_opt_args[24].def.val_bits = val_enum_to_bit(number_VAL); +commands[67].optional_opt_args[25].opt = metadataprofile_ARG; +commands[67].optional_opt_args[25].def.val_bits = val_enum_to_bit(string_VAL); +commands[67].optional_opt_args[26].opt = minor_ARG; +commands[67].optional_opt_args[26].def.val_bits = val_enum_to_bit(number_VAL); +commands[67].optional_opt_args[27].opt = monitor_ARG; +commands[67].optional_opt_args[27].def.val_bits = val_enum_to_bit(bool_VAL); +commands[67].optional_opt_args[28].opt = name_ARG; +commands[67].optional_opt_args[28].def.val_bits = val_enum_to_bit(string_VAL); +commands[67].optional_opt_args[29].opt = nosync_ARG; +commands[67].optional_opt_args[30].opt = noudevsync_ARG; +commands[67].optional_opt_args[31].opt = permission_ARG; +commands[67].optional_opt_args[31].def.val_bits = val_enum_to_bit(permission_VAL); +commands[67].optional_opt_args[32].opt = persistent_ARG; +commands[67].optional_opt_args[32].def.val_bits = val_enum_to_bit(bool_VAL); +commands[67].optional_opt_args[33].opt = readahead_ARG; +commands[67].optional_opt_args[33].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[67].optional_opt_args[34].opt = reportformat_ARG; +commands[67].optional_opt_args[34].def.val_bits = val_enum_to_bit(string_VAL); +commands[67].optional_opt_args[35].opt = setactivationskip_ARG; +commands[67].optional_opt_args[35].def.val_bits = val_enum_to_bit(bool_VAL); +commands[67].optional_opt_args[36].opt = test_ARG; +commands[67].optional_opt_args[37].opt = wipesignatures_ARG; +commands[67].optional_opt_args[37].def.val_bits = val_enum_to_bit(bool_VAL); +commands[67].optional_opt_args[38].opt = zero_ARG; +commands[67].optional_opt_args[38].def.val_bits = val_enum_to_bit(bool_VAL); +commands[67].optional_pos_args[0].pos = 1; +commands[67].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[67].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[68].name = "lvcreate"; +commands[68].command_line_id = "lvcreate_cache_vol_with_new_origin"; +commands[68].command_line_enum = lvcreate_cache_vol_with_new_origin_CMD; +commands[68].fn = lvcreate; +commands[68].ro_count = 2; +commands[68].rp_count = 0; +commands[68].oo_count = 37; +commands[68].op_count = 1; +commands[68].desc = "DESC: Create a cache LV, first creating a new origin LV, DESC: then combining it with the existing cache pool in arg pos 1. DESC: (variant, infers --type cache)."; +commands[68].usage = "lvcreate --size Number[m|unit] --cachepool LV_cachepool" +" [ --type cache, --cache, --cachemode writethrough|writeback, --cachepolicy String, --cachesettings String, --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --activate y|n|ay, --contiguous y|n, --ignoreactivationskip, --ignoremonitoring, --major Number, --metadataprofile String, --minor Number, --monitor y|n, --name String, --nosync, --permission rw|r, --persistent y|n, --readahead auto|none|NumberSectors, --reportformat String, --setactivationskip y|n, --wipesignatures y|n, --zero y|n ]" +" [ PV ... ]"; +commands[68].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[68].required_opt_args[0].opt = size_ARG; +commands[68].required_opt_args[0].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[68].required_opt_args[1].opt = cachepool_ARG; +commands[68].required_opt_args[1].def.val_bits = val_enum_to_bit(lv_VAL); +commands[68].required_opt_args[1].def.lv_types = ARG_DEF_LV_CACHEPOOL; +commands[68].optional_opt_args[0].opt = commandprofile_ARG; +commands[68].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[68].optional_opt_args[1].opt = config_ARG; +commands[68].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[68].optional_opt_args[2].opt = debug_ARG; +commands[68].optional_opt_args[3].opt = driverloaded_ARG; +commands[68].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[68].optional_opt_args[4].opt = help_ARG; +commands[68].optional_opt_args[5].opt = profile_ARG; +commands[68].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[68].optional_opt_args[6].opt = quiet_ARG; +commands[68].optional_opt_args[7].opt = verbose_ARG; +commands[68].optional_opt_args[8].opt = version_ARG; +commands[68].optional_opt_args[9].opt = yes_ARG; +commands[68].optional_opt_args[10].opt = type_ARG; +commands[68].optional_opt_args[10].def.val_bits = val_enum_to_bit(conststr_VAL); +commands[68].optional_opt_args[10].def.str = "cache"; +commands[68].optional_opt_args[11].opt = cache_ARG; +commands[68].optional_opt_args[12].opt = cachemode_ARG; +commands[68].optional_opt_args[12].def.val_bits = val_enum_to_bit(cachemode_VAL); +commands[68].optional_opt_args[13].opt = cachepolicy_ARG; +commands[68].optional_opt_args[13].def.val_bits = val_enum_to_bit(string_VAL); +commands[68].optional_opt_args[14].opt = cachesettings_ARG; +commands[68].optional_opt_args[14].def.val_bits = val_enum_to_bit(string_VAL); +commands[68].optional_opt_args[15].opt = addtag_ARG; +commands[68].optional_opt_args[15].def.val_bits = val_enum_to_bit(tag_VAL); +commands[68].optional_opt_args[16].opt = alloc_ARG; +commands[68].optional_opt_args[16].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[68].optional_opt_args[17].opt = autobackup_ARG; +commands[68].optional_opt_args[17].def.val_bits = val_enum_to_bit(bool_VAL); +commands[68].optional_opt_args[18].opt = activate_ARG; +commands[68].optional_opt_args[18].def.val_bits = val_enum_to_bit(activation_VAL); +commands[68].optional_opt_args[19].opt = contiguous_ARG; +commands[68].optional_opt_args[19].def.val_bits = val_enum_to_bit(bool_VAL); +commands[68].optional_opt_args[20].opt = ignoreactivationskip_ARG; +commands[68].optional_opt_args[21].opt = ignoremonitoring_ARG; +commands[68].optional_opt_args[22].opt = major_ARG; +commands[68].optional_opt_args[22].def.val_bits = val_enum_to_bit(number_VAL); +commands[68].optional_opt_args[23].opt = metadataprofile_ARG; +commands[68].optional_opt_args[23].def.val_bits = val_enum_to_bit(string_VAL); +commands[68].optional_opt_args[24].opt = minor_ARG; +commands[68].optional_opt_args[24].def.val_bits = val_enum_to_bit(number_VAL); +commands[68].optional_opt_args[25].opt = monitor_ARG; +commands[68].optional_opt_args[25].def.val_bits = val_enum_to_bit(bool_VAL); +commands[68].optional_opt_args[26].opt = name_ARG; +commands[68].optional_opt_args[26].def.val_bits = val_enum_to_bit(string_VAL); +commands[68].optional_opt_args[27].opt = nosync_ARG; +commands[68].optional_opt_args[28].opt = noudevsync_ARG; +commands[68].optional_opt_args[29].opt = permission_ARG; +commands[68].optional_opt_args[29].def.val_bits = val_enum_to_bit(permission_VAL); +commands[68].optional_opt_args[30].opt = persistent_ARG; +commands[68].optional_opt_args[30].def.val_bits = val_enum_to_bit(bool_VAL); +commands[68].optional_opt_args[31].opt = readahead_ARG; +commands[68].optional_opt_args[31].def.val_bits = val_enum_to_bit(readahead_VAL); +commands[68].optional_opt_args[32].opt = reportformat_ARG; +commands[68].optional_opt_args[32].def.val_bits = val_enum_to_bit(string_VAL); +commands[68].optional_opt_args[33].opt = setactivationskip_ARG; +commands[68].optional_opt_args[33].def.val_bits = val_enum_to_bit(bool_VAL); +commands[68].optional_opt_args[34].opt = test_ARG; +commands[68].optional_opt_args[35].opt = wipesignatures_ARG; +commands[68].optional_opt_args[35].def.val_bits = val_enum_to_bit(bool_VAL); +commands[68].optional_opt_args[36].opt = zero_ARG; +commands[68].optional_opt_args[36].def.val_bits = val_enum_to_bit(bool_VAL); +commands[68].optional_pos_args[0].pos = 1; +commands[68].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[68].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[69].name = "lvdisplay"; +commands[69].command_line_id = "lvdisplay_general"; +commands[69].command_line_enum = lvdisplay_general_CMD; +commands[69].fn = lvdisplay; +commands[69].ro_count = 0; +commands[69].rp_count = 0; +commands[69].oo_count = 35; +commands[69].op_count = 1; +commands[69].desc = ""; +commands[69].usage = "lvdisplay" +" [ --aligned, --all, --binary, --colon, --columns, --configreport String, --foreign, --history, --ignorelockingfailure, --ignoreskippedcluster, --logonly, --maps, --noheadings, --nosuffix, --options String, --sort String, --partial, --readonly, --reportformat String, --segments, --select String, --separator String, --shared, --unbuffered, --units hHbBsSkKmMgGtTpPeE ]" +" [ VG|LV|Tag ... ]"; +commands[69].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[69].optional_opt_args[0].opt = commandprofile_ARG; +commands[69].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[69].optional_opt_args[1].opt = config_ARG; +commands[69].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[69].optional_opt_args[2].opt = debug_ARG; +commands[69].optional_opt_args[3].opt = driverloaded_ARG; +commands[69].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[69].optional_opt_args[4].opt = help_ARG; +commands[69].optional_opt_args[5].opt = profile_ARG; +commands[69].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[69].optional_opt_args[6].opt = quiet_ARG; +commands[69].optional_opt_args[7].opt = verbose_ARG; +commands[69].optional_opt_args[8].opt = version_ARG; +commands[69].optional_opt_args[9].opt = yes_ARG; +commands[69].optional_opt_args[10].opt = aligned_ARG; +commands[69].optional_opt_args[11].opt = all_ARG; +commands[69].optional_opt_args[12].opt = binary_ARG; +commands[69].optional_opt_args[13].opt = colon_ARG; +commands[69].optional_opt_args[14].opt = columns_ARG; +commands[69].optional_opt_args[15].opt = configreport_ARG; +commands[69].optional_opt_args[15].def.val_bits = val_enum_to_bit(string_VAL); +commands[69].optional_opt_args[16].opt = foreign_ARG; +commands[69].optional_opt_args[17].opt = history_ARG; +commands[69].optional_opt_args[18].opt = ignorelockingfailure_ARG; +commands[69].optional_opt_args[19].opt = ignoreskippedcluster_ARG; +commands[69].optional_opt_args[20].opt = logonly_ARG; +commands[69].optional_opt_args[21].opt = maps_ARG; +commands[69].optional_opt_args[22].opt = noheadings_ARG; +commands[69].optional_opt_args[23].opt = nosuffix_ARG; +commands[69].optional_opt_args[24].opt = options_ARG; +commands[69].optional_opt_args[24].def.val_bits = val_enum_to_bit(string_VAL); +commands[69].optional_opt_args[25].opt = sort_ARG; +commands[69].optional_opt_args[25].def.val_bits = val_enum_to_bit(string_VAL); +commands[69].optional_opt_args[26].opt = partial_ARG; +commands[69].optional_opt_args[27].opt = readonly_ARG; +commands[69].optional_opt_args[28].opt = reportformat_ARG; +commands[69].optional_opt_args[28].def.val_bits = val_enum_to_bit(string_VAL); +commands[69].optional_opt_args[29].opt = segments_ARG; +commands[69].optional_opt_args[30].opt = select_ARG; +commands[69].optional_opt_args[30].def.val_bits = val_enum_to_bit(string_VAL); +commands[69].optional_opt_args[31].opt = separator_ARG; +commands[69].optional_opt_args[31].def.val_bits = val_enum_to_bit(string_VAL); +commands[69].optional_opt_args[32].opt = shared_ARG; +commands[69].optional_opt_args[33].opt = unbuffered_ARG; +commands[69].optional_opt_args[34].opt = units_ARG; +commands[69].optional_opt_args[34].def.val_bits = val_enum_to_bit(units_VAL); +commands[69].optional_pos_args[0].pos = 1; +commands[69].optional_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(lv_VAL) | val_enum_to_bit(tag_VAL); +commands[69].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[70].name = "lvextend"; +commands[70].command_line_id = "lvextend_by_size"; +commands[70].command_line_enum = lvextend_by_size_CMD; +commands[70].fn = lvextend; +commands[70].ro_count = 1; +commands[70].rp_count = 1; +commands[70].oo_count = 23; +commands[70].op_count = 1; +commands[70].desc = ""; +commands[70].usage = "lvextend --size Number[m|unit] LV" +" [ --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --mirrors [+|-]Number, --nofsck, --nosync, --reportformat String, --resizefs, --stripes Number, --stripesize Number[k|unit], --poolmetadatasize Number[m|unit] ]" +" [ PV ... ]"; +commands[70].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[70].required_opt_args[0].opt = size_ARG; +commands[70].required_opt_args[0].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[70].required_pos_args[0].pos = 1; +commands[70].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[70].optional_opt_args[0].opt = commandprofile_ARG; +commands[70].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[70].optional_opt_args[1].opt = config_ARG; +commands[70].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[70].optional_opt_args[2].opt = debug_ARG; +commands[70].optional_opt_args[3].opt = driverloaded_ARG; +commands[70].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[70].optional_opt_args[4].opt = help_ARG; +commands[70].optional_opt_args[5].opt = profile_ARG; +commands[70].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[70].optional_opt_args[6].opt = quiet_ARG; +commands[70].optional_opt_args[7].opt = verbose_ARG; +commands[70].optional_opt_args[8].opt = version_ARG; +commands[70].optional_opt_args[9].opt = yes_ARG; +commands[70].optional_opt_args[10].opt = alloc_ARG; +commands[70].optional_opt_args[10].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[70].optional_opt_args[11].opt = autobackup_ARG; +commands[70].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[70].optional_opt_args[12].opt = force_ARG; +commands[70].optional_opt_args[13].opt = mirrors_ARG; +commands[70].optional_opt_args[13].def.val_bits = val_enum_to_bit(numsigned_VAL); +commands[70].optional_opt_args[14].opt = nofsck_ARG; +commands[70].optional_opt_args[15].opt = nosync_ARG; +commands[70].optional_opt_args[16].opt = noudevsync_ARG; +commands[70].optional_opt_args[17].opt = reportformat_ARG; +commands[70].optional_opt_args[17].def.val_bits = val_enum_to_bit(string_VAL); +commands[70].optional_opt_args[18].opt = resizefs_ARG; +commands[70].optional_opt_args[19].opt = stripes_ARG; +commands[70].optional_opt_args[19].def.val_bits = val_enum_to_bit(number_VAL); +commands[70].optional_opt_args[20].opt = stripesize_ARG; +commands[70].optional_opt_args[20].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[70].optional_opt_args[21].opt = test_ARG; +commands[70].optional_opt_args[22].opt = poolmetadatasize_ARG; +commands[70].optional_opt_args[22].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[70].optional_pos_args[0].pos = 2; +commands[70].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[70].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[71].name = "lvextend"; +commands[71].command_line_id = "lvextend_by_pv"; +commands[71].command_line_enum = lvextend_by_pv_CMD; +commands[71].fn = lvextend; +commands[71].ro_count = 0; +commands[71].rp_count = 2; +commands[71].oo_count = 22; +commands[71].op_count = 0; +commands[71].desc = ""; +commands[71].usage = "lvextend LV PV ..." +" [ --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --mirrors [+|-]Number, --nofsck, --nosync, --reportformat String, --resizefs, --stripes Number, --stripesize Number[k|unit] ]"; +commands[71].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[71].required_pos_args[0].pos = 1; +commands[71].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[71].required_pos_args[1].pos = 2; +commands[71].required_pos_args[1].def.val_bits = val_enum_to_bit(pv_VAL); +commands[71].required_pos_args[1].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[71].optional_opt_args[0].opt = commandprofile_ARG; +commands[71].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[71].optional_opt_args[1].opt = config_ARG; +commands[71].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[71].optional_opt_args[2].opt = debug_ARG; +commands[71].optional_opt_args[3].opt = driverloaded_ARG; +commands[71].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[71].optional_opt_args[4].opt = help_ARG; +commands[71].optional_opt_args[5].opt = profile_ARG; +commands[71].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[71].optional_opt_args[6].opt = quiet_ARG; +commands[71].optional_opt_args[7].opt = verbose_ARG; +commands[71].optional_opt_args[8].opt = version_ARG; +commands[71].optional_opt_args[9].opt = yes_ARG; +commands[71].optional_opt_args[10].opt = alloc_ARG; +commands[71].optional_opt_args[10].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[71].optional_opt_args[11].opt = autobackup_ARG; +commands[71].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[71].optional_opt_args[12].opt = force_ARG; +commands[71].optional_opt_args[13].opt = mirrors_ARG; +commands[71].optional_opt_args[13].def.val_bits = val_enum_to_bit(numsigned_VAL); +commands[71].optional_opt_args[14].opt = nofsck_ARG; +commands[71].optional_opt_args[15].opt = nosync_ARG; +commands[71].optional_opt_args[16].opt = noudevsync_ARG; +commands[71].optional_opt_args[17].opt = reportformat_ARG; +commands[71].optional_opt_args[17].def.val_bits = val_enum_to_bit(string_VAL); +commands[71].optional_opt_args[18].opt = resizefs_ARG; +commands[71].optional_opt_args[19].opt = stripes_ARG; +commands[71].optional_opt_args[19].def.val_bits = val_enum_to_bit(number_VAL); +commands[71].optional_opt_args[20].opt = stripesize_ARG; +commands[71].optional_opt_args[20].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[71].optional_opt_args[21].opt = test_ARG; + +commands[72].name = "lvextend"; +commands[72].command_line_id = "lvextend_pool_metadata_by_size"; +commands[72].command_line_enum = lvextend_pool_metadata_by_size_CMD; +commands[72].fn = lvextend; +commands[72].ro_count = 1; +commands[72].rp_count = 1; +commands[72].oo_count = 21; +commands[72].op_count = 1; +commands[72].desc = ""; +commands[72].usage = "lvextend --poolmetadatasize Number[m|unit] LV_thinpool" +" [ --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --mirrors [+|-]Number, --nofsck, --nosync, --reportformat String, --stripes Number, --stripesize Number[k|unit] ]" +" [ PV ... ]"; +commands[72].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[72].required_opt_args[0].opt = poolmetadatasize_ARG; +commands[72].required_opt_args[0].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[72].required_pos_args[0].pos = 1; +commands[72].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[72].required_pos_args[0].def.lv_types = ARG_DEF_LV_THINPOOL; +commands[72].optional_opt_args[0].opt = commandprofile_ARG; +commands[72].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[72].optional_opt_args[1].opt = config_ARG; +commands[72].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[72].optional_opt_args[2].opt = debug_ARG; +commands[72].optional_opt_args[3].opt = driverloaded_ARG; +commands[72].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[72].optional_opt_args[4].opt = help_ARG; +commands[72].optional_opt_args[5].opt = profile_ARG; +commands[72].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[72].optional_opt_args[6].opt = quiet_ARG; +commands[72].optional_opt_args[7].opt = verbose_ARG; +commands[72].optional_opt_args[8].opt = version_ARG; +commands[72].optional_opt_args[9].opt = yes_ARG; +commands[72].optional_opt_args[10].opt = alloc_ARG; +commands[72].optional_opt_args[10].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[72].optional_opt_args[11].opt = autobackup_ARG; +commands[72].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[72].optional_opt_args[12].opt = force_ARG; +commands[72].optional_opt_args[13].opt = mirrors_ARG; +commands[72].optional_opt_args[13].def.val_bits = val_enum_to_bit(numsigned_VAL); +commands[72].optional_opt_args[14].opt = nofsck_ARG; +commands[72].optional_opt_args[15].opt = nosync_ARG; +commands[72].optional_opt_args[16].opt = noudevsync_ARG; +commands[72].optional_opt_args[17].opt = reportformat_ARG; +commands[72].optional_opt_args[17].def.val_bits = val_enum_to_bit(string_VAL); +commands[72].optional_opt_args[18].opt = stripes_ARG; +commands[72].optional_opt_args[18].def.val_bits = val_enum_to_bit(number_VAL); +commands[72].optional_opt_args[19].opt = stripesize_ARG; +commands[72].optional_opt_args[19].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[72].optional_opt_args[20].opt = test_ARG; +commands[72].optional_pos_args[0].pos = 2; +commands[72].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[72].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[73].name = "lvextend"; +commands[73].command_line_id = "lvextend_by_policy"; +commands[73].command_line_enum = lvextend_by_policy_CMD; +commands[73].fn = lvextend; +commands[73].ro_count = 1; +commands[73].rp_count = 1; +commands[73].oo_count = 20; +commands[73].op_count = 0; +commands[73].desc = ""; +commands[73].usage = "lvextend --usepolicies LV_snapshot_thinpool" +" [ --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --mirrors [+|-]Number, --nofsck, --nosync, --reportformat String, --resizefs ]"; +commands[73].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[73].required_opt_args[0].opt = usepolicies_ARG; +commands[73].required_pos_args[0].pos = 1; +commands[73].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[73].required_pos_args[0].def.lv_types = ARG_DEF_LV_SNAPSHOT | ARG_DEF_LV_THINPOOL; +commands[73].optional_opt_args[0].opt = commandprofile_ARG; +commands[73].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[73].optional_opt_args[1].opt = config_ARG; +commands[73].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[73].optional_opt_args[2].opt = debug_ARG; +commands[73].optional_opt_args[3].opt = driverloaded_ARG; +commands[73].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[73].optional_opt_args[4].opt = help_ARG; +commands[73].optional_opt_args[5].opt = profile_ARG; +commands[73].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[73].optional_opt_args[6].opt = quiet_ARG; +commands[73].optional_opt_args[7].opt = verbose_ARG; +commands[73].optional_opt_args[8].opt = version_ARG; +commands[73].optional_opt_args[9].opt = yes_ARG; +commands[73].optional_opt_args[10].opt = alloc_ARG; +commands[73].optional_opt_args[10].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[73].optional_opt_args[11].opt = autobackup_ARG; +commands[73].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[73].optional_opt_args[12].opt = force_ARG; +commands[73].optional_opt_args[13].opt = mirrors_ARG; +commands[73].optional_opt_args[13].def.val_bits = val_enum_to_bit(numsigned_VAL); +commands[73].optional_opt_args[14].opt = nofsck_ARG; +commands[73].optional_opt_args[15].opt = nosync_ARG; +commands[73].optional_opt_args[16].opt = noudevsync_ARG; +commands[73].optional_opt_args[17].opt = reportformat_ARG; +commands[73].optional_opt_args[17].def.val_bits = val_enum_to_bit(string_VAL); +commands[73].optional_opt_args[18].opt = resizefs_ARG; +commands[73].optional_opt_args[19].opt = test_ARG; + +commands[74].name = "lvmconfig"; +commands[74].command_line_id = "lvmconfig_general"; +commands[74].command_line_enum = lvmconfig_general_CMD; +commands[74].fn = lvmconfig; +commands[74].ro_count = 0; +commands[74].rp_count = 0; +commands[74].oo_count = 28; +commands[74].op_count = 0; +commands[74].desc = ""; +commands[74].usage = "lvmconfig" +" [ --atversion String, --typeconfig String, --file String, --ignoreadvanced, --ignoreunsupported, --ignorelocal, --list, --mergedconfig, --metadataprofile String, --sinceversion String, --showdeprecated, --showunsupported, --validate, --withsummary, --withcomments, --withspaces, --unconfigured, --withversions ]"; +commands[74].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[74].optional_opt_args[0].opt = commandprofile_ARG; +commands[74].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[74].optional_opt_args[1].opt = config_ARG; +commands[74].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[74].optional_opt_args[2].opt = debug_ARG; +commands[74].optional_opt_args[3].opt = driverloaded_ARG; +commands[74].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[74].optional_opt_args[4].opt = help_ARG; +commands[74].optional_opt_args[5].opt = profile_ARG; +commands[74].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[74].optional_opt_args[6].opt = quiet_ARG; +commands[74].optional_opt_args[7].opt = verbose_ARG; +commands[74].optional_opt_args[8].opt = version_ARG; +commands[74].optional_opt_args[9].opt = yes_ARG; +commands[74].optional_opt_args[10].opt = atversion_ARG; +commands[74].optional_opt_args[10].def.val_bits = val_enum_to_bit(string_VAL); +commands[74].optional_opt_args[11].opt = configtype_ARG; +commands[74].optional_opt_args[11].def.val_bits = val_enum_to_bit(string_VAL); +commands[74].optional_opt_args[12].opt = file_ARG; +commands[74].optional_opt_args[12].def.val_bits = val_enum_to_bit(string_VAL); +commands[74].optional_opt_args[13].opt = ignoreadvanced_ARG; +commands[74].optional_opt_args[14].opt = ignoreunsupported_ARG; +commands[74].optional_opt_args[15].opt = ignorelocal_ARG; +commands[74].optional_opt_args[16].opt = list_ARG; +commands[74].optional_opt_args[17].opt = mergedconfig_ARG; +commands[74].optional_opt_args[18].opt = metadataprofile_ARG; +commands[74].optional_opt_args[18].def.val_bits = val_enum_to_bit(string_VAL); +commands[74].optional_opt_args[19].opt = sinceversion_ARG; +commands[74].optional_opt_args[19].def.val_bits = val_enum_to_bit(string_VAL); +commands[74].optional_opt_args[20].opt = showdeprecated_ARG; +commands[74].optional_opt_args[21].opt = showunsupported_ARG; +commands[74].optional_opt_args[22].opt = validate_ARG; +commands[74].optional_opt_args[23].opt = withsummary_ARG; +commands[74].optional_opt_args[24].opt = withcomments_ARG; +commands[74].optional_opt_args[25].opt = withspaces_ARG; +commands[74].optional_opt_args[26].opt = unconfigured_ARG; +commands[74].optional_opt_args[27].opt = withversions_ARG; + +commands[75].name = "lvreduce"; +commands[75].command_line_id = "lvreduce_general"; +commands[75].command_line_enum = lvreduce_general_CMD; +commands[75].fn = lvreduce; +commands[75].ro_count = 1; +commands[75].rp_count = 1; +commands[75].oo_count = 17; +commands[75].op_count = 0; +commands[75].desc = ""; +commands[75].usage = "lvreduce --size Number[m|unit] LV" +" [ --autobackup y|n, --nofsck, --reportformat String, --resizefs ]"; +commands[75].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[75].required_opt_args[0].opt = size_ARG; +commands[75].required_opt_args[0].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[75].required_pos_args[0].pos = 1; +commands[75].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[75].optional_opt_args[0].opt = commandprofile_ARG; +commands[75].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[75].optional_opt_args[1].opt = config_ARG; +commands[75].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[75].optional_opt_args[2].opt = debug_ARG; +commands[75].optional_opt_args[3].opt = driverloaded_ARG; +commands[75].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[75].optional_opt_args[4].opt = help_ARG; +commands[75].optional_opt_args[5].opt = profile_ARG; +commands[75].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[75].optional_opt_args[6].opt = quiet_ARG; +commands[75].optional_opt_args[7].opt = verbose_ARG; +commands[75].optional_opt_args[8].opt = version_ARG; +commands[75].optional_opt_args[9].opt = yes_ARG; +commands[75].optional_opt_args[10].opt = autobackup_ARG; +commands[75].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[75].optional_opt_args[11].opt = force_ARG; +commands[75].optional_opt_args[12].opt = nofsck_ARG; +commands[75].optional_opt_args[13].opt = noudevsync_ARG; +commands[75].optional_opt_args[14].opt = reportformat_ARG; +commands[75].optional_opt_args[14].def.val_bits = val_enum_to_bit(string_VAL); +commands[75].optional_opt_args[15].opt = resizefs_ARG; +commands[75].optional_opt_args[16].opt = test_ARG; + +commands[76].name = "lvremove"; +commands[76].command_line_id = "lvremove_general"; +commands[76].command_line_enum = lvremove_general_CMD; +commands[76].fn = lvremove; +commands[76].ro_count = 0; +commands[76].rp_count = 1; +commands[76].oo_count = 17; +commands[76].op_count = 0; +commands[76].desc = ""; +commands[76].usage = "lvremove VG|LV|Tag|Select ..." +" [ --autobackup y|n, --nohistory, --reportformat String, --select String ]"; +commands[76].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[76].required_pos_args[0].pos = 1; +commands[76].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(lv_VAL) | val_enum_to_bit(tag_VAL) | val_enum_to_bit(select_VAL); +commands[76].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[76].optional_opt_args[0].opt = commandprofile_ARG; +commands[76].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[76].optional_opt_args[1].opt = config_ARG; +commands[76].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[76].optional_opt_args[2].opt = debug_ARG; +commands[76].optional_opt_args[3].opt = driverloaded_ARG; +commands[76].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[76].optional_opt_args[4].opt = help_ARG; +commands[76].optional_opt_args[5].opt = profile_ARG; +commands[76].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[76].optional_opt_args[6].opt = quiet_ARG; +commands[76].optional_opt_args[7].opt = verbose_ARG; +commands[76].optional_opt_args[8].opt = version_ARG; +commands[76].optional_opt_args[9].opt = yes_ARG; +commands[76].optional_opt_args[10].opt = autobackup_ARG; +commands[76].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[76].optional_opt_args[11].opt = force_ARG; +commands[76].optional_opt_args[12].opt = nohistory_ARG; +commands[76].optional_opt_args[13].opt = noudevsync_ARG; +commands[76].optional_opt_args[14].opt = reportformat_ARG; +commands[76].optional_opt_args[14].def.val_bits = val_enum_to_bit(string_VAL); +commands[76].optional_opt_args[15].opt = select_ARG; +commands[76].optional_opt_args[15].def.val_bits = val_enum_to_bit(string_VAL); +commands[76].optional_opt_args[16].opt = test_ARG; + +commands[77].name = "lvrename"; +commands[77].command_line_id = "lvrename_vg_lv_lv"; +commands[77].command_line_enum = lvrename_vg_lv_lv_CMD; +commands[77].fn = lvrename; +commands[77].ro_count = 0; +commands[77].rp_count = 3; +commands[77].oo_count = 14; +commands[77].op_count = 0; +commands[77].desc = ""; +commands[77].usage = "lvrename VG LV LV_new" +" [ --autobackup y|n, --reportformat String ]"; +commands[77].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[77].required_pos_args[0].pos = 1; +commands[77].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[77].required_pos_args[1].pos = 2; +commands[77].required_pos_args[1].def.val_bits = val_enum_to_bit(lv_VAL); +commands[77].required_pos_args[2].pos = 3; +commands[77].required_pos_args[2].def.val_bits = val_enum_to_bit(lv_VAL); +commands[77].required_pos_args[2].def.flags = ARG_DEF_FLAG_NEW; +commands[77].optional_opt_args[0].opt = commandprofile_ARG; +commands[77].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[77].optional_opt_args[1].opt = config_ARG; +commands[77].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[77].optional_opt_args[2].opt = debug_ARG; +commands[77].optional_opt_args[3].opt = driverloaded_ARG; +commands[77].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[77].optional_opt_args[4].opt = help_ARG; +commands[77].optional_opt_args[5].opt = profile_ARG; +commands[77].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[77].optional_opt_args[6].opt = quiet_ARG; +commands[77].optional_opt_args[7].opt = verbose_ARG; +commands[77].optional_opt_args[8].opt = version_ARG; +commands[77].optional_opt_args[9].opt = yes_ARG; +commands[77].optional_opt_args[10].opt = autobackup_ARG; +commands[77].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[77].optional_opt_args[11].opt = noudevsync_ARG; +commands[77].optional_opt_args[12].opt = reportformat_ARG; +commands[77].optional_opt_args[12].def.val_bits = val_enum_to_bit(string_VAL); +commands[77].optional_opt_args[13].opt = test_ARG; + +commands[78].name = "lvrename"; +commands[78].command_line_id = "lvrename_lv_lv"; +commands[78].command_line_enum = lvrename_lv_lv_CMD; +commands[78].fn = lvrename; +commands[78].ro_count = 0; +commands[78].rp_count = 2; +commands[78].oo_count = 14; +commands[78].op_count = 0; +commands[78].desc = ""; +commands[78].usage = "lvrename LV LV_new" +" [ --autobackup y|n, --reportformat String ]"; +commands[78].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[78].required_pos_args[0].pos = 1; +commands[78].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[78].required_pos_args[1].pos = 2; +commands[78].required_pos_args[1].def.val_bits = val_enum_to_bit(lv_VAL); +commands[78].required_pos_args[1].def.flags = ARG_DEF_FLAG_NEW; +commands[78].optional_opt_args[0].opt = commandprofile_ARG; +commands[78].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[78].optional_opt_args[1].opt = config_ARG; +commands[78].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[78].optional_opt_args[2].opt = debug_ARG; +commands[78].optional_opt_args[3].opt = driverloaded_ARG; +commands[78].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[78].optional_opt_args[4].opt = help_ARG; +commands[78].optional_opt_args[5].opt = profile_ARG; +commands[78].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[78].optional_opt_args[6].opt = quiet_ARG; +commands[78].optional_opt_args[7].opt = verbose_ARG; +commands[78].optional_opt_args[8].opt = version_ARG; +commands[78].optional_opt_args[9].opt = yes_ARG; +commands[78].optional_opt_args[10].opt = autobackup_ARG; +commands[78].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[78].optional_opt_args[11].opt = noudevsync_ARG; +commands[78].optional_opt_args[12].opt = reportformat_ARG; +commands[78].optional_opt_args[12].def.val_bits = val_enum_to_bit(string_VAL); +commands[78].optional_opt_args[13].opt = test_ARG; + +commands[79].name = "lvresize"; +commands[79].command_line_id = "lvresize_by_size"; +commands[79].command_line_enum = lvresize_by_size_CMD; +commands[79].fn = lvresize; +commands[79].ro_count = 1; +commands[79].rp_count = 1; +commands[79].oo_count = 22; +commands[79].op_count = 1; +commands[79].desc = "DESC: Resize an LV by a specified size."; +commands[79].usage = "lvresize --size Number[m|unit] LV" +" [ --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --nofsck, --nosync, --reportformat String, --resizefs, --stripes Number, --stripesize Number[k|unit], --poolmetadatasize Number[m|unit] ]" +" [ PV ... ]"; +commands[79].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[79].required_opt_args[0].opt = size_ARG; +commands[79].required_opt_args[0].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[79].required_pos_args[0].pos = 1; +commands[79].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[79].optional_opt_args[0].opt = commandprofile_ARG; +commands[79].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[79].optional_opt_args[1].opt = config_ARG; +commands[79].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[79].optional_opt_args[2].opt = debug_ARG; +commands[79].optional_opt_args[3].opt = driverloaded_ARG; +commands[79].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[79].optional_opt_args[4].opt = help_ARG; +commands[79].optional_opt_args[5].opt = profile_ARG; +commands[79].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[79].optional_opt_args[6].opt = quiet_ARG; +commands[79].optional_opt_args[7].opt = verbose_ARG; +commands[79].optional_opt_args[8].opt = version_ARG; +commands[79].optional_opt_args[9].opt = yes_ARG; +commands[79].optional_opt_args[10].opt = alloc_ARG; +commands[79].optional_opt_args[10].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[79].optional_opt_args[11].opt = autobackup_ARG; +commands[79].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[79].optional_opt_args[12].opt = force_ARG; +commands[79].optional_opt_args[13].opt = nofsck_ARG; +commands[79].optional_opt_args[14].opt = nosync_ARG; +commands[79].optional_opt_args[15].opt = noudevsync_ARG; +commands[79].optional_opt_args[16].opt = reportformat_ARG; +commands[79].optional_opt_args[16].def.val_bits = val_enum_to_bit(string_VAL); +commands[79].optional_opt_args[17].opt = resizefs_ARG; +commands[79].optional_opt_args[18].opt = stripes_ARG; +commands[79].optional_opt_args[18].def.val_bits = val_enum_to_bit(number_VAL); +commands[79].optional_opt_args[19].opt = stripesize_ARG; +commands[79].optional_opt_args[19].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[79].optional_opt_args[20].opt = test_ARG; +commands[79].optional_opt_args[21].opt = poolmetadatasize_ARG; +commands[79].optional_opt_args[21].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[79].optional_pos_args[0].pos = 2; +commands[79].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[79].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[80].name = "lvresize"; +commands[80].command_line_id = "lvresize_by_pv"; +commands[80].command_line_enum = lvresize_by_pv_CMD; +commands[80].fn = lvresize; +commands[80].ro_count = 0; +commands[80].rp_count = 2; +commands[80].oo_count = 21; +commands[80].op_count = 0; +commands[80].desc = "DESC: Resize an LV by a specified PV."; +commands[80].usage = "lvresize LV PV ..." +" [ --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --nofsck, --nosync, --reportformat String, --resizefs, --stripes Number, --stripesize Number[k|unit] ]"; +commands[80].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[80].required_pos_args[0].pos = 1; +commands[80].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[80].required_pos_args[1].pos = 2; +commands[80].required_pos_args[1].def.val_bits = val_enum_to_bit(pv_VAL); +commands[80].required_pos_args[1].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[80].optional_opt_args[0].opt = commandprofile_ARG; +commands[80].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[80].optional_opt_args[1].opt = config_ARG; +commands[80].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[80].optional_opt_args[2].opt = debug_ARG; +commands[80].optional_opt_args[3].opt = driverloaded_ARG; +commands[80].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[80].optional_opt_args[4].opt = help_ARG; +commands[80].optional_opt_args[5].opt = profile_ARG; +commands[80].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[80].optional_opt_args[6].opt = quiet_ARG; +commands[80].optional_opt_args[7].opt = verbose_ARG; +commands[80].optional_opt_args[8].opt = version_ARG; +commands[80].optional_opt_args[9].opt = yes_ARG; +commands[80].optional_opt_args[10].opt = alloc_ARG; +commands[80].optional_opt_args[10].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[80].optional_opt_args[11].opt = autobackup_ARG; +commands[80].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[80].optional_opt_args[12].opt = force_ARG; +commands[80].optional_opt_args[13].opt = nofsck_ARG; +commands[80].optional_opt_args[14].opt = nosync_ARG; +commands[80].optional_opt_args[15].opt = noudevsync_ARG; +commands[80].optional_opt_args[16].opt = reportformat_ARG; +commands[80].optional_opt_args[16].def.val_bits = val_enum_to_bit(string_VAL); +commands[80].optional_opt_args[17].opt = resizefs_ARG; +commands[80].optional_opt_args[18].opt = stripes_ARG; +commands[80].optional_opt_args[18].def.val_bits = val_enum_to_bit(number_VAL); +commands[80].optional_opt_args[19].opt = stripesize_ARG; +commands[80].optional_opt_args[19].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[80].optional_opt_args[20].opt = test_ARG; + +commands[81].name = "lvresize"; +commands[81].command_line_id = "lvresize_pool_metadata_by_size"; +commands[81].command_line_enum = lvresize_pool_metadata_by_size_CMD; +commands[81].fn = lvresize; +commands[81].ro_count = 1; +commands[81].rp_count = 1; +commands[81].oo_count = 20; +commands[81].op_count = 1; +commands[81].desc = "DESC: Resize the metadata SubLV of a pool LV."; +commands[81].usage = "lvresize --poolmetadatasize Number[m|unit] LV_thinpool" +" [ --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --nofsck, --nosync, --reportformat String, --stripes Number, --stripesize Number[k|unit] ]" +" [ PV ... ]"; +commands[81].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[81].required_opt_args[0].opt = poolmetadatasize_ARG; +commands[81].required_opt_args[0].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[81].required_pos_args[0].pos = 1; +commands[81].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[81].required_pos_args[0].def.lv_types = ARG_DEF_LV_THINPOOL; +commands[81].optional_opt_args[0].opt = commandprofile_ARG; +commands[81].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[81].optional_opt_args[1].opt = config_ARG; +commands[81].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[81].optional_opt_args[2].opt = debug_ARG; +commands[81].optional_opt_args[3].opt = driverloaded_ARG; +commands[81].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[81].optional_opt_args[4].opt = help_ARG; +commands[81].optional_opt_args[5].opt = profile_ARG; +commands[81].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[81].optional_opt_args[6].opt = quiet_ARG; +commands[81].optional_opt_args[7].opt = verbose_ARG; +commands[81].optional_opt_args[8].opt = version_ARG; +commands[81].optional_opt_args[9].opt = yes_ARG; +commands[81].optional_opt_args[10].opt = alloc_ARG; +commands[81].optional_opt_args[10].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[81].optional_opt_args[11].opt = autobackup_ARG; +commands[81].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[81].optional_opt_args[12].opt = force_ARG; +commands[81].optional_opt_args[13].opt = nofsck_ARG; +commands[81].optional_opt_args[14].opt = nosync_ARG; +commands[81].optional_opt_args[15].opt = noudevsync_ARG; +commands[81].optional_opt_args[16].opt = reportformat_ARG; +commands[81].optional_opt_args[16].def.val_bits = val_enum_to_bit(string_VAL); +commands[81].optional_opt_args[17].opt = stripes_ARG; +commands[81].optional_opt_args[17].def.val_bits = val_enum_to_bit(number_VAL); +commands[81].optional_opt_args[18].opt = stripesize_ARG; +commands[81].optional_opt_args[18].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[81].optional_opt_args[19].opt = test_ARG; +commands[81].optional_pos_args[0].pos = 2; +commands[81].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[81].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[82].name = "lvs"; +commands[82].command_line_id = "lvs_general"; +commands[82].command_line_enum = lvs_general_CMD; +commands[82].fn = lvs; +commands[82].ro_count = 0; +commands[82].rp_count = 0; +commands[82].oo_count = 37; +commands[82].op_count = 1; +commands[82].desc = ""; +commands[82].usage = "lvs" +" [ --history, --segments, --aligned, --all, --binary, --configreport String, --foreign, --ignorelockingfailure, --ignoreskippedcluster, --logonly, --nameprefixes, --noheadings, --nolocking, --nosuffix, --options String, --partial, --readonly, --reportformat String, --rows, --select String, --separator String, --shared, --sort String, --trustcache, --unbuffered, --units hHbBsSkKmMgGtTpPeE, --unquoted ]" +" [ VG|LV|Tag ... ]"; +commands[82].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[82].optional_opt_args[0].opt = commandprofile_ARG; +commands[82].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[82].optional_opt_args[1].opt = config_ARG; +commands[82].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[82].optional_opt_args[2].opt = debug_ARG; +commands[82].optional_opt_args[3].opt = driverloaded_ARG; +commands[82].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[82].optional_opt_args[4].opt = help_ARG; +commands[82].optional_opt_args[5].opt = profile_ARG; +commands[82].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[82].optional_opt_args[6].opt = quiet_ARG; +commands[82].optional_opt_args[7].opt = verbose_ARG; +commands[82].optional_opt_args[8].opt = version_ARG; +commands[82].optional_opt_args[9].opt = yes_ARG; +commands[82].optional_opt_args[10].opt = history_ARG; +commands[82].optional_opt_args[11].opt = segments_ARG; +commands[82].optional_opt_args[12].opt = aligned_ARG; +commands[82].optional_opt_args[13].opt = all_ARG; +commands[82].optional_opt_args[14].opt = binary_ARG; +commands[82].optional_opt_args[15].opt = configreport_ARG; +commands[82].optional_opt_args[15].def.val_bits = val_enum_to_bit(string_VAL); +commands[82].optional_opt_args[16].opt = foreign_ARG; +commands[82].optional_opt_args[17].opt = ignorelockingfailure_ARG; +commands[82].optional_opt_args[18].opt = ignoreskippedcluster_ARG; +commands[82].optional_opt_args[19].opt = logonly_ARG; +commands[82].optional_opt_args[20].opt = nameprefixes_ARG; +commands[82].optional_opt_args[21].opt = noheadings_ARG; +commands[82].optional_opt_args[22].opt = nolocking_ARG; +commands[82].optional_opt_args[23].opt = nosuffix_ARG; +commands[82].optional_opt_args[24].opt = options_ARG; +commands[82].optional_opt_args[24].def.val_bits = val_enum_to_bit(string_VAL); +commands[82].optional_opt_args[25].opt = partial_ARG; +commands[82].optional_opt_args[26].opt = readonly_ARG; +commands[82].optional_opt_args[27].opt = reportformat_ARG; +commands[82].optional_opt_args[27].def.val_bits = val_enum_to_bit(string_VAL); +commands[82].optional_opt_args[28].opt = rows_ARG; +commands[82].optional_opt_args[29].opt = select_ARG; +commands[82].optional_opt_args[29].def.val_bits = val_enum_to_bit(string_VAL); +commands[82].optional_opt_args[30].opt = separator_ARG; +commands[82].optional_opt_args[30].def.val_bits = val_enum_to_bit(string_VAL); +commands[82].optional_opt_args[31].opt = shared_ARG; +commands[82].optional_opt_args[32].opt = sort_ARG; +commands[82].optional_opt_args[32].def.val_bits = val_enum_to_bit(string_VAL); +commands[82].optional_opt_args[33].opt = trustcache_ARG; +commands[82].optional_opt_args[34].opt = unbuffered_ARG; +commands[82].optional_opt_args[35].opt = units_ARG; +commands[82].optional_opt_args[35].def.val_bits = val_enum_to_bit(units_VAL); +commands[82].optional_opt_args[36].opt = unquoted_ARG; +commands[82].optional_pos_args[0].pos = 1; +commands[82].optional_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(lv_VAL) | val_enum_to_bit(tag_VAL); +commands[82].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[83].name = "lvscan"; +commands[83].command_line_id = "lvscan_general"; +commands[83].command_line_enum = lvscan_general_CMD; +commands[83].fn = lvscan; +commands[83].ro_count = 0; +commands[83].rp_count = 0; +commands[83].oo_count = 17; +commands[83].op_count = 0; +commands[83].desc = ""; +commands[83].usage = "lvscan" +" [ --all, --blockdevice, --ignorelockingfailure, --partial, --readonly, --reportformat String, --cache ]"; +commands[83].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[83].optional_opt_args[0].opt = commandprofile_ARG; +commands[83].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[83].optional_opt_args[1].opt = config_ARG; +commands[83].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[83].optional_opt_args[2].opt = debug_ARG; +commands[83].optional_opt_args[3].opt = driverloaded_ARG; +commands[83].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[83].optional_opt_args[4].opt = help_ARG; +commands[83].optional_opt_args[5].opt = profile_ARG; +commands[83].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[83].optional_opt_args[6].opt = quiet_ARG; +commands[83].optional_opt_args[7].opt = verbose_ARG; +commands[83].optional_opt_args[8].opt = version_ARG; +commands[83].optional_opt_args[9].opt = yes_ARG; +commands[83].optional_opt_args[10].opt = all_ARG; +commands[83].optional_opt_args[11].opt = blockdevice_ARG; +commands[83].optional_opt_args[12].opt = ignorelockingfailure_ARG; +commands[83].optional_opt_args[13].opt = partial_ARG; +commands[83].optional_opt_args[14].opt = readonly_ARG; +commands[83].optional_opt_args[15].opt = reportformat_ARG; +commands[83].optional_opt_args[15].def.val_bits = val_enum_to_bit(string_VAL); +commands[83].optional_opt_args[16].opt = cache_long_ARG; + +commands[84].name = "pvchange"; +commands[84].command_line_id = "pvchange_properties_all"; +commands[84].command_line_enum = pvchange_properties_all_CMD; +commands[84].fn = pvchange; +commands[84].ro_count = 6; +commands[84].rp_count = 0; +commands[84].oo_count = 16; +commands[84].op_count = 0; +commands[84].cmd_flags = CMD_FLAG_ONE_REQUIRED_OPT; +commands[84].desc = ""; +commands[84].usage = "pvchange ( --allocatable y|n, --addtag Tag, --deltag Tag, --uuid, --metadataignore y|n, --all )" +" [ --autobackup y|n, --ignoreskippedcluster, --reportformat String, --uuid ]"; +commands[84].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[84].required_opt_args[0].opt = allocatable_ARG; +commands[84].required_opt_args[0].def.val_bits = val_enum_to_bit(bool_VAL); +commands[84].required_opt_args[1].opt = addtag_ARG; +commands[84].required_opt_args[1].def.val_bits = val_enum_to_bit(tag_VAL); +commands[84].required_opt_args[2].opt = deltag_ARG; +commands[84].required_opt_args[2].def.val_bits = val_enum_to_bit(tag_VAL); +commands[84].required_opt_args[3].opt = uuid_ARG; +commands[84].required_opt_args[4].opt = metadataignore_ARG; +commands[84].required_opt_args[4].def.val_bits = val_enum_to_bit(bool_VAL); +commands[84].required_opt_args[5].opt = all_ARG; +commands[84].optional_opt_args[0].opt = commandprofile_ARG; +commands[84].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[84].optional_opt_args[1].opt = config_ARG; +commands[84].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[84].optional_opt_args[2].opt = debug_ARG; +commands[84].optional_opt_args[3].opt = driverloaded_ARG; +commands[84].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[84].optional_opt_args[4].opt = help_ARG; +commands[84].optional_opt_args[5].opt = profile_ARG; +commands[84].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[84].optional_opt_args[6].opt = quiet_ARG; +commands[84].optional_opt_args[7].opt = verbose_ARG; +commands[84].optional_opt_args[8].opt = version_ARG; +commands[84].optional_opt_args[9].opt = yes_ARG; +commands[84].optional_opt_args[10].opt = autobackup_ARG; +commands[84].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[84].optional_opt_args[11].opt = force_ARG; +commands[84].optional_opt_args[12].opt = ignoreskippedcluster_ARG; +commands[84].optional_opt_args[13].opt = reportformat_ARG; +commands[84].optional_opt_args[13].def.val_bits = val_enum_to_bit(string_VAL); +commands[84].optional_opt_args[14].opt = test_ARG; +commands[84].optional_opt_args[15].opt = uuid_ARG; + +commands[85].name = "pvchange"; +commands[85].command_line_id = "pvchange_properties_some"; +commands[85].command_line_enum = pvchange_properties_some_CMD; +commands[85].fn = pvchange; +commands[85].ro_count = 5; +commands[85].rp_count = 1; +commands[85].oo_count = 17; +commands[85].op_count = 0; +commands[85].cmd_flags = CMD_FLAG_ONE_REQUIRED_OPT; +commands[85].desc = ""; +commands[85].usage = "pvchange ( --allocatable y|n, --addtag Tag, --deltag Tag, --uuid, --metadataignore y|n ) PV|Select ..." +" [ --select String, --autobackup y|n, --ignoreskippedcluster, --reportformat String, --uuid ]"; +commands[85].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[85].required_opt_args[0].opt = allocatable_ARG; +commands[85].required_opt_args[0].def.val_bits = val_enum_to_bit(bool_VAL); +commands[85].required_opt_args[1].opt = addtag_ARG; +commands[85].required_opt_args[1].def.val_bits = val_enum_to_bit(tag_VAL); +commands[85].required_opt_args[2].opt = deltag_ARG; +commands[85].required_opt_args[2].def.val_bits = val_enum_to_bit(tag_VAL); +commands[85].required_opt_args[3].opt = uuid_ARG; +commands[85].required_opt_args[4].opt = metadataignore_ARG; +commands[85].required_opt_args[4].def.val_bits = val_enum_to_bit(bool_VAL); +commands[85].required_pos_args[0].pos = 1; +commands[85].required_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL) | val_enum_to_bit(select_VAL); +commands[85].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[85].optional_opt_args[0].opt = commandprofile_ARG; +commands[85].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[85].optional_opt_args[1].opt = config_ARG; +commands[85].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[85].optional_opt_args[2].opt = debug_ARG; +commands[85].optional_opt_args[3].opt = driverloaded_ARG; +commands[85].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[85].optional_opt_args[4].opt = help_ARG; +commands[85].optional_opt_args[5].opt = profile_ARG; +commands[85].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[85].optional_opt_args[6].opt = quiet_ARG; +commands[85].optional_opt_args[7].opt = verbose_ARG; +commands[85].optional_opt_args[8].opt = version_ARG; +commands[85].optional_opt_args[9].opt = yes_ARG; +commands[85].optional_opt_args[10].opt = select_ARG; +commands[85].optional_opt_args[10].def.val_bits = val_enum_to_bit(string_VAL); +commands[85].optional_opt_args[11].opt = autobackup_ARG; +commands[85].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[85].optional_opt_args[12].opt = force_ARG; +commands[85].optional_opt_args[13].opt = ignoreskippedcluster_ARG; +commands[85].optional_opt_args[14].opt = reportformat_ARG; +commands[85].optional_opt_args[14].def.val_bits = val_enum_to_bit(string_VAL); +commands[85].optional_opt_args[15].opt = test_ARG; +commands[85].optional_opt_args[16].opt = uuid_ARG; + +commands[86].name = "pvresize"; +commands[86].command_line_id = "pvresize_general"; +commands[86].command_line_enum = pvresize_general_CMD; +commands[86].fn = pvresize; +commands[86].ro_count = 0; +commands[86].rp_count = 1; +commands[86].oo_count = 13; +commands[86].op_count = 0; +commands[86].desc = ""; +commands[86].usage = "pvresize PV ..." +" [ --setphysicalvolumesize Number[m|unit], --reportformat String ]"; +commands[86].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[86].required_pos_args[0].pos = 1; +commands[86].required_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[86].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[86].optional_opt_args[0].opt = commandprofile_ARG; +commands[86].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[86].optional_opt_args[1].opt = config_ARG; +commands[86].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[86].optional_opt_args[2].opt = debug_ARG; +commands[86].optional_opt_args[3].opt = driverloaded_ARG; +commands[86].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[86].optional_opt_args[4].opt = help_ARG; +commands[86].optional_opt_args[5].opt = profile_ARG; +commands[86].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[86].optional_opt_args[6].opt = quiet_ARG; +commands[86].optional_opt_args[7].opt = verbose_ARG; +commands[86].optional_opt_args[8].opt = version_ARG; +commands[86].optional_opt_args[9].opt = yes_ARG; +commands[86].optional_opt_args[10].opt = physicalvolumesize_ARG; +commands[86].optional_opt_args[10].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[86].optional_opt_args[11].opt = reportformat_ARG; +commands[86].optional_opt_args[11].def.val_bits = val_enum_to_bit(string_VAL); +commands[86].optional_opt_args[12].opt = test_ARG; + +commands[87].name = "pvck"; +commands[87].command_line_id = "pvck_general"; +commands[87].command_line_enum = pvck_general_CMD; +commands[87].fn = pvck; +commands[87].ro_count = 0; +commands[87].rp_count = 1; +commands[87].oo_count = 11; +commands[87].op_count = 0; +commands[87].desc = ""; +commands[87].usage = "pvck PV ..." +" [ --labelsector Number ]"; +commands[87].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[87].required_pos_args[0].pos = 1; +commands[87].required_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[87].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[87].optional_opt_args[0].opt = commandprofile_ARG; +commands[87].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[87].optional_opt_args[1].opt = config_ARG; +commands[87].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[87].optional_opt_args[2].opt = debug_ARG; +commands[87].optional_opt_args[3].opt = driverloaded_ARG; +commands[87].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[87].optional_opt_args[4].opt = help_ARG; +commands[87].optional_opt_args[5].opt = profile_ARG; +commands[87].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[87].optional_opt_args[6].opt = quiet_ARG; +commands[87].optional_opt_args[7].opt = verbose_ARG; +commands[87].optional_opt_args[8].opt = version_ARG; +commands[87].optional_opt_args[9].opt = yes_ARG; +commands[87].optional_opt_args[10].opt = labelsector_ARG; +commands[87].optional_opt_args[10].def.val_bits = val_enum_to_bit(number_VAL); + +commands[88].name = "pvcreate"; +commands[88].command_line_id = "pvcreate_general"; +commands[88].command_line_enum = pvcreate_general_CMD; +commands[88].fn = pvcreate; +commands[88].ro_count = 0; +commands[88].rp_count = 1; +commands[88].oo_count = 27; +commands[88].op_count = 0; +commands[88].desc = ""; +commands[88].usage = "pvcreate PV ..." +" [ --dataalignment Number[k|unit], --dataalignmentoffset Number[k|unit], --bootloaderareasize Number[m|unit], --labelsector Number, --metadatatype lvm2|lvm1, --pvmetadatacopies Number, --metadatacopies all|unmanaged|Number, --metadatasize Number[m|unit], --metadataignore y|n, --norestorefile, --setphysicalvolumesize Number[m|unit], --reportformat String, --restorefile String, --uuid String, --zero y|n ]"; +commands[88].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[88].required_pos_args[0].pos = 1; +commands[88].required_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[88].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[88].optional_opt_args[0].opt = commandprofile_ARG; +commands[88].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[88].optional_opt_args[1].opt = config_ARG; +commands[88].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[88].optional_opt_args[2].opt = debug_ARG; +commands[88].optional_opt_args[3].opt = driverloaded_ARG; +commands[88].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[88].optional_opt_args[4].opt = help_ARG; +commands[88].optional_opt_args[5].opt = profile_ARG; +commands[88].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[88].optional_opt_args[6].opt = quiet_ARG; +commands[88].optional_opt_args[7].opt = verbose_ARG; +commands[88].optional_opt_args[8].opt = version_ARG; +commands[88].optional_opt_args[9].opt = yes_ARG; +commands[88].optional_opt_args[10].opt = dataalignment_ARG; +commands[88].optional_opt_args[10].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[88].optional_opt_args[11].opt = dataalignmentoffset_ARG; +commands[88].optional_opt_args[11].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[88].optional_opt_args[12].opt = bootloaderareasize_ARG; +commands[88].optional_opt_args[12].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[88].optional_opt_args[13].opt = force_ARG; +commands[88].optional_opt_args[14].opt = test_ARG; +commands[88].optional_opt_args[15].opt = labelsector_ARG; +commands[88].optional_opt_args[15].def.val_bits = val_enum_to_bit(number_VAL); +commands[88].optional_opt_args[16].opt = metadatatype_ARG; +commands[88].optional_opt_args[16].def.val_bits = val_enum_to_bit(metadatatype_VAL); +commands[88].optional_opt_args[17].opt = pvmetadatacopies_ARG; +commands[88].optional_opt_args[17].def.val_bits = val_enum_to_bit(number_VAL); +commands[88].optional_opt_args[18].opt = metadatacopies_ARG; +commands[88].optional_opt_args[18].def.val_bits = val_enum_to_bit(metadatacopies_VAL); +commands[88].optional_opt_args[19].opt = metadatasize_ARG; +commands[88].optional_opt_args[19].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[88].optional_opt_args[20].opt = metadataignore_ARG; +commands[88].optional_opt_args[20].def.val_bits = val_enum_to_bit(bool_VAL); +commands[88].optional_opt_args[21].opt = norestorefile_ARG; +commands[88].optional_opt_args[22].opt = physicalvolumesize_ARG; +commands[88].optional_opt_args[22].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[88].optional_opt_args[23].opt = reportformat_ARG; +commands[88].optional_opt_args[23].def.val_bits = val_enum_to_bit(string_VAL); +commands[88].optional_opt_args[24].opt = restorefile_ARG; +commands[88].optional_opt_args[24].def.val_bits = val_enum_to_bit(string_VAL); +commands[88].optional_opt_args[25].opt = uuidstr_ARG; +commands[88].optional_opt_args[25].def.val_bits = val_enum_to_bit(string_VAL); +commands[88].optional_opt_args[26].opt = zero_ARG; +commands[88].optional_opt_args[26].def.val_bits = val_enum_to_bit(bool_VAL); + +commands[89].name = "pvdisplay"; +commands[89].command_line_id = "pvdisplay_general"; +commands[89].command_line_enum = pvdisplay_general_CMD; +commands[89].fn = pvdisplay; +commands[89].ro_count = 0; +commands[89].rp_count = 0; +commands[89].oo_count = 33; +commands[89].op_count = 1; +commands[89].desc = ""; +commands[89].usage = "pvdisplay" +" [ --aligned, --all, --binary, --colon, --columns, --configreport String, --foreign, --ignorelockingfailure, --ignoreskippedcluster, --logonly, --maps, --noheadings, --nosuffix, --options String, --readonly, --reportformat String, --select String, --separator String, --shared, --short, --sort String, --unbuffered, --units hHbBsSkKmMgGtTpPeE ]" +" [ PV|Tag ... ]"; +commands[89].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[89].optional_opt_args[0].opt = commandprofile_ARG; +commands[89].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[89].optional_opt_args[1].opt = config_ARG; +commands[89].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[89].optional_opt_args[2].opt = debug_ARG; +commands[89].optional_opt_args[3].opt = driverloaded_ARG; +commands[89].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[89].optional_opt_args[4].opt = help_ARG; +commands[89].optional_opt_args[5].opt = profile_ARG; +commands[89].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[89].optional_opt_args[6].opt = quiet_ARG; +commands[89].optional_opt_args[7].opt = verbose_ARG; +commands[89].optional_opt_args[8].opt = version_ARG; +commands[89].optional_opt_args[9].opt = yes_ARG; +commands[89].optional_opt_args[10].opt = aligned_ARG; +commands[89].optional_opt_args[11].opt = all_ARG; +commands[89].optional_opt_args[12].opt = binary_ARG; +commands[89].optional_opt_args[13].opt = colon_ARG; +commands[89].optional_opt_args[14].opt = columns_ARG; +commands[89].optional_opt_args[15].opt = configreport_ARG; +commands[89].optional_opt_args[15].def.val_bits = val_enum_to_bit(string_VAL); +commands[89].optional_opt_args[16].opt = foreign_ARG; +commands[89].optional_opt_args[17].opt = ignorelockingfailure_ARG; +commands[89].optional_opt_args[18].opt = ignoreskippedcluster_ARG; +commands[89].optional_opt_args[19].opt = logonly_ARG; +commands[89].optional_opt_args[20].opt = maps_ARG; +commands[89].optional_opt_args[21].opt = noheadings_ARG; +commands[89].optional_opt_args[22].opt = nosuffix_ARG; +commands[89].optional_opt_args[23].opt = options_ARG; +commands[89].optional_opt_args[23].def.val_bits = val_enum_to_bit(string_VAL); +commands[89].optional_opt_args[24].opt = readonly_ARG; +commands[89].optional_opt_args[25].opt = reportformat_ARG; +commands[89].optional_opt_args[25].def.val_bits = val_enum_to_bit(string_VAL); +commands[89].optional_opt_args[26].opt = select_ARG; +commands[89].optional_opt_args[26].def.val_bits = val_enum_to_bit(string_VAL); +commands[89].optional_opt_args[27].opt = separator_ARG; +commands[89].optional_opt_args[27].def.val_bits = val_enum_to_bit(string_VAL); +commands[89].optional_opt_args[28].opt = shared_ARG; +commands[89].optional_opt_args[29].opt = short_ARG; +commands[89].optional_opt_args[30].opt = sort_ARG; +commands[89].optional_opt_args[30].def.val_bits = val_enum_to_bit(string_VAL); +commands[89].optional_opt_args[31].opt = unbuffered_ARG; +commands[89].optional_opt_args[32].opt = units_ARG; +commands[89].optional_opt_args[32].def.val_bits = val_enum_to_bit(units_VAL); +commands[89].optional_pos_args[0].pos = 1; +commands[89].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL) | val_enum_to_bit(tag_VAL); +commands[89].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[90].name = "pvmove"; +commands[90].command_line_id = "pvmove_one"; +commands[90].command_line_enum = pvmove_one_CMD; +commands[90].fn = pvmove; +commands[90].ro_count = 0; +commands[90].rp_count = 1; +commands[90].oo_count = 20; +commands[90].op_count = 1; +commands[90].desc = ""; +commands[90].usage = "pvmove PV" +" [ --abort, --alloc contiguous|cling|normal|anywhere|inherit, --atomic, --autobackup y|n, --background, --interval Number, --name LV, --reportformat String ]" +" [ PV ... ]"; +commands[90].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[90].required_pos_args[0].pos = 1; +commands[90].required_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[90].optional_opt_args[0].opt = commandprofile_ARG; +commands[90].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[90].optional_opt_args[1].opt = config_ARG; +commands[90].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[90].optional_opt_args[2].opt = debug_ARG; +commands[90].optional_opt_args[3].opt = driverloaded_ARG; +commands[90].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[90].optional_opt_args[4].opt = help_ARG; +commands[90].optional_opt_args[5].opt = profile_ARG; +commands[90].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[90].optional_opt_args[6].opt = quiet_ARG; +commands[90].optional_opt_args[7].opt = verbose_ARG; +commands[90].optional_opt_args[8].opt = version_ARG; +commands[90].optional_opt_args[9].opt = yes_ARG; +commands[90].optional_opt_args[10].opt = abort_ARG; +commands[90].optional_opt_args[11].opt = alloc_ARG; +commands[90].optional_opt_args[11].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[90].optional_opt_args[12].opt = atomic_ARG; +commands[90].optional_opt_args[13].opt = autobackup_ARG; +commands[90].optional_opt_args[13].def.val_bits = val_enum_to_bit(bool_VAL); +commands[90].optional_opt_args[14].opt = background_ARG; +commands[90].optional_opt_args[15].opt = interval_ARG; +commands[90].optional_opt_args[15].def.val_bits = val_enum_to_bit(number_VAL); +commands[90].optional_opt_args[16].opt = name_ARG; +commands[90].optional_opt_args[16].def.val_bits = val_enum_to_bit(lv_VAL); +commands[90].optional_opt_args[17].opt = noudevsync_ARG; +commands[90].optional_opt_args[18].opt = reportformat_ARG; +commands[90].optional_opt_args[18].def.val_bits = val_enum_to_bit(string_VAL); +commands[90].optional_opt_args[19].opt = test_ARG; +commands[90].optional_pos_args[0].pos = 2; +commands[90].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[90].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[91].name = "pvmove"; +commands[91].command_line_id = "pvmove_any"; +commands[91].command_line_enum = pvmove_any_CMD; +commands[91].fn = pvmove; +commands[91].ro_count = 0; +commands[91].rp_count = 0; +commands[91].oo_count = 13; +commands[91].op_count = 0; +commands[91].desc = ""; +commands[91].usage = "pvmove" +" [ --abort, --background ]"; +commands[91].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[91].optional_opt_args[0].opt = commandprofile_ARG; +commands[91].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[91].optional_opt_args[1].opt = config_ARG; +commands[91].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[91].optional_opt_args[2].opt = debug_ARG; +commands[91].optional_opt_args[3].opt = driverloaded_ARG; +commands[91].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[91].optional_opt_args[4].opt = help_ARG; +commands[91].optional_opt_args[5].opt = profile_ARG; +commands[91].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[91].optional_opt_args[6].opt = quiet_ARG; +commands[91].optional_opt_args[7].opt = verbose_ARG; +commands[91].optional_opt_args[8].opt = version_ARG; +commands[91].optional_opt_args[9].opt = yes_ARG; +commands[91].optional_opt_args[10].opt = abort_ARG; +commands[91].optional_opt_args[11].opt = background_ARG; +commands[91].optional_opt_args[12].opt = test_ARG; + +commands[92].name = "pvremove"; +commands[92].command_line_id = "pvremove_general"; +commands[92].command_line_enum = pvremove_general_CMD; +commands[92].fn = pvremove; +commands[92].ro_count = 0; +commands[92].rp_count = 1; +commands[92].oo_count = 13; +commands[92].op_count = 0; +commands[92].desc = ""; +commands[92].usage = "pvremove PV ..." +" [ --reportformat String ]"; +commands[92].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[92].required_pos_args[0].pos = 1; +commands[92].required_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[92].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[92].optional_opt_args[0].opt = commandprofile_ARG; +commands[92].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[92].optional_opt_args[1].opt = config_ARG; +commands[92].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[92].optional_opt_args[2].opt = debug_ARG; +commands[92].optional_opt_args[3].opt = driverloaded_ARG; +commands[92].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[92].optional_opt_args[4].opt = help_ARG; +commands[92].optional_opt_args[5].opt = profile_ARG; +commands[92].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[92].optional_opt_args[6].opt = quiet_ARG; +commands[92].optional_opt_args[7].opt = verbose_ARG; +commands[92].optional_opt_args[8].opt = version_ARG; +commands[92].optional_opt_args[9].opt = yes_ARG; +commands[92].optional_opt_args[10].opt = force_ARG; +commands[92].optional_opt_args[11].opt = reportformat_ARG; +commands[92].optional_opt_args[11].def.val_bits = val_enum_to_bit(string_VAL); +commands[92].optional_opt_args[12].opt = test_ARG; + +commands[93].name = "pvs"; +commands[93].command_line_id = "pvs_general"; +commands[93].command_line_enum = pvs_general_CMD; +commands[93].fn = pvs; +commands[93].ro_count = 0; +commands[93].rp_count = 0; +commands[93].oo_count = 36; +commands[93].op_count = 1; +commands[93].desc = ""; +commands[93].usage = "pvs" +" [ --segments, --aligned, --all, --binary, --configreport String, --foreign, --ignorelockingfailure, --ignoreskippedcluster, --logonly, --nameprefixes, --noheadings, --nolocking, --nosuffix, --options String, --partial, --readonly, --reportformat String, --rows, --select String, --separator String, --shared, --sort String, --trustcache, --unbuffered, --units hHbBsSkKmMgGtTpPeE, --unquoted ]" +" [ PV|Tag ... ]"; +commands[93].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[93].optional_opt_args[0].opt = commandprofile_ARG; +commands[93].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[93].optional_opt_args[1].opt = config_ARG; +commands[93].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[93].optional_opt_args[2].opt = debug_ARG; +commands[93].optional_opt_args[3].opt = driverloaded_ARG; +commands[93].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[93].optional_opt_args[4].opt = help_ARG; +commands[93].optional_opt_args[5].opt = profile_ARG; +commands[93].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[93].optional_opt_args[6].opt = quiet_ARG; +commands[93].optional_opt_args[7].opt = verbose_ARG; +commands[93].optional_opt_args[8].opt = version_ARG; +commands[93].optional_opt_args[9].opt = yes_ARG; +commands[93].optional_opt_args[10].opt = segments_ARG; +commands[93].optional_opt_args[11].opt = aligned_ARG; +commands[93].optional_opt_args[12].opt = all_ARG; +commands[93].optional_opt_args[13].opt = binary_ARG; +commands[93].optional_opt_args[14].opt = configreport_ARG; +commands[93].optional_opt_args[14].def.val_bits = val_enum_to_bit(string_VAL); +commands[93].optional_opt_args[15].opt = foreign_ARG; +commands[93].optional_opt_args[16].opt = ignorelockingfailure_ARG; +commands[93].optional_opt_args[17].opt = ignoreskippedcluster_ARG; +commands[93].optional_opt_args[18].opt = logonly_ARG; +commands[93].optional_opt_args[19].opt = nameprefixes_ARG; +commands[93].optional_opt_args[20].opt = noheadings_ARG; +commands[93].optional_opt_args[21].opt = nolocking_ARG; +commands[93].optional_opt_args[22].opt = nosuffix_ARG; +commands[93].optional_opt_args[23].opt = options_ARG; +commands[93].optional_opt_args[23].def.val_bits = val_enum_to_bit(string_VAL); +commands[93].optional_opt_args[24].opt = partial_ARG; +commands[93].optional_opt_args[25].opt = readonly_ARG; +commands[93].optional_opt_args[26].opt = reportformat_ARG; +commands[93].optional_opt_args[26].def.val_bits = val_enum_to_bit(string_VAL); +commands[93].optional_opt_args[27].opt = rows_ARG; +commands[93].optional_opt_args[28].opt = select_ARG; +commands[93].optional_opt_args[28].def.val_bits = val_enum_to_bit(string_VAL); +commands[93].optional_opt_args[29].opt = separator_ARG; +commands[93].optional_opt_args[29].def.val_bits = val_enum_to_bit(string_VAL); +commands[93].optional_opt_args[30].opt = shared_ARG; +commands[93].optional_opt_args[31].opt = sort_ARG; +commands[93].optional_opt_args[31].def.val_bits = val_enum_to_bit(string_VAL); +commands[93].optional_opt_args[32].opt = trustcache_ARG; +commands[93].optional_opt_args[33].opt = unbuffered_ARG; +commands[93].optional_opt_args[34].opt = units_ARG; +commands[93].optional_opt_args[34].def.val_bits = val_enum_to_bit(units_VAL); +commands[93].optional_opt_args[35].opt = unquoted_ARG; +commands[93].optional_pos_args[0].pos = 1; +commands[93].optional_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL) | val_enum_to_bit(tag_VAL); +commands[93].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[94].name = "pvscan"; +commands[94].command_line_id = "pvscan_show"; +commands[94].command_line_enum = pvscan_show_CMD; +commands[94].fn = pvscan; +commands[94].ro_count = 0; +commands[94].rp_count = 0; +commands[94].oo_count = 16; +commands[94].op_count = 0; +commands[94].desc = ""; +commands[94].usage = "pvscan" +" [ --ignorelockingfailure, --reportformat String, --exported, --novolumegroup, --short, --uuid ]"; +commands[94].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[94].optional_opt_args[0].opt = commandprofile_ARG; +commands[94].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[94].optional_opt_args[1].opt = config_ARG; +commands[94].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[94].optional_opt_args[2].opt = debug_ARG; +commands[94].optional_opt_args[3].opt = driverloaded_ARG; +commands[94].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[94].optional_opt_args[4].opt = help_ARG; +commands[94].optional_opt_args[5].opt = profile_ARG; +commands[94].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[94].optional_opt_args[6].opt = quiet_ARG; +commands[94].optional_opt_args[7].opt = verbose_ARG; +commands[94].optional_opt_args[8].opt = version_ARG; +commands[94].optional_opt_args[9].opt = yes_ARG; +commands[94].optional_opt_args[10].opt = ignorelockingfailure_ARG; +commands[94].optional_opt_args[11].opt = reportformat_ARG; +commands[94].optional_opt_args[11].def.val_bits = val_enum_to_bit(string_VAL); +commands[94].optional_opt_args[12].opt = exported_ARG; +commands[94].optional_opt_args[13].opt = novolumegroup_ARG; +commands[94].optional_opt_args[14].opt = short_ARG; +commands[94].optional_opt_args[15].opt = uuid_ARG; + +commands[95].name = "pvscan"; +commands[95].command_line_id = "pvscan_cache"; +commands[95].command_line_enum = pvscan_cache_CMD; +commands[95].fn = pvscan; +commands[95].ro_count = 1; +commands[95].rp_count = 0; +commands[95].oo_count = 16; +commands[95].op_count = 1; +commands[95].desc = ""; +commands[95].usage = "pvscan --cache" +" [ --ignorelockingfailure, --reportformat String, --background, --activate y|n|ay, --major Number, --minor Number ]" +" [ String|PV ... ]"; +commands[95].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[95].required_opt_args[0].opt = cache_long_ARG; +commands[95].optional_opt_args[0].opt = commandprofile_ARG; +commands[95].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[95].optional_opt_args[1].opt = config_ARG; +commands[95].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[95].optional_opt_args[2].opt = debug_ARG; +commands[95].optional_opt_args[3].opt = driverloaded_ARG; +commands[95].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[95].optional_opt_args[4].opt = help_ARG; +commands[95].optional_opt_args[5].opt = profile_ARG; +commands[95].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[95].optional_opt_args[6].opt = quiet_ARG; +commands[95].optional_opt_args[7].opt = verbose_ARG; +commands[95].optional_opt_args[8].opt = version_ARG; +commands[95].optional_opt_args[9].opt = yes_ARG; +commands[95].optional_opt_args[10].opt = ignorelockingfailure_ARG; +commands[95].optional_opt_args[11].opt = reportformat_ARG; +commands[95].optional_opt_args[11].def.val_bits = val_enum_to_bit(string_VAL); +commands[95].optional_opt_args[12].opt = background_ARG; +commands[95].optional_opt_args[13].opt = activate_ARG; +commands[95].optional_opt_args[13].def.val_bits = val_enum_to_bit(activation_VAL); +commands[95].optional_opt_args[14].opt = major_ARG; +commands[95].optional_opt_args[14].def.val_bits = val_enum_to_bit(number_VAL); +commands[95].optional_opt_args[15].opt = minor_ARG; +commands[95].optional_opt_args[15].def.val_bits = val_enum_to_bit(number_VAL); +commands[95].optional_pos_args[0].pos = 1; +commands[95].optional_pos_args[0].def.val_bits = val_enum_to_bit(string_VAL) | val_enum_to_bit(pv_VAL); +commands[95].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[96].name = "vgcfgbackup"; +commands[96].command_line_id = "vgcfgbackup_general"; +commands[96].command_line_enum = vgcfgbackup_general_CMD; +commands[96].fn = vgcfgbackup; +commands[96].ro_count = 0; +commands[96].rp_count = 0; +commands[96].oo_count = 16; +commands[96].op_count = 1; +commands[96].desc = ""; +commands[96].usage = "vgcfgbackup" +" [ --file String, --foreign, --ignorelockingfailure, --partial, --readonly, --reportformat String ]" +" [ VG ... ]"; +commands[96].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[96].optional_opt_args[0].opt = commandprofile_ARG; +commands[96].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[96].optional_opt_args[1].opt = config_ARG; +commands[96].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[96].optional_opt_args[2].opt = debug_ARG; +commands[96].optional_opt_args[3].opt = driverloaded_ARG; +commands[96].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[96].optional_opt_args[4].opt = help_ARG; +commands[96].optional_opt_args[5].opt = profile_ARG; +commands[96].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[96].optional_opt_args[6].opt = quiet_ARG; +commands[96].optional_opt_args[7].opt = verbose_ARG; +commands[96].optional_opt_args[8].opt = version_ARG; +commands[96].optional_opt_args[9].opt = yes_ARG; +commands[96].optional_opt_args[10].opt = file_ARG; +commands[96].optional_opt_args[10].def.val_bits = val_enum_to_bit(string_VAL); +commands[96].optional_opt_args[11].opt = foreign_ARG; +commands[96].optional_opt_args[12].opt = ignorelockingfailure_ARG; +commands[96].optional_opt_args[13].opt = partial_ARG; +commands[96].optional_opt_args[14].opt = readonly_ARG; +commands[96].optional_opt_args[15].opt = reportformat_ARG; +commands[96].optional_opt_args[15].def.val_bits = val_enum_to_bit(string_VAL); +commands[96].optional_pos_args[0].pos = 1; +commands[96].optional_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[96].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[97].name = "vgcfgrestore"; +commands[97].command_line_id = "vgcfgrestore_by_vg"; +commands[97].command_line_enum = vgcfgrestore_by_vg_CMD; +commands[97].fn = vgcfgrestore; +commands[97].ro_count = 0; +commands[97].rp_count = 1; +commands[97].oo_count = 15; +commands[97].op_count = 0; +commands[97].desc = ""; +commands[97].usage = "vgcfgrestore VG" +" [ --file String, --force, --list, --metadatatype lvm2|lvm1 ]"; +commands[97].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[97].required_pos_args[0].pos = 1; +commands[97].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[97].optional_opt_args[0].opt = commandprofile_ARG; +commands[97].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[97].optional_opt_args[1].opt = config_ARG; +commands[97].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[97].optional_opt_args[2].opt = debug_ARG; +commands[97].optional_opt_args[3].opt = driverloaded_ARG; +commands[97].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[97].optional_opt_args[4].opt = help_ARG; +commands[97].optional_opt_args[5].opt = profile_ARG; +commands[97].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[97].optional_opt_args[6].opt = quiet_ARG; +commands[97].optional_opt_args[7].opt = verbose_ARG; +commands[97].optional_opt_args[8].opt = version_ARG; +commands[97].optional_opt_args[9].opt = yes_ARG; +commands[97].optional_opt_args[10].opt = file_ARG; +commands[97].optional_opt_args[10].def.val_bits = val_enum_to_bit(string_VAL); +commands[97].optional_opt_args[11].opt = force_long_ARG; +commands[97].optional_opt_args[12].opt = list_ARG; +commands[97].optional_opt_args[13].opt = metadatatype_ARG; +commands[97].optional_opt_args[13].def.val_bits = val_enum_to_bit(metadatatype_VAL); +commands[97].optional_opt_args[14].opt = test_ARG; + +commands[98].name = "vgcfgrestore"; +commands[98].command_line_id = "vgcfgrestore_by_file"; +commands[98].command_line_enum = vgcfgrestore_by_file_CMD; +commands[98].fn = vgcfgrestore; +commands[98].ro_count = 2; +commands[98].rp_count = 0; +commands[98].oo_count = 10; +commands[98].op_count = 0; +commands[98].desc = ""; +commands[98].usage = "vgcfgrestore --list --file String"; +commands[98].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[98].required_opt_args[0].opt = list_ARG; +commands[98].required_opt_args[1].opt = file_ARG; +commands[98].required_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[98].optional_opt_args[0].opt = commandprofile_ARG; +commands[98].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[98].optional_opt_args[1].opt = config_ARG; +commands[98].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[98].optional_opt_args[2].opt = debug_ARG; +commands[98].optional_opt_args[3].opt = driverloaded_ARG; +commands[98].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[98].optional_opt_args[4].opt = help_ARG; +commands[98].optional_opt_args[5].opt = profile_ARG; +commands[98].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[98].optional_opt_args[6].opt = quiet_ARG; +commands[98].optional_opt_args[7].opt = verbose_ARG; +commands[98].optional_opt_args[8].opt = version_ARG; +commands[98].optional_opt_args[9].opt = yes_ARG; + +commands[99].name = "vgchange"; +commands[99].command_line_id = "vgchange_properties"; +commands[99].command_line_enum = vgchange_properties_CMD; +commands[99].fn = vgchange; +commands[99].ro_count = 16; +commands[99].rp_count = 0; +commands[99].oo_count = 18; +commands[99].op_count = 1; +commands[99].cmd_flags = CMD_FLAG_ONE_REQUIRED_OPT; +commands[99].desc = ""; +commands[99].usage = "vgchange ( --addtag Tag, --deltag Tag, --logicalvolume Number, --maxphysicalvolumes Number, --alloc contiguous|cling|normal|anywhere|inherit, --uuid, --clustered y|n, --metadatacopies all|unmanaged|Number, --vgmetadatacopies all|unmanaged|Number, --physicalextentsize Number[m|unit], --resizeable y|n, --systemid String, --locktype sanlock|dlm|none, --profile String, --detachprofile, --metadataprofile String )" +" [ --autobackup y|n, --ignoremonitoring, --ignoreskippedcluster, --reportformat String, --select String ]" +" [ VG|Tag ... ]"; +commands[99].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[99].required_opt_args[0].opt = addtag_ARG; +commands[99].required_opt_args[0].def.val_bits = val_enum_to_bit(tag_VAL); +commands[99].required_opt_args[1].opt = deltag_ARG; +commands[99].required_opt_args[1].def.val_bits = val_enum_to_bit(tag_VAL); +commands[99].required_opt_args[2].opt = logicalvolume_ARG; +commands[99].required_opt_args[2].def.val_bits = val_enum_to_bit(number_VAL); +commands[99].required_opt_args[3].opt = maxphysicalvolumes_ARG; +commands[99].required_opt_args[3].def.val_bits = val_enum_to_bit(number_VAL); +commands[99].required_opt_args[4].opt = alloc_ARG; +commands[99].required_opt_args[4].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[99].required_opt_args[5].opt = uuid_ARG; +commands[99].required_opt_args[6].opt = clustered_ARG; +commands[99].required_opt_args[6].def.val_bits = val_enum_to_bit(bool_VAL); +commands[99].required_opt_args[7].opt = metadatacopies_ARG; +commands[99].required_opt_args[7].def.val_bits = val_enum_to_bit(metadatacopies_VAL); +commands[99].required_opt_args[8].opt = vgmetadatacopies_ARG; +commands[99].required_opt_args[8].def.val_bits = val_enum_to_bit(metadatacopies_VAL); +commands[99].required_opt_args[9].opt = physicalextentsize_ARG; +commands[99].required_opt_args[9].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[99].required_opt_args[10].opt = resizeable_ARG; +commands[99].required_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[99].required_opt_args[11].opt = systemid_ARG; +commands[99].required_opt_args[11].def.val_bits = val_enum_to_bit(string_VAL); +commands[99].required_opt_args[12].opt = locktype_ARG; +commands[99].required_opt_args[12].def.val_bits = val_enum_to_bit(locktype_VAL); +commands[99].required_opt_args[13].opt = profile_ARG; +commands[99].required_opt_args[13].def.val_bits = val_enum_to_bit(string_VAL); +commands[99].required_opt_args[14].opt = detachprofile_ARG; +commands[99].required_opt_args[15].opt = metadataprofile_ARG; +commands[99].required_opt_args[15].def.val_bits = val_enum_to_bit(string_VAL); +commands[99].optional_opt_args[0].opt = commandprofile_ARG; +commands[99].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[99].optional_opt_args[1].opt = config_ARG; +commands[99].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[99].optional_opt_args[2].opt = debug_ARG; +commands[99].optional_opt_args[3].opt = driverloaded_ARG; +commands[99].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[99].optional_opt_args[4].opt = help_ARG; +commands[99].optional_opt_args[5].opt = profile_ARG; +commands[99].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[99].optional_opt_args[6].opt = quiet_ARG; +commands[99].optional_opt_args[7].opt = verbose_ARG; +commands[99].optional_opt_args[8].opt = version_ARG; +commands[99].optional_opt_args[9].opt = yes_ARG; +commands[99].optional_opt_args[10].opt = autobackup_ARG; +commands[99].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[99].optional_opt_args[11].opt = ignoremonitoring_ARG; +commands[99].optional_opt_args[12].opt = ignoreskippedcluster_ARG; +commands[99].optional_opt_args[13].opt = noudevsync_ARG; +commands[99].optional_opt_args[14].opt = reportformat_ARG; +commands[99].optional_opt_args[14].def.val_bits = val_enum_to_bit(string_VAL); +commands[99].optional_opt_args[15].opt = select_ARG; +commands[99].optional_opt_args[15].def.val_bits = val_enum_to_bit(string_VAL); +commands[99].optional_opt_args[16].opt = test_ARG; +commands[99].optional_opt_args[17].opt = force_ARG; +commands[99].optional_pos_args[0].pos = 1; +commands[99].optional_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(tag_VAL); +commands[99].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[100].name = "vgchange"; +commands[100].command_line_id = "vgchange_monitor"; +commands[100].command_line_enum = vgchange_monitor_CMD; +commands[100].fn = vgchange; +commands[100].ro_count = 1; +commands[100].rp_count = 0; +commands[100].oo_count = 37; +commands[100].op_count = 1; +commands[100].desc = ""; +commands[100].usage = "vgchange --monitor y|n" +" [ --sysinit, --ignorelockingfailure, --poll y|n, --addtag Tag, --deltag Tag, --logicalvolume Number, --maxphysicalvolumes Number, --alloc contiguous|cling|normal|anywhere|inherit, --uuid, --clustered y|n, --metadatacopies all|unmanaged|Number, --vgmetadatacopies all|unmanaged|Number, --physicalextentsize Number[m|unit], --resizeable y|n, --systemid String, --locktype sanlock|dlm|none, --detachprofile, --metadataprofile String, --autobackup y|n, --ignoremonitoring, --ignoreskippedcluster, --reportformat String, --select String ]" +" [ VG|Tag ... ]"; +commands[100].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[100].required_opt_args[0].opt = monitor_ARG; +commands[100].required_opt_args[0].def.val_bits = val_enum_to_bit(bool_VAL); +commands[100].optional_opt_args[0].opt = commandprofile_ARG; +commands[100].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[100].optional_opt_args[1].opt = config_ARG; +commands[100].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[100].optional_opt_args[2].opt = debug_ARG; +commands[100].optional_opt_args[3].opt = driverloaded_ARG; +commands[100].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[100].optional_opt_args[4].opt = help_ARG; +commands[100].optional_opt_args[5].opt = profile_ARG; +commands[100].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[100].optional_opt_args[6].opt = quiet_ARG; +commands[100].optional_opt_args[7].opt = verbose_ARG; +commands[100].optional_opt_args[8].opt = version_ARG; +commands[100].optional_opt_args[9].opt = yes_ARG; +commands[100].optional_opt_args[10].opt = sysinit_ARG; +commands[100].optional_opt_args[11].opt = ignorelockingfailure_ARG; +commands[100].optional_opt_args[12].opt = poll_ARG; +commands[100].optional_opt_args[12].def.val_bits = val_enum_to_bit(bool_VAL); +commands[100].optional_opt_args[13].opt = addtag_ARG; +commands[100].optional_opt_args[13].def.val_bits = val_enum_to_bit(tag_VAL); +commands[100].optional_opt_args[14].opt = deltag_ARG; +commands[100].optional_opt_args[14].def.val_bits = val_enum_to_bit(tag_VAL); +commands[100].optional_opt_args[15].opt = logicalvolume_ARG; +commands[100].optional_opt_args[15].def.val_bits = val_enum_to_bit(number_VAL); +commands[100].optional_opt_args[16].opt = maxphysicalvolumes_ARG; +commands[100].optional_opt_args[16].def.val_bits = val_enum_to_bit(number_VAL); +commands[100].optional_opt_args[17].opt = alloc_ARG; +commands[100].optional_opt_args[17].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[100].optional_opt_args[18].opt = uuid_ARG; +commands[100].optional_opt_args[19].opt = clustered_ARG; +commands[100].optional_opt_args[19].def.val_bits = val_enum_to_bit(bool_VAL); +commands[100].optional_opt_args[20].opt = metadatacopies_ARG; +commands[100].optional_opt_args[20].def.val_bits = val_enum_to_bit(metadatacopies_VAL); +commands[100].optional_opt_args[21].opt = vgmetadatacopies_ARG; +commands[100].optional_opt_args[21].def.val_bits = val_enum_to_bit(metadatacopies_VAL); +commands[100].optional_opt_args[22].opt = physicalextentsize_ARG; +commands[100].optional_opt_args[22].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[100].optional_opt_args[23].opt = resizeable_ARG; +commands[100].optional_opt_args[23].def.val_bits = val_enum_to_bit(bool_VAL); +commands[100].optional_opt_args[24].opt = systemid_ARG; +commands[100].optional_opt_args[24].def.val_bits = val_enum_to_bit(string_VAL); +commands[100].optional_opt_args[25].opt = locktype_ARG; +commands[100].optional_opt_args[25].def.val_bits = val_enum_to_bit(locktype_VAL); +commands[100].optional_opt_args[26].opt = profile_ARG; +commands[100].optional_opt_args[26].def.val_bits = val_enum_to_bit(string_VAL); +commands[100].optional_opt_args[27].opt = detachprofile_ARG; +commands[100].optional_opt_args[28].opt = metadataprofile_ARG; +commands[100].optional_opt_args[28].def.val_bits = val_enum_to_bit(string_VAL); +commands[100].optional_opt_args[29].opt = autobackup_ARG; +commands[100].optional_opt_args[29].def.val_bits = val_enum_to_bit(bool_VAL); +commands[100].optional_opt_args[30].opt = ignoremonitoring_ARG; +commands[100].optional_opt_args[31].opt = ignoreskippedcluster_ARG; +commands[100].optional_opt_args[32].opt = noudevsync_ARG; +commands[100].optional_opt_args[33].opt = reportformat_ARG; +commands[100].optional_opt_args[33].def.val_bits = val_enum_to_bit(string_VAL); +commands[100].optional_opt_args[34].opt = select_ARG; +commands[100].optional_opt_args[34].def.val_bits = val_enum_to_bit(string_VAL); +commands[100].optional_opt_args[35].opt = test_ARG; +commands[100].optional_opt_args[36].opt = force_ARG; +commands[100].optional_pos_args[0].pos = 1; +commands[100].optional_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(tag_VAL); +commands[100].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[101].name = "vgchange"; +commands[101].command_line_id = "vgchange_poll"; +commands[101].command_line_enum = vgchange_poll_CMD; +commands[101].fn = vgchange; +commands[101].ro_count = 1; +commands[101].rp_count = 0; +commands[101].oo_count = 35; +commands[101].op_count = 1; +commands[101].desc = ""; +commands[101].usage = "vgchange --poll y|n" +" [ --ignorelockingfailure, --addtag Tag, --deltag Tag, --logicalvolume Number, --maxphysicalvolumes Number, --alloc contiguous|cling|normal|anywhere|inherit, --uuid, --clustered y|n, --metadatacopies all|unmanaged|Number, --vgmetadatacopies all|unmanaged|Number, --physicalextentsize Number[m|unit], --resizeable y|n, --systemid String, --locktype sanlock|dlm|none, --detachprofile, --metadataprofile String, --autobackup y|n, --ignoremonitoring, --ignoreskippedcluster, --reportformat String, --select String ]" +" [ VG|Tag ... ]"; +commands[101].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[101].required_opt_args[0].opt = poll_ARG; +commands[101].required_opt_args[0].def.val_bits = val_enum_to_bit(bool_VAL); +commands[101].optional_opt_args[0].opt = commandprofile_ARG; +commands[101].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[101].optional_opt_args[1].opt = config_ARG; +commands[101].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[101].optional_opt_args[2].opt = debug_ARG; +commands[101].optional_opt_args[3].opt = driverloaded_ARG; +commands[101].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[101].optional_opt_args[4].opt = help_ARG; +commands[101].optional_opt_args[5].opt = profile_ARG; +commands[101].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[101].optional_opt_args[6].opt = quiet_ARG; +commands[101].optional_opt_args[7].opt = verbose_ARG; +commands[101].optional_opt_args[8].opt = version_ARG; +commands[101].optional_opt_args[9].opt = yes_ARG; +commands[101].optional_opt_args[10].opt = ignorelockingfailure_ARG; +commands[101].optional_opt_args[11].opt = addtag_ARG; +commands[101].optional_opt_args[11].def.val_bits = val_enum_to_bit(tag_VAL); +commands[101].optional_opt_args[12].opt = deltag_ARG; +commands[101].optional_opt_args[12].def.val_bits = val_enum_to_bit(tag_VAL); +commands[101].optional_opt_args[13].opt = logicalvolume_ARG; +commands[101].optional_opt_args[13].def.val_bits = val_enum_to_bit(number_VAL); +commands[101].optional_opt_args[14].opt = maxphysicalvolumes_ARG; +commands[101].optional_opt_args[14].def.val_bits = val_enum_to_bit(number_VAL); +commands[101].optional_opt_args[15].opt = alloc_ARG; +commands[101].optional_opt_args[15].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[101].optional_opt_args[16].opt = uuid_ARG; +commands[101].optional_opt_args[17].opt = clustered_ARG; +commands[101].optional_opt_args[17].def.val_bits = val_enum_to_bit(bool_VAL); +commands[101].optional_opt_args[18].opt = metadatacopies_ARG; +commands[101].optional_opt_args[18].def.val_bits = val_enum_to_bit(metadatacopies_VAL); +commands[101].optional_opt_args[19].opt = vgmetadatacopies_ARG; +commands[101].optional_opt_args[19].def.val_bits = val_enum_to_bit(metadatacopies_VAL); +commands[101].optional_opt_args[20].opt = physicalextentsize_ARG; +commands[101].optional_opt_args[20].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[101].optional_opt_args[21].opt = resizeable_ARG; +commands[101].optional_opt_args[21].def.val_bits = val_enum_to_bit(bool_VAL); +commands[101].optional_opt_args[22].opt = systemid_ARG; +commands[101].optional_opt_args[22].def.val_bits = val_enum_to_bit(string_VAL); +commands[101].optional_opt_args[23].opt = locktype_ARG; +commands[101].optional_opt_args[23].def.val_bits = val_enum_to_bit(locktype_VAL); +commands[101].optional_opt_args[24].opt = profile_ARG; +commands[101].optional_opt_args[24].def.val_bits = val_enum_to_bit(string_VAL); +commands[101].optional_opt_args[25].opt = detachprofile_ARG; +commands[101].optional_opt_args[26].opt = metadataprofile_ARG; +commands[101].optional_opt_args[26].def.val_bits = val_enum_to_bit(string_VAL); +commands[101].optional_opt_args[27].opt = autobackup_ARG; +commands[101].optional_opt_args[27].def.val_bits = val_enum_to_bit(bool_VAL); +commands[101].optional_opt_args[28].opt = ignoremonitoring_ARG; +commands[101].optional_opt_args[29].opt = ignoreskippedcluster_ARG; +commands[101].optional_opt_args[30].opt = noudevsync_ARG; +commands[101].optional_opt_args[31].opt = reportformat_ARG; +commands[101].optional_opt_args[31].def.val_bits = val_enum_to_bit(string_VAL); +commands[101].optional_opt_args[32].opt = select_ARG; +commands[101].optional_opt_args[32].def.val_bits = val_enum_to_bit(string_VAL); +commands[101].optional_opt_args[33].opt = test_ARG; +commands[101].optional_opt_args[34].opt = force_ARG; +commands[101].optional_pos_args[0].pos = 1; +commands[101].optional_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(tag_VAL); +commands[101].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[102].name = "vgchange"; +commands[102].command_line_id = "vgchange_activate"; +commands[102].command_line_enum = vgchange_activate_CMD; +commands[102].fn = vgchange; +commands[102].ro_count = 1; +commands[102].rp_count = 0; +commands[102].oo_count = 41; +commands[102].op_count = 1; +commands[102].desc = ""; +commands[102].usage = "vgchange --activate y|n|ay" +" [ --activationmode partial|degraded|complete, --ignoreactivationskip, --partial, --sysinit, --ignorelockingfailure, --monitor y|n, --poll y|n, --addtag Tag, --deltag Tag, --logicalvolume Number, --maxphysicalvolumes Number, --alloc contiguous|cling|normal|anywhere|inherit, --uuid, --clustered y|n, --metadatacopies all|unmanaged|Number, --vgmetadatacopies all|unmanaged|Number, --physicalextentsize Number[m|unit], --resizeable y|n, --systemid String, --locktype sanlock|dlm|none, --detachprofile, --metadataprofile String, --autobackup y|n, --ignoremonitoring, --ignoreskippedcluster, --reportformat String, --select String ]" +" [ VG|Tag ... ]"; +commands[102].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[102].required_opt_args[0].opt = activate_ARG; +commands[102].required_opt_args[0].def.val_bits = val_enum_to_bit(activation_VAL); +commands[102].optional_opt_args[0].opt = commandprofile_ARG; +commands[102].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[102].optional_opt_args[1].opt = config_ARG; +commands[102].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[102].optional_opt_args[2].opt = debug_ARG; +commands[102].optional_opt_args[3].opt = driverloaded_ARG; +commands[102].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[102].optional_opt_args[4].opt = help_ARG; +commands[102].optional_opt_args[5].opt = profile_ARG; +commands[102].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[102].optional_opt_args[6].opt = quiet_ARG; +commands[102].optional_opt_args[7].opt = verbose_ARG; +commands[102].optional_opt_args[8].opt = version_ARG; +commands[102].optional_opt_args[9].opt = yes_ARG; +commands[102].optional_opt_args[10].opt = activationmode_ARG; +commands[102].optional_opt_args[10].def.val_bits = val_enum_to_bit(activationmode_VAL); +commands[102].optional_opt_args[11].opt = ignoreactivationskip_ARG; +commands[102].optional_opt_args[12].opt = partial_ARG; +commands[102].optional_opt_args[13].opt = sysinit_ARG; +commands[102].optional_opt_args[14].opt = ignorelockingfailure_ARG; +commands[102].optional_opt_args[15].opt = monitor_ARG; +commands[102].optional_opt_args[15].def.val_bits = val_enum_to_bit(bool_VAL); +commands[102].optional_opt_args[16].opt = poll_ARG; +commands[102].optional_opt_args[16].def.val_bits = val_enum_to_bit(bool_VAL); +commands[102].optional_opt_args[17].opt = addtag_ARG; +commands[102].optional_opt_args[17].def.val_bits = val_enum_to_bit(tag_VAL); +commands[102].optional_opt_args[18].opt = deltag_ARG; +commands[102].optional_opt_args[18].def.val_bits = val_enum_to_bit(tag_VAL); +commands[102].optional_opt_args[19].opt = logicalvolume_ARG; +commands[102].optional_opt_args[19].def.val_bits = val_enum_to_bit(number_VAL); +commands[102].optional_opt_args[20].opt = maxphysicalvolumes_ARG; +commands[102].optional_opt_args[20].def.val_bits = val_enum_to_bit(number_VAL); +commands[102].optional_opt_args[21].opt = alloc_ARG; +commands[102].optional_opt_args[21].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[102].optional_opt_args[22].opt = uuid_ARG; +commands[102].optional_opt_args[23].opt = clustered_ARG; +commands[102].optional_opt_args[23].def.val_bits = val_enum_to_bit(bool_VAL); +commands[102].optional_opt_args[24].opt = metadatacopies_ARG; +commands[102].optional_opt_args[24].def.val_bits = val_enum_to_bit(metadatacopies_VAL); +commands[102].optional_opt_args[25].opt = vgmetadatacopies_ARG; +commands[102].optional_opt_args[25].def.val_bits = val_enum_to_bit(metadatacopies_VAL); +commands[102].optional_opt_args[26].opt = physicalextentsize_ARG; +commands[102].optional_opt_args[26].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[102].optional_opt_args[27].opt = resizeable_ARG; +commands[102].optional_opt_args[27].def.val_bits = val_enum_to_bit(bool_VAL); +commands[102].optional_opt_args[28].opt = systemid_ARG; +commands[102].optional_opt_args[28].def.val_bits = val_enum_to_bit(string_VAL); +commands[102].optional_opt_args[29].opt = locktype_ARG; +commands[102].optional_opt_args[29].def.val_bits = val_enum_to_bit(locktype_VAL); +commands[102].optional_opt_args[30].opt = profile_ARG; +commands[102].optional_opt_args[30].def.val_bits = val_enum_to_bit(string_VAL); +commands[102].optional_opt_args[31].opt = detachprofile_ARG; +commands[102].optional_opt_args[32].opt = metadataprofile_ARG; +commands[102].optional_opt_args[32].def.val_bits = val_enum_to_bit(string_VAL); +commands[102].optional_opt_args[33].opt = autobackup_ARG; +commands[102].optional_opt_args[33].def.val_bits = val_enum_to_bit(bool_VAL); +commands[102].optional_opt_args[34].opt = ignoremonitoring_ARG; +commands[102].optional_opt_args[35].opt = ignoreskippedcluster_ARG; +commands[102].optional_opt_args[36].opt = noudevsync_ARG; +commands[102].optional_opt_args[37].opt = reportformat_ARG; +commands[102].optional_opt_args[37].def.val_bits = val_enum_to_bit(string_VAL); +commands[102].optional_opt_args[38].opt = select_ARG; +commands[102].optional_opt_args[38].def.val_bits = val_enum_to_bit(string_VAL); +commands[102].optional_opt_args[39].opt = test_ARG; +commands[102].optional_opt_args[40].opt = force_ARG; +commands[102].optional_pos_args[0].pos = 1; +commands[102].optional_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(tag_VAL); +commands[102].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[103].name = "vgchange"; +commands[103].command_line_id = "vgchange_refresh"; +commands[103].command_line_enum = vgchange_refresh_CMD; +commands[103].fn = vgchange; +commands[103].ro_count = 1; +commands[103].rp_count = 0; +commands[103].oo_count = 38; +commands[103].op_count = 1; +commands[103].desc = ""; +commands[103].usage = "vgchange --refresh" +" [ --sysinit, --ignorelockingfailure, --monitor y|n, --poll y|n, --addtag Tag, --deltag Tag, --logicalvolume Number, --maxphysicalvolumes Number, --alloc contiguous|cling|normal|anywhere|inherit, --uuid, --clustered y|n, --metadatacopies all|unmanaged|Number, --vgmetadatacopies all|unmanaged|Number, --physicalextentsize Number[m|unit], --resizeable y|n, --systemid String, --locktype sanlock|dlm|none, --detachprofile, --metadataprofile String, --autobackup y|n, --ignoremonitoring, --ignoreskippedcluster, --reportformat String, --select String ]" +" [ VG|Tag ... ]"; +commands[103].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[103].required_opt_args[0].opt = refresh_ARG; +commands[103].optional_opt_args[0].opt = commandprofile_ARG; +commands[103].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[103].optional_opt_args[1].opt = config_ARG; +commands[103].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[103].optional_opt_args[2].opt = debug_ARG; +commands[103].optional_opt_args[3].opt = driverloaded_ARG; +commands[103].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[103].optional_opt_args[4].opt = help_ARG; +commands[103].optional_opt_args[5].opt = profile_ARG; +commands[103].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[103].optional_opt_args[6].opt = quiet_ARG; +commands[103].optional_opt_args[7].opt = verbose_ARG; +commands[103].optional_opt_args[8].opt = version_ARG; +commands[103].optional_opt_args[9].opt = yes_ARG; +commands[103].optional_opt_args[10].opt = sysinit_ARG; +commands[103].optional_opt_args[11].opt = ignorelockingfailure_ARG; +commands[103].optional_opt_args[12].opt = monitor_ARG; +commands[103].optional_opt_args[12].def.val_bits = val_enum_to_bit(bool_VAL); +commands[103].optional_opt_args[13].opt = poll_ARG; +commands[103].optional_opt_args[13].def.val_bits = val_enum_to_bit(bool_VAL); +commands[103].optional_opt_args[14].opt = addtag_ARG; +commands[103].optional_opt_args[14].def.val_bits = val_enum_to_bit(tag_VAL); +commands[103].optional_opt_args[15].opt = deltag_ARG; +commands[103].optional_opt_args[15].def.val_bits = val_enum_to_bit(tag_VAL); +commands[103].optional_opt_args[16].opt = logicalvolume_ARG; +commands[103].optional_opt_args[16].def.val_bits = val_enum_to_bit(number_VAL); +commands[103].optional_opt_args[17].opt = maxphysicalvolumes_ARG; +commands[103].optional_opt_args[17].def.val_bits = val_enum_to_bit(number_VAL); +commands[103].optional_opt_args[18].opt = alloc_ARG; +commands[103].optional_opt_args[18].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[103].optional_opt_args[19].opt = uuid_ARG; +commands[103].optional_opt_args[20].opt = clustered_ARG; +commands[103].optional_opt_args[20].def.val_bits = val_enum_to_bit(bool_VAL); +commands[103].optional_opt_args[21].opt = metadatacopies_ARG; +commands[103].optional_opt_args[21].def.val_bits = val_enum_to_bit(metadatacopies_VAL); +commands[103].optional_opt_args[22].opt = vgmetadatacopies_ARG; +commands[103].optional_opt_args[22].def.val_bits = val_enum_to_bit(metadatacopies_VAL); +commands[103].optional_opt_args[23].opt = physicalextentsize_ARG; +commands[103].optional_opt_args[23].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[103].optional_opt_args[24].opt = resizeable_ARG; +commands[103].optional_opt_args[24].def.val_bits = val_enum_to_bit(bool_VAL); +commands[103].optional_opt_args[25].opt = systemid_ARG; +commands[103].optional_opt_args[25].def.val_bits = val_enum_to_bit(string_VAL); +commands[103].optional_opt_args[26].opt = locktype_ARG; +commands[103].optional_opt_args[26].def.val_bits = val_enum_to_bit(locktype_VAL); +commands[103].optional_opt_args[27].opt = profile_ARG; +commands[103].optional_opt_args[27].def.val_bits = val_enum_to_bit(string_VAL); +commands[103].optional_opt_args[28].opt = detachprofile_ARG; +commands[103].optional_opt_args[29].opt = metadataprofile_ARG; +commands[103].optional_opt_args[29].def.val_bits = val_enum_to_bit(string_VAL); +commands[103].optional_opt_args[30].opt = autobackup_ARG; +commands[103].optional_opt_args[30].def.val_bits = val_enum_to_bit(bool_VAL); +commands[103].optional_opt_args[31].opt = ignoremonitoring_ARG; +commands[103].optional_opt_args[32].opt = ignoreskippedcluster_ARG; +commands[103].optional_opt_args[33].opt = noudevsync_ARG; +commands[103].optional_opt_args[34].opt = reportformat_ARG; +commands[103].optional_opt_args[34].def.val_bits = val_enum_to_bit(string_VAL); +commands[103].optional_opt_args[35].opt = select_ARG; +commands[103].optional_opt_args[35].def.val_bits = val_enum_to_bit(string_VAL); +commands[103].optional_opt_args[36].opt = test_ARG; +commands[103].optional_opt_args[37].opt = force_ARG; +commands[103].optional_pos_args[0].pos = 1; +commands[103].optional_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(tag_VAL); +commands[103].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[104].name = "vgchange"; +commands[104].command_line_id = "vgchange_lockstart"; +commands[104].command_line_enum = vgchange_lockstart_CMD; +commands[104].fn = vgchange; +commands[104].ro_count = 1; +commands[104].rp_count = 0; +commands[104].oo_count = 35; +commands[104].op_count = 1; +commands[104].desc = ""; +commands[104].usage = "vgchange --lockstart" +" [ --lockopt String, --addtag Tag, --deltag Tag, --logicalvolume Number, --maxphysicalvolumes Number, --alloc contiguous|cling|normal|anywhere|inherit, --uuid, --clustered y|n, --metadatacopies all|unmanaged|Number, --vgmetadatacopies all|unmanaged|Number, --physicalextentsize Number[m|unit], --resizeable y|n, --systemid String, --locktype sanlock|dlm|none, --detachprofile, --metadataprofile String, --autobackup y|n, --ignoremonitoring, --ignoreskippedcluster, --reportformat String, --select String ]" +" [ VG|Tag ... ]"; +commands[104].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[104].required_opt_args[0].opt = lockstart_ARG; +commands[104].optional_opt_args[0].opt = commandprofile_ARG; +commands[104].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[104].optional_opt_args[1].opt = config_ARG; +commands[104].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[104].optional_opt_args[2].opt = debug_ARG; +commands[104].optional_opt_args[3].opt = driverloaded_ARG; +commands[104].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[104].optional_opt_args[4].opt = help_ARG; +commands[104].optional_opt_args[5].opt = profile_ARG; +commands[104].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[104].optional_opt_args[6].opt = quiet_ARG; +commands[104].optional_opt_args[7].opt = verbose_ARG; +commands[104].optional_opt_args[8].opt = version_ARG; +commands[104].optional_opt_args[9].opt = yes_ARG; +commands[104].optional_opt_args[10].opt = lockopt_ARG; +commands[104].optional_opt_args[10].def.val_bits = val_enum_to_bit(string_VAL); +commands[104].optional_opt_args[11].opt = addtag_ARG; +commands[104].optional_opt_args[11].def.val_bits = val_enum_to_bit(tag_VAL); +commands[104].optional_opt_args[12].opt = deltag_ARG; +commands[104].optional_opt_args[12].def.val_bits = val_enum_to_bit(tag_VAL); +commands[104].optional_opt_args[13].opt = logicalvolume_ARG; +commands[104].optional_opt_args[13].def.val_bits = val_enum_to_bit(number_VAL); +commands[104].optional_opt_args[14].opt = maxphysicalvolumes_ARG; +commands[104].optional_opt_args[14].def.val_bits = val_enum_to_bit(number_VAL); +commands[104].optional_opt_args[15].opt = alloc_ARG; +commands[104].optional_opt_args[15].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[104].optional_opt_args[16].opt = uuid_ARG; +commands[104].optional_opt_args[17].opt = clustered_ARG; +commands[104].optional_opt_args[17].def.val_bits = val_enum_to_bit(bool_VAL); +commands[104].optional_opt_args[18].opt = metadatacopies_ARG; +commands[104].optional_opt_args[18].def.val_bits = val_enum_to_bit(metadatacopies_VAL); +commands[104].optional_opt_args[19].opt = vgmetadatacopies_ARG; +commands[104].optional_opt_args[19].def.val_bits = val_enum_to_bit(metadatacopies_VAL); +commands[104].optional_opt_args[20].opt = physicalextentsize_ARG; +commands[104].optional_opt_args[20].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[104].optional_opt_args[21].opt = resizeable_ARG; +commands[104].optional_opt_args[21].def.val_bits = val_enum_to_bit(bool_VAL); +commands[104].optional_opt_args[22].opt = systemid_ARG; +commands[104].optional_opt_args[22].def.val_bits = val_enum_to_bit(string_VAL); +commands[104].optional_opt_args[23].opt = locktype_ARG; +commands[104].optional_opt_args[23].def.val_bits = val_enum_to_bit(locktype_VAL); +commands[104].optional_opt_args[24].opt = profile_ARG; +commands[104].optional_opt_args[24].def.val_bits = val_enum_to_bit(string_VAL); +commands[104].optional_opt_args[25].opt = detachprofile_ARG; +commands[104].optional_opt_args[26].opt = metadataprofile_ARG; +commands[104].optional_opt_args[26].def.val_bits = val_enum_to_bit(string_VAL); +commands[104].optional_opt_args[27].opt = autobackup_ARG; +commands[104].optional_opt_args[27].def.val_bits = val_enum_to_bit(bool_VAL); +commands[104].optional_opt_args[28].opt = ignoremonitoring_ARG; +commands[104].optional_opt_args[29].opt = ignoreskippedcluster_ARG; +commands[104].optional_opt_args[30].opt = noudevsync_ARG; +commands[104].optional_opt_args[31].opt = reportformat_ARG; +commands[104].optional_opt_args[31].def.val_bits = val_enum_to_bit(string_VAL); +commands[104].optional_opt_args[32].opt = select_ARG; +commands[104].optional_opt_args[32].def.val_bits = val_enum_to_bit(string_VAL); +commands[104].optional_opt_args[33].opt = test_ARG; +commands[104].optional_opt_args[34].opt = force_ARG; +commands[104].optional_pos_args[0].pos = 1; +commands[104].optional_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(tag_VAL); +commands[104].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[105].name = "vgchange"; +commands[105].command_line_id = "vgchange_lockstop"; +commands[105].command_line_enum = vgchange_lockstop_CMD; +commands[105].fn = vgchange; +commands[105].ro_count = 1; +commands[105].rp_count = 0; +commands[105].oo_count = 35; +commands[105].op_count = 1; +commands[105].desc = ""; +commands[105].usage = "vgchange --lockstop" +" [ --lockopt String, --addtag Tag, --deltag Tag, --logicalvolume Number, --maxphysicalvolumes Number, --alloc contiguous|cling|normal|anywhere|inherit, --uuid, --clustered y|n, --metadatacopies all|unmanaged|Number, --vgmetadatacopies all|unmanaged|Number, --physicalextentsize Number[m|unit], --resizeable y|n, --systemid String, --locktype sanlock|dlm|none, --detachprofile, --metadataprofile String, --autobackup y|n, --ignoremonitoring, --ignoreskippedcluster, --reportformat String, --select String ]" +" [ VG|Tag ... ]"; +commands[105].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[105].required_opt_args[0].opt = lockstop_ARG; +commands[105].optional_opt_args[0].opt = commandprofile_ARG; +commands[105].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[105].optional_opt_args[1].opt = config_ARG; +commands[105].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[105].optional_opt_args[2].opt = debug_ARG; +commands[105].optional_opt_args[3].opt = driverloaded_ARG; +commands[105].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[105].optional_opt_args[4].opt = help_ARG; +commands[105].optional_opt_args[5].opt = profile_ARG; +commands[105].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[105].optional_opt_args[6].opt = quiet_ARG; +commands[105].optional_opt_args[7].opt = verbose_ARG; +commands[105].optional_opt_args[8].opt = version_ARG; +commands[105].optional_opt_args[9].opt = yes_ARG; +commands[105].optional_opt_args[10].opt = lockopt_ARG; +commands[105].optional_opt_args[10].def.val_bits = val_enum_to_bit(string_VAL); +commands[105].optional_opt_args[11].opt = addtag_ARG; +commands[105].optional_opt_args[11].def.val_bits = val_enum_to_bit(tag_VAL); +commands[105].optional_opt_args[12].opt = deltag_ARG; +commands[105].optional_opt_args[12].def.val_bits = val_enum_to_bit(tag_VAL); +commands[105].optional_opt_args[13].opt = logicalvolume_ARG; +commands[105].optional_opt_args[13].def.val_bits = val_enum_to_bit(number_VAL); +commands[105].optional_opt_args[14].opt = maxphysicalvolumes_ARG; +commands[105].optional_opt_args[14].def.val_bits = val_enum_to_bit(number_VAL); +commands[105].optional_opt_args[15].opt = alloc_ARG; +commands[105].optional_opt_args[15].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[105].optional_opt_args[16].opt = uuid_ARG; +commands[105].optional_opt_args[17].opt = clustered_ARG; +commands[105].optional_opt_args[17].def.val_bits = val_enum_to_bit(bool_VAL); +commands[105].optional_opt_args[18].opt = metadatacopies_ARG; +commands[105].optional_opt_args[18].def.val_bits = val_enum_to_bit(metadatacopies_VAL); +commands[105].optional_opt_args[19].opt = vgmetadatacopies_ARG; +commands[105].optional_opt_args[19].def.val_bits = val_enum_to_bit(metadatacopies_VAL); +commands[105].optional_opt_args[20].opt = physicalextentsize_ARG; +commands[105].optional_opt_args[20].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[105].optional_opt_args[21].opt = resizeable_ARG; +commands[105].optional_opt_args[21].def.val_bits = val_enum_to_bit(bool_VAL); +commands[105].optional_opt_args[22].opt = systemid_ARG; +commands[105].optional_opt_args[22].def.val_bits = val_enum_to_bit(string_VAL); +commands[105].optional_opt_args[23].opt = locktype_ARG; +commands[105].optional_opt_args[23].def.val_bits = val_enum_to_bit(locktype_VAL); +commands[105].optional_opt_args[24].opt = profile_ARG; +commands[105].optional_opt_args[24].def.val_bits = val_enum_to_bit(string_VAL); +commands[105].optional_opt_args[25].opt = detachprofile_ARG; +commands[105].optional_opt_args[26].opt = metadataprofile_ARG; +commands[105].optional_opt_args[26].def.val_bits = val_enum_to_bit(string_VAL); +commands[105].optional_opt_args[27].opt = autobackup_ARG; +commands[105].optional_opt_args[27].def.val_bits = val_enum_to_bit(bool_VAL); +commands[105].optional_opt_args[28].opt = ignoremonitoring_ARG; +commands[105].optional_opt_args[29].opt = ignoreskippedcluster_ARG; +commands[105].optional_opt_args[30].opt = noudevsync_ARG; +commands[105].optional_opt_args[31].opt = reportformat_ARG; +commands[105].optional_opt_args[31].def.val_bits = val_enum_to_bit(string_VAL); +commands[105].optional_opt_args[32].opt = select_ARG; +commands[105].optional_opt_args[32].def.val_bits = val_enum_to_bit(string_VAL); +commands[105].optional_opt_args[33].opt = test_ARG; +commands[105].optional_opt_args[34].opt = force_ARG; +commands[105].optional_pos_args[0].pos = 1; +commands[105].optional_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(tag_VAL); +commands[105].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[106].name = "vgck"; +commands[106].command_line_id = "vgck_general"; +commands[106].command_line_enum = vgck_general_CMD; +commands[106].fn = vgck; +commands[106].ro_count = 0; +commands[106].rp_count = 0; +commands[106].oo_count = 11; +commands[106].op_count = 1; +commands[106].desc = ""; +commands[106].usage = "vgck" +" [ --reportformat String ]" +" [ VG|Tag ... ]"; +commands[106].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[106].optional_opt_args[0].opt = commandprofile_ARG; +commands[106].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[106].optional_opt_args[1].opt = config_ARG; +commands[106].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[106].optional_opt_args[2].opt = debug_ARG; +commands[106].optional_opt_args[3].opt = driverloaded_ARG; +commands[106].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[106].optional_opt_args[4].opt = help_ARG; +commands[106].optional_opt_args[5].opt = profile_ARG; +commands[106].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[106].optional_opt_args[6].opt = quiet_ARG; +commands[106].optional_opt_args[7].opt = verbose_ARG; +commands[106].optional_opt_args[8].opt = version_ARG; +commands[106].optional_opt_args[9].opt = yes_ARG; +commands[106].optional_opt_args[10].opt = reportformat_ARG; +commands[106].optional_opt_args[10].def.val_bits = val_enum_to_bit(string_VAL); +commands[106].optional_pos_args[0].pos = 1; +commands[106].optional_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(tag_VAL); +commands[106].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[107].name = "vgconvert"; +commands[107].command_line_id = "vgconvert_general"; +commands[107].command_line_enum = vgconvert_general_CMD; +commands[107].fn = vgconvert; +commands[107].ro_count = 0; +commands[107].rp_count = 1; +commands[107].oo_count = 18; +commands[107].op_count = 0; +commands[107].desc = ""; +commands[107].usage = "vgconvert VG ..." +" [ --labelsector Number, --bootloaderareasize Number[m|unit], --metadatatype lvm2|lvm1, --pvmetadatacopies Number, --metadatasize Number[m|unit], --reportformat String ]"; +commands[107].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[107].required_pos_args[0].pos = 1; +commands[107].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[107].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[107].optional_opt_args[0].opt = commandprofile_ARG; +commands[107].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[107].optional_opt_args[1].opt = config_ARG; +commands[107].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[107].optional_opt_args[2].opt = debug_ARG; +commands[107].optional_opt_args[3].opt = driverloaded_ARG; +commands[107].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[107].optional_opt_args[4].opt = help_ARG; +commands[107].optional_opt_args[5].opt = profile_ARG; +commands[107].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[107].optional_opt_args[6].opt = quiet_ARG; +commands[107].optional_opt_args[7].opt = verbose_ARG; +commands[107].optional_opt_args[8].opt = version_ARG; +commands[107].optional_opt_args[9].opt = yes_ARG; +commands[107].optional_opt_args[10].opt = force_ARG; +commands[107].optional_opt_args[11].opt = test_ARG; +commands[107].optional_opt_args[12].opt = labelsector_ARG; +commands[107].optional_opt_args[12].def.val_bits = val_enum_to_bit(number_VAL); +commands[107].optional_opt_args[13].opt = bootloaderareasize_ARG; +commands[107].optional_opt_args[13].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[107].optional_opt_args[14].opt = metadatatype_ARG; +commands[107].optional_opt_args[14].def.val_bits = val_enum_to_bit(metadatatype_VAL); +commands[107].optional_opt_args[15].opt = pvmetadatacopies_ARG; +commands[107].optional_opt_args[15].def.val_bits = val_enum_to_bit(number_VAL); +commands[107].optional_opt_args[16].opt = metadatasize_ARG; +commands[107].optional_opt_args[16].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[107].optional_opt_args[17].opt = reportformat_ARG; +commands[107].optional_opt_args[17].def.val_bits = val_enum_to_bit(string_VAL); + +commands[108].name = "vgcreate"; +commands[108].command_line_id = "vgcreate_general"; +commands[108].command_line_enum = vgcreate_general_CMD; +commands[108].fn = vgcreate; +commands[108].ro_count = 0; +commands[108].rp_count = 2; +commands[108].oo_count = 34; +commands[108].op_count = 0; +commands[108].desc = ""; +commands[108].usage = "vgcreate VG_new PV ..." +" [ --addtag Tag, --alloc contiguous|cling|normal|anywhere|inherit, --autobackup y|n, --clustered y|n, --maxlogicalvolumes Number, --maxphysicalvolumes Number, --metadataprofile String, --metadatatype lvm2|lvm1, --physicalextentsize Number[m|unit], --zero y|n, --labelsector Number, --metadatasize Number[m|unit], --pvmetadatacopies Number, --reportformat String, --metadatacopies all|unmanaged|Number, --vgmetadatacopies all|unmanaged|Number, --dataalignment Number[k|unit], --dataalignmentoffset Number[k|unit], --shared, --systemid String, --locktype sanlock|dlm|none, --lockopt String ]"; +commands[108].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[108].required_pos_args[0].pos = 1; +commands[108].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[108].required_pos_args[0].def.flags = ARG_DEF_FLAG_NEW; +commands[108].required_pos_args[1].pos = 2; +commands[108].required_pos_args[1].def.val_bits = val_enum_to_bit(pv_VAL); +commands[108].required_pos_args[1].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[108].optional_opt_args[0].opt = commandprofile_ARG; +commands[108].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[108].optional_opt_args[1].opt = config_ARG; +commands[108].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[108].optional_opt_args[2].opt = debug_ARG; +commands[108].optional_opt_args[3].opt = driverloaded_ARG; +commands[108].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[108].optional_opt_args[4].opt = help_ARG; +commands[108].optional_opt_args[5].opt = profile_ARG; +commands[108].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[108].optional_opt_args[6].opt = quiet_ARG; +commands[108].optional_opt_args[7].opt = verbose_ARG; +commands[108].optional_opt_args[8].opt = version_ARG; +commands[108].optional_opt_args[9].opt = yes_ARG; +commands[108].optional_opt_args[10].opt = addtag_ARG; +commands[108].optional_opt_args[10].def.val_bits = val_enum_to_bit(tag_VAL); +commands[108].optional_opt_args[11].opt = alloc_ARG; +commands[108].optional_opt_args[11].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[108].optional_opt_args[12].opt = autobackup_ARG; +commands[108].optional_opt_args[12].def.val_bits = val_enum_to_bit(bool_VAL); +commands[108].optional_opt_args[13].opt = clustered_ARG; +commands[108].optional_opt_args[13].def.val_bits = val_enum_to_bit(bool_VAL); +commands[108].optional_opt_args[14].opt = maxlogicalvolumes_ARG; +commands[108].optional_opt_args[14].def.val_bits = val_enum_to_bit(number_VAL); +commands[108].optional_opt_args[15].opt = maxphysicalvolumes_ARG; +commands[108].optional_opt_args[15].def.val_bits = val_enum_to_bit(number_VAL); +commands[108].optional_opt_args[16].opt = metadataprofile_ARG; +commands[108].optional_opt_args[16].def.val_bits = val_enum_to_bit(string_VAL); +commands[108].optional_opt_args[17].opt = metadatatype_ARG; +commands[108].optional_opt_args[17].def.val_bits = val_enum_to_bit(metadatatype_VAL); +commands[108].optional_opt_args[18].opt = physicalextentsize_ARG; +commands[108].optional_opt_args[18].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[108].optional_opt_args[19].opt = test_ARG; +commands[108].optional_opt_args[20].opt = force_ARG; +commands[108].optional_opt_args[21].opt = zero_ARG; +commands[108].optional_opt_args[21].def.val_bits = val_enum_to_bit(bool_VAL); +commands[108].optional_opt_args[22].opt = labelsector_ARG; +commands[108].optional_opt_args[22].def.val_bits = val_enum_to_bit(number_VAL); +commands[108].optional_opt_args[23].opt = metadatasize_ARG; +commands[108].optional_opt_args[23].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[108].optional_opt_args[24].opt = pvmetadatacopies_ARG; +commands[108].optional_opt_args[24].def.val_bits = val_enum_to_bit(number_VAL); +commands[108].optional_opt_args[25].opt = reportformat_ARG; +commands[108].optional_opt_args[25].def.val_bits = val_enum_to_bit(string_VAL); +commands[108].optional_opt_args[26].opt = metadatacopies_ARG; +commands[108].optional_opt_args[26].def.val_bits = val_enum_to_bit(metadatacopies_VAL); +commands[108].optional_opt_args[27].opt = vgmetadatacopies_ARG; +commands[108].optional_opt_args[27].def.val_bits = val_enum_to_bit(metadatacopies_VAL); +commands[108].optional_opt_args[28].opt = dataalignment_ARG; +commands[108].optional_opt_args[28].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[108].optional_opt_args[29].opt = dataalignmentoffset_ARG; +commands[108].optional_opt_args[29].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[108].optional_opt_args[30].opt = shared_ARG; +commands[108].optional_opt_args[31].opt = systemid_ARG; +commands[108].optional_opt_args[31].def.val_bits = val_enum_to_bit(string_VAL); +commands[108].optional_opt_args[32].opt = locktype_ARG; +commands[108].optional_opt_args[32].def.val_bits = val_enum_to_bit(locktype_VAL); +commands[108].optional_opt_args[33].opt = lockopt_ARG; +commands[108].optional_opt_args[33].def.val_bits = val_enum_to_bit(string_VAL); + +commands[109].name = "vgdisplay"; +commands[109].command_line_id = "vgdisplay_general"; +commands[109].command_line_enum = vgdisplay_general_CMD; +commands[109].fn = vgdisplay; +commands[109].ro_count = 0; +commands[109].rp_count = 0; +commands[109].oo_count = 33; +commands[109].op_count = 1; +commands[109].desc = ""; +commands[109].usage = "vgdisplay" +" [ --activevolumegroups, --aligned, --binary, --colon, --columns, --configreport String, --foreign, --ignorelockingfailure, --ignoreskippedcluster, --logonly, --noheadings, --nosuffix, --options String, --partial, --readonly, --reportformat String, --select String, --shared, --short, --separator String, --sort String, --unbuffered, --units hHbBsSkKmMgGtTpPeE ]" +" [ VG|Tag ... ]"; +commands[109].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[109].optional_opt_args[0].opt = commandprofile_ARG; +commands[109].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[109].optional_opt_args[1].opt = config_ARG; +commands[109].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[109].optional_opt_args[2].opt = debug_ARG; +commands[109].optional_opt_args[3].opt = driverloaded_ARG; +commands[109].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[109].optional_opt_args[4].opt = help_ARG; +commands[109].optional_opt_args[5].opt = profile_ARG; +commands[109].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[109].optional_opt_args[6].opt = quiet_ARG; +commands[109].optional_opt_args[7].opt = verbose_ARG; +commands[109].optional_opt_args[8].opt = version_ARG; +commands[109].optional_opt_args[9].opt = yes_ARG; +commands[109].optional_opt_args[10].opt = activevolumegroups_ARG; +commands[109].optional_opt_args[11].opt = aligned_ARG; +commands[109].optional_opt_args[12].opt = binary_ARG; +commands[109].optional_opt_args[13].opt = colon_ARG; +commands[109].optional_opt_args[14].opt = columns_ARG; +commands[109].optional_opt_args[15].opt = configreport_ARG; +commands[109].optional_opt_args[15].def.val_bits = val_enum_to_bit(string_VAL); +commands[109].optional_opt_args[16].opt = foreign_ARG; +commands[109].optional_opt_args[17].opt = ignorelockingfailure_ARG; +commands[109].optional_opt_args[18].opt = ignoreskippedcluster_ARG; +commands[109].optional_opt_args[19].opt = logonly_ARG; +commands[109].optional_opt_args[20].opt = noheadings_ARG; +commands[109].optional_opt_args[21].opt = nosuffix_ARG; +commands[109].optional_opt_args[22].opt = options_ARG; +commands[109].optional_opt_args[22].def.val_bits = val_enum_to_bit(string_VAL); +commands[109].optional_opt_args[23].opt = partial_ARG; +commands[109].optional_opt_args[24].opt = readonly_ARG; +commands[109].optional_opt_args[25].opt = reportformat_ARG; +commands[109].optional_opt_args[25].def.val_bits = val_enum_to_bit(string_VAL); +commands[109].optional_opt_args[26].opt = select_ARG; +commands[109].optional_opt_args[26].def.val_bits = val_enum_to_bit(string_VAL); +commands[109].optional_opt_args[27].opt = shared_ARG; +commands[109].optional_opt_args[28].opt = short_ARG; +commands[109].optional_opt_args[29].opt = separator_ARG; +commands[109].optional_opt_args[29].def.val_bits = val_enum_to_bit(string_VAL); +commands[109].optional_opt_args[30].opt = sort_ARG; +commands[109].optional_opt_args[30].def.val_bits = val_enum_to_bit(string_VAL); +commands[109].optional_opt_args[31].opt = unbuffered_ARG; +commands[109].optional_opt_args[32].opt = units_ARG; +commands[109].optional_opt_args[32].def.val_bits = val_enum_to_bit(units_VAL); +commands[109].optional_pos_args[0].pos = 1; +commands[109].optional_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(tag_VAL); +commands[109].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[110].name = "vgexport"; +commands[110].command_line_id = "vgexport_some"; +commands[110].command_line_enum = vgexport_some_CMD; +commands[110].fn = vgexport; +commands[110].ro_count = 0; +commands[110].rp_count = 1; +commands[110].oo_count = 13; +commands[110].op_count = 0; +commands[110].desc = ""; +commands[110].usage = "vgexport VG|Tag|Select ..." +" [ --select String, --reportformat String ]"; +commands[110].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[110].required_pos_args[0].pos = 1; +commands[110].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(tag_VAL) | val_enum_to_bit(select_VAL); +commands[110].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[110].optional_opt_args[0].opt = commandprofile_ARG; +commands[110].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[110].optional_opt_args[1].opt = config_ARG; +commands[110].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[110].optional_opt_args[2].opt = debug_ARG; +commands[110].optional_opt_args[3].opt = driverloaded_ARG; +commands[110].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[110].optional_opt_args[4].opt = help_ARG; +commands[110].optional_opt_args[5].opt = profile_ARG; +commands[110].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[110].optional_opt_args[6].opt = quiet_ARG; +commands[110].optional_opt_args[7].opt = verbose_ARG; +commands[110].optional_opt_args[8].opt = version_ARG; +commands[110].optional_opt_args[9].opt = yes_ARG; +commands[110].optional_opt_args[10].opt = select_ARG; +commands[110].optional_opt_args[10].def.val_bits = val_enum_to_bit(string_VAL); +commands[110].optional_opt_args[11].opt = reportformat_ARG; +commands[110].optional_opt_args[11].def.val_bits = val_enum_to_bit(string_VAL); +commands[110].optional_opt_args[12].opt = test_ARG; + +commands[111].name = "vgexport"; +commands[111].command_line_id = "vgexport_all"; +commands[111].command_line_enum = vgexport_all_CMD; +commands[111].fn = vgexport; +commands[111].ro_count = 1; +commands[111].rp_count = 0; +commands[111].oo_count = 12; +commands[111].op_count = 0; +commands[111].desc = ""; +commands[111].usage = "vgexport --all" +" [ --reportformat String ]"; +commands[111].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[111].required_opt_args[0].opt = all_ARG; +commands[111].optional_opt_args[0].opt = commandprofile_ARG; +commands[111].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[111].optional_opt_args[1].opt = config_ARG; +commands[111].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[111].optional_opt_args[2].opt = debug_ARG; +commands[111].optional_opt_args[3].opt = driverloaded_ARG; +commands[111].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[111].optional_opt_args[4].opt = help_ARG; +commands[111].optional_opt_args[5].opt = profile_ARG; +commands[111].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[111].optional_opt_args[6].opt = quiet_ARG; +commands[111].optional_opt_args[7].opt = verbose_ARG; +commands[111].optional_opt_args[8].opt = version_ARG; +commands[111].optional_opt_args[9].opt = yes_ARG; +commands[111].optional_opt_args[10].opt = reportformat_ARG; +commands[111].optional_opt_args[10].def.val_bits = val_enum_to_bit(string_VAL); +commands[111].optional_opt_args[11].opt = test_ARG; + +commands[112].name = "vgextend"; +commands[112].command_line_id = "vgextend_general"; +commands[112].command_line_enum = vgextend_general_CMD; +commands[112].fn = vgextend; +commands[112].ro_count = 0; +commands[112].rp_count = 2; +commands[112].oo_count = 23; +commands[112].op_count = 0; +commands[112].desc = ""; +commands[112].usage = "vgextend VG PV ..." +" [ --autobackup y|n, --zero y|n, --labelsector Number, --metadatatype lvm2|lvm1, --metadatasize Number[m|unit], --pvmetadatacopies Number, --metadataignore y|n, --dataalignment Number[k|unit], --dataalignmentoffset Number[k|unit], --reportformat String, --restoremissing ]"; +commands[112].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[112].required_pos_args[0].pos = 1; +commands[112].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[112].required_pos_args[1].pos = 2; +commands[112].required_pos_args[1].def.val_bits = val_enum_to_bit(pv_VAL); +commands[112].required_pos_args[1].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[112].optional_opt_args[0].opt = commandprofile_ARG; +commands[112].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[112].optional_opt_args[1].opt = config_ARG; +commands[112].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[112].optional_opt_args[2].opt = debug_ARG; +commands[112].optional_opt_args[3].opt = driverloaded_ARG; +commands[112].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[112].optional_opt_args[4].opt = help_ARG; +commands[112].optional_opt_args[5].opt = profile_ARG; +commands[112].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[112].optional_opt_args[6].opt = quiet_ARG; +commands[112].optional_opt_args[7].opt = verbose_ARG; +commands[112].optional_opt_args[8].opt = version_ARG; +commands[112].optional_opt_args[9].opt = yes_ARG; +commands[112].optional_opt_args[10].opt = autobackup_ARG; +commands[112].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[112].optional_opt_args[11].opt = test_ARG; +commands[112].optional_opt_args[12].opt = force_ARG; +commands[112].optional_opt_args[13].opt = zero_ARG; +commands[112].optional_opt_args[13].def.val_bits = val_enum_to_bit(bool_VAL); +commands[112].optional_opt_args[14].opt = labelsector_ARG; +commands[112].optional_opt_args[14].def.val_bits = val_enum_to_bit(number_VAL); +commands[112].optional_opt_args[15].opt = metadatatype_ARG; +commands[112].optional_opt_args[15].def.val_bits = val_enum_to_bit(metadatatype_VAL); +commands[112].optional_opt_args[16].opt = metadatasize_ARG; +commands[112].optional_opt_args[16].def.val_bits = val_enum_to_bit(sizemb_VAL); +commands[112].optional_opt_args[17].opt = pvmetadatacopies_ARG; +commands[112].optional_opt_args[17].def.val_bits = val_enum_to_bit(number_VAL); +commands[112].optional_opt_args[18].opt = metadataignore_ARG; +commands[112].optional_opt_args[18].def.val_bits = val_enum_to_bit(bool_VAL); +commands[112].optional_opt_args[19].opt = dataalignment_ARG; +commands[112].optional_opt_args[19].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[112].optional_opt_args[20].opt = dataalignmentoffset_ARG; +commands[112].optional_opt_args[20].def.val_bits = val_enum_to_bit(sizekb_VAL); +commands[112].optional_opt_args[21].opt = reportformat_ARG; +commands[112].optional_opt_args[21].def.val_bits = val_enum_to_bit(string_VAL); +commands[112].optional_opt_args[22].opt = restoremissing_ARG; + +commands[113].name = "vgimport"; +commands[113].command_line_id = "vgimport_some"; +commands[113].command_line_enum = vgimport_some_CMD; +commands[113].fn = vgimport; +commands[113].ro_count = 0; +commands[113].rp_count = 1; +commands[113].oo_count = 14; +commands[113].op_count = 0; +commands[113].desc = ""; +commands[113].usage = "vgimport VG|Tag|Select ..." +" [ --select String, --reportformat String ]"; +commands[113].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[113].required_pos_args[0].pos = 1; +commands[113].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(tag_VAL) | val_enum_to_bit(select_VAL); +commands[113].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[113].optional_opt_args[0].opt = commandprofile_ARG; +commands[113].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[113].optional_opt_args[1].opt = config_ARG; +commands[113].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[113].optional_opt_args[2].opt = debug_ARG; +commands[113].optional_opt_args[3].opt = driverloaded_ARG; +commands[113].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[113].optional_opt_args[4].opt = help_ARG; +commands[113].optional_opt_args[5].opt = profile_ARG; +commands[113].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[113].optional_opt_args[6].opt = quiet_ARG; +commands[113].optional_opt_args[7].opt = verbose_ARG; +commands[113].optional_opt_args[8].opt = version_ARG; +commands[113].optional_opt_args[9].opt = yes_ARG; +commands[113].optional_opt_args[10].opt = select_ARG; +commands[113].optional_opt_args[10].def.val_bits = val_enum_to_bit(string_VAL); +commands[113].optional_opt_args[11].opt = force_ARG; +commands[113].optional_opt_args[12].opt = reportformat_ARG; +commands[113].optional_opt_args[12].def.val_bits = val_enum_to_bit(string_VAL); +commands[113].optional_opt_args[13].opt = test_ARG; + +commands[114].name = "vgimport"; +commands[114].command_line_id = "vgimport_all"; +commands[114].command_line_enum = vgimport_all_CMD; +commands[114].fn = vgimport; +commands[114].ro_count = 1; +commands[114].rp_count = 0; +commands[114].oo_count = 13; +commands[114].op_count = 0; +commands[114].desc = ""; +commands[114].usage = "vgimport --all" +" [ --reportformat String ]"; +commands[114].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[114].required_opt_args[0].opt = all_ARG; +commands[114].optional_opt_args[0].opt = commandprofile_ARG; +commands[114].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[114].optional_opt_args[1].opt = config_ARG; +commands[114].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[114].optional_opt_args[2].opt = debug_ARG; +commands[114].optional_opt_args[3].opt = driverloaded_ARG; +commands[114].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[114].optional_opt_args[4].opt = help_ARG; +commands[114].optional_opt_args[5].opt = profile_ARG; +commands[114].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[114].optional_opt_args[6].opt = quiet_ARG; +commands[114].optional_opt_args[7].opt = verbose_ARG; +commands[114].optional_opt_args[8].opt = version_ARG; +commands[114].optional_opt_args[9].opt = yes_ARG; +commands[114].optional_opt_args[10].opt = force_ARG; +commands[114].optional_opt_args[11].opt = reportformat_ARG; +commands[114].optional_opt_args[11].def.val_bits = val_enum_to_bit(string_VAL); +commands[114].optional_opt_args[12].opt = test_ARG; + +commands[115].name = "vgimportclone"; +commands[115].command_line_id = "vgimportclone_general"; +commands[115].command_line_enum = vgimportclone_general_CMD; +commands[115].fn = vgimportclone; +commands[115].ro_count = 0; +commands[115].rp_count = 1; +commands[115].oo_count = 13; +commands[115].op_count = 0; +commands[115].desc = ""; +commands[115].usage = "vgimportclone PV ..." +" [ --basevgname VG, --import ]"; +commands[115].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[115].required_pos_args[0].pos = 1; +commands[115].required_pos_args[0].def.val_bits = val_enum_to_bit(pv_VAL); +commands[115].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[115].optional_opt_args[0].opt = commandprofile_ARG; +commands[115].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[115].optional_opt_args[1].opt = config_ARG; +commands[115].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[115].optional_opt_args[2].opt = debug_ARG; +commands[115].optional_opt_args[3].opt = driverloaded_ARG; +commands[115].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[115].optional_opt_args[4].opt = help_ARG; +commands[115].optional_opt_args[5].opt = profile_ARG; +commands[115].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[115].optional_opt_args[6].opt = quiet_ARG; +commands[115].optional_opt_args[7].opt = verbose_ARG; +commands[115].optional_opt_args[8].opt = version_ARG; +commands[115].optional_opt_args[9].opt = yes_ARG; +commands[115].optional_opt_args[10].opt = basevgname_ARG; +commands[115].optional_opt_args[10].def.val_bits = val_enum_to_bit(vg_VAL); +commands[115].optional_opt_args[11].opt = test_ARG; +commands[115].optional_opt_args[12].opt = import_ARG; + +commands[116].name = "vgmerge"; +commands[116].command_line_id = "vgmerge_general"; +commands[116].command_line_enum = vgmerge_general_CMD; +commands[116].fn = vgmerge; +commands[116].ro_count = 0; +commands[116].rp_count = 2; +commands[116].oo_count = 13; +commands[116].op_count = 0; +commands[116].desc = ""; +commands[116].usage = "vgmerge VG VG" +" [ --autobackup y|n, --list ]"; +commands[116].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[116].required_pos_args[0].pos = 1; +commands[116].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[116].required_pos_args[1].pos = 2; +commands[116].required_pos_args[1].def.val_bits = val_enum_to_bit(vg_VAL); +commands[116].optional_opt_args[0].opt = commandprofile_ARG; +commands[116].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[116].optional_opt_args[1].opt = config_ARG; +commands[116].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[116].optional_opt_args[2].opt = debug_ARG; +commands[116].optional_opt_args[3].opt = driverloaded_ARG; +commands[116].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[116].optional_opt_args[4].opt = help_ARG; +commands[116].optional_opt_args[5].opt = profile_ARG; +commands[116].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[116].optional_opt_args[6].opt = quiet_ARG; +commands[116].optional_opt_args[7].opt = verbose_ARG; +commands[116].optional_opt_args[8].opt = version_ARG; +commands[116].optional_opt_args[9].opt = yes_ARG; +commands[116].optional_opt_args[10].opt = autobackup_ARG; +commands[116].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[116].optional_opt_args[11].opt = list_ARG; +commands[116].optional_opt_args[12].opt = test_ARG; + +commands[117].name = "vgmknodes"; +commands[117].command_line_id = "vgmknodes_general"; +commands[117].command_line_enum = vgmknodes_general_CMD; +commands[117].fn = vgmknodes; +commands[117].ro_count = 0; +commands[117].rp_count = 0; +commands[117].oo_count = 13; +commands[117].op_count = 1; +commands[117].desc = ""; +commands[117].usage = "vgmknodes" +" [ --ignorelockingfailure, --refresh, --reportformat String ]" +" [ VG|LV|Tag ... ]"; +commands[117].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[117].optional_opt_args[0].opt = commandprofile_ARG; +commands[117].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[117].optional_opt_args[1].opt = config_ARG; +commands[117].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[117].optional_opt_args[2].opt = debug_ARG; +commands[117].optional_opt_args[3].opt = driverloaded_ARG; +commands[117].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[117].optional_opt_args[4].opt = help_ARG; +commands[117].optional_opt_args[5].opt = profile_ARG; +commands[117].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[117].optional_opt_args[6].opt = quiet_ARG; +commands[117].optional_opt_args[7].opt = verbose_ARG; +commands[117].optional_opt_args[8].opt = version_ARG; +commands[117].optional_opt_args[9].opt = yes_ARG; +commands[117].optional_opt_args[10].opt = ignorelockingfailure_ARG; +commands[117].optional_opt_args[11].opt = refresh_ARG; +commands[117].optional_opt_args[12].opt = reportformat_ARG; +commands[117].optional_opt_args[12].def.val_bits = val_enum_to_bit(string_VAL); +commands[117].optional_pos_args[0].pos = 1; +commands[117].optional_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(lv_VAL) | val_enum_to_bit(tag_VAL); +commands[117].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[118].name = "vgreduce"; +commands[118].command_line_id = "vgreduce_by_pv"; +commands[118].command_line_enum = vgreduce_by_pv_CMD; +commands[118].fn = vgreduce; +commands[118].ro_count = 0; +commands[118].rp_count = 2; +commands[118].oo_count = 14; +commands[118].op_count = 0; +commands[118].desc = ""; +commands[118].usage = "vgreduce VG PV ..." +" [ --autobackup y|n, --reportformat String ]"; +commands[118].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[118].required_pos_args[0].pos = 1; +commands[118].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[118].required_pos_args[1].pos = 2; +commands[118].required_pos_args[1].def.val_bits = val_enum_to_bit(pv_VAL); +commands[118].required_pos_args[1].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[118].optional_opt_args[0].opt = commandprofile_ARG; +commands[118].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[118].optional_opt_args[1].opt = config_ARG; +commands[118].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[118].optional_opt_args[2].opt = debug_ARG; +commands[118].optional_opt_args[3].opt = driverloaded_ARG; +commands[118].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[118].optional_opt_args[4].opt = help_ARG; +commands[118].optional_opt_args[5].opt = profile_ARG; +commands[118].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[118].optional_opt_args[6].opt = quiet_ARG; +commands[118].optional_opt_args[7].opt = verbose_ARG; +commands[118].optional_opt_args[8].opt = version_ARG; +commands[118].optional_opt_args[9].opt = yes_ARG; +commands[118].optional_opt_args[10].opt = autobackup_ARG; +commands[118].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[118].optional_opt_args[11].opt = force_ARG; +commands[118].optional_opt_args[12].opt = reportformat_ARG; +commands[118].optional_opt_args[12].def.val_bits = val_enum_to_bit(string_VAL); +commands[118].optional_opt_args[13].opt = test_ARG; + +commands[119].name = "vgreduce"; +commands[119].command_line_id = "vgreduce_all"; +commands[119].command_line_enum = vgreduce_all_CMD; +commands[119].fn = vgreduce; +commands[119].ro_count = 1; +commands[119].rp_count = 1; +commands[119].oo_count = 14; +commands[119].op_count = 0; +commands[119].desc = ""; +commands[119].usage = "vgreduce --all VG" +" [ --autobackup y|n, --reportformat String ]"; +commands[119].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[119].required_opt_args[0].opt = all_ARG; +commands[119].required_pos_args[0].pos = 1; +commands[119].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[119].optional_opt_args[0].opt = commandprofile_ARG; +commands[119].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[119].optional_opt_args[1].opt = config_ARG; +commands[119].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[119].optional_opt_args[2].opt = debug_ARG; +commands[119].optional_opt_args[3].opt = driverloaded_ARG; +commands[119].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[119].optional_opt_args[4].opt = help_ARG; +commands[119].optional_opt_args[5].opt = profile_ARG; +commands[119].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[119].optional_opt_args[6].opt = quiet_ARG; +commands[119].optional_opt_args[7].opt = verbose_ARG; +commands[119].optional_opt_args[8].opt = version_ARG; +commands[119].optional_opt_args[9].opt = yes_ARG; +commands[119].optional_opt_args[10].opt = autobackup_ARG; +commands[119].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[119].optional_opt_args[11].opt = force_ARG; +commands[119].optional_opt_args[12].opt = reportformat_ARG; +commands[119].optional_opt_args[12].def.val_bits = val_enum_to_bit(string_VAL); +commands[119].optional_opt_args[13].opt = test_ARG; + +commands[120].name = "vgreduce"; +commands[120].command_line_id = "vgreduce_missing"; +commands[120].command_line_enum = vgreduce_missing_CMD; +commands[120].fn = vgreduce; +commands[120].ro_count = 1; +commands[120].rp_count = 1; +commands[120].oo_count = 15; +commands[120].op_count = 0; +commands[120].desc = ""; +commands[120].usage = "vgreduce --removemissing VG" +" [ --mirrorsonly, --autobackup y|n, --reportformat String ]"; +commands[120].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[120].required_opt_args[0].opt = removemissing_ARG; +commands[120].required_pos_args[0].pos = 1; +commands[120].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[120].optional_opt_args[0].opt = commandprofile_ARG; +commands[120].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[120].optional_opt_args[1].opt = config_ARG; +commands[120].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[120].optional_opt_args[2].opt = debug_ARG; +commands[120].optional_opt_args[3].opt = driverloaded_ARG; +commands[120].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[120].optional_opt_args[4].opt = help_ARG; +commands[120].optional_opt_args[5].opt = profile_ARG; +commands[120].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[120].optional_opt_args[6].opt = quiet_ARG; +commands[120].optional_opt_args[7].opt = verbose_ARG; +commands[120].optional_opt_args[8].opt = version_ARG; +commands[120].optional_opt_args[9].opt = yes_ARG; +commands[120].optional_opt_args[10].opt = mirrorsonly_ARG; +commands[120].optional_opt_args[11].opt = autobackup_ARG; +commands[120].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[120].optional_opt_args[12].opt = force_ARG; +commands[120].optional_opt_args[13].opt = reportformat_ARG; +commands[120].optional_opt_args[13].def.val_bits = val_enum_to_bit(string_VAL); +commands[120].optional_opt_args[14].opt = test_ARG; + +commands[121].name = "vgremove"; +commands[121].command_line_id = "vgremove_general"; +commands[121].command_line_enum = vgremove_general_CMD; +commands[121].fn = vgremove; +commands[121].ro_count = 0; +commands[121].rp_count = 1; +commands[121].oo_count = 15; +commands[121].op_count = 0; +commands[121].desc = ""; +commands[121].usage = "vgremove VG|Tag|Select ..." +" [ --reportformat String, --select String ]"; +commands[121].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[121].required_pos_args[0].pos = 1; +commands[121].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(tag_VAL) | val_enum_to_bit(select_VAL); +commands[121].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[121].optional_opt_args[0].opt = commandprofile_ARG; +commands[121].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[121].optional_opt_args[1].opt = config_ARG; +commands[121].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[121].optional_opt_args[2].opt = debug_ARG; +commands[121].optional_opt_args[3].opt = driverloaded_ARG; +commands[121].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[121].optional_opt_args[4].opt = help_ARG; +commands[121].optional_opt_args[5].opt = profile_ARG; +commands[121].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[121].optional_opt_args[6].opt = quiet_ARG; +commands[121].optional_opt_args[7].opt = verbose_ARG; +commands[121].optional_opt_args[8].opt = version_ARG; +commands[121].optional_opt_args[9].opt = yes_ARG; +commands[121].optional_opt_args[10].opt = force_ARG; +commands[121].optional_opt_args[11].opt = noudevsync_ARG; +commands[121].optional_opt_args[12].opt = reportformat_ARG; +commands[121].optional_opt_args[12].def.val_bits = val_enum_to_bit(string_VAL); +commands[121].optional_opt_args[13].opt = select_ARG; +commands[121].optional_opt_args[13].def.val_bits = val_enum_to_bit(string_VAL); +commands[121].optional_opt_args[14].opt = test_ARG; + +commands[122].name = "vgrename"; +commands[122].command_line_id = "vgrename_by_name"; +commands[122].command_line_enum = vgrename_by_name_CMD; +commands[122].fn = vgrename; +commands[122].ro_count = 0; +commands[122].rp_count = 2; +commands[122].oo_count = 14; +commands[122].op_count = 0; +commands[122].desc = ""; +commands[122].usage = "vgrename VG VG_new" +" [ --autobackup y|n, --reportformat String ]"; +commands[122].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[122].required_pos_args[0].pos = 1; +commands[122].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[122].required_pos_args[1].pos = 2; +commands[122].required_pos_args[1].def.val_bits = val_enum_to_bit(vg_VAL); +commands[122].required_pos_args[1].def.flags = ARG_DEF_FLAG_NEW; +commands[122].optional_opt_args[0].opt = commandprofile_ARG; +commands[122].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[122].optional_opt_args[1].opt = config_ARG; +commands[122].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[122].optional_opt_args[2].opt = debug_ARG; +commands[122].optional_opt_args[3].opt = driverloaded_ARG; +commands[122].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[122].optional_opt_args[4].opt = help_ARG; +commands[122].optional_opt_args[5].opt = profile_ARG; +commands[122].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[122].optional_opt_args[6].opt = quiet_ARG; +commands[122].optional_opt_args[7].opt = verbose_ARG; +commands[122].optional_opt_args[8].opt = version_ARG; +commands[122].optional_opt_args[9].opt = yes_ARG; +commands[122].optional_opt_args[10].opt = autobackup_ARG; +commands[122].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[122].optional_opt_args[11].opt = force_ARG; +commands[122].optional_opt_args[12].opt = reportformat_ARG; +commands[122].optional_opt_args[12].def.val_bits = val_enum_to_bit(string_VAL); +commands[122].optional_opt_args[13].opt = test_ARG; + +commands[123].name = "vgrename"; +commands[123].command_line_id = "vgrename_by_uuid"; +commands[123].command_line_enum = vgrename_by_uuid_CMD; +commands[123].fn = vgrename; +commands[123].ro_count = 0; +commands[123].rp_count = 2; +commands[123].oo_count = 14; +commands[123].op_count = 0; +commands[123].desc = ""; +commands[123].usage = "vgrename String VG_new" +" [ --autobackup y|n, --reportformat String ]"; +commands[123].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[123].required_pos_args[0].pos = 1; +commands[123].required_pos_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[123].required_pos_args[1].pos = 2; +commands[123].required_pos_args[1].def.val_bits = val_enum_to_bit(vg_VAL); +commands[123].required_pos_args[1].def.flags = ARG_DEF_FLAG_NEW; +commands[123].optional_opt_args[0].opt = commandprofile_ARG; +commands[123].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[123].optional_opt_args[1].opt = config_ARG; +commands[123].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[123].optional_opt_args[2].opt = debug_ARG; +commands[123].optional_opt_args[3].opt = driverloaded_ARG; +commands[123].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[123].optional_opt_args[4].opt = help_ARG; +commands[123].optional_opt_args[5].opt = profile_ARG; +commands[123].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[123].optional_opt_args[6].opt = quiet_ARG; +commands[123].optional_opt_args[7].opt = verbose_ARG; +commands[123].optional_opt_args[8].opt = version_ARG; +commands[123].optional_opt_args[9].opt = yes_ARG; +commands[123].optional_opt_args[10].opt = autobackup_ARG; +commands[123].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[123].optional_opt_args[11].opt = force_ARG; +commands[123].optional_opt_args[12].opt = reportformat_ARG; +commands[123].optional_opt_args[12].def.val_bits = val_enum_to_bit(string_VAL); +commands[123].optional_opt_args[13].opt = test_ARG; + +commands[124].name = "vgs"; +commands[124].command_line_id = "vgs_general"; +commands[124].command_line_enum = vgs_general_CMD; +commands[124].fn = vgs; +commands[124].ro_count = 0; +commands[124].rp_count = 0; +commands[124].oo_count = 35; +commands[124].op_count = 1; +commands[124].desc = ""; +commands[124].usage = "vgs" +" [ --aligned, --all, --binary, --configreport String, --foreign, --ignorelockingfailure, --ignoreskippedcluster, --logonly, --nameprefixes, --noheadings, --nolocking, --nosuffix, --options String, --partial, --readonly, --reportformat String, --rows, --select String, --separator String, --shared, --sort String, --trustcache, --unbuffered, --units hHbBsSkKmMgGtTpPeE, --unquoted ]" +" [ VG|Tag ... ]"; +commands[124].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[124].optional_opt_args[0].opt = commandprofile_ARG; +commands[124].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[124].optional_opt_args[1].opt = config_ARG; +commands[124].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[124].optional_opt_args[2].opt = debug_ARG; +commands[124].optional_opt_args[3].opt = driverloaded_ARG; +commands[124].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[124].optional_opt_args[4].opt = help_ARG; +commands[124].optional_opt_args[5].opt = profile_ARG; +commands[124].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[124].optional_opt_args[6].opt = quiet_ARG; +commands[124].optional_opt_args[7].opt = verbose_ARG; +commands[124].optional_opt_args[8].opt = version_ARG; +commands[124].optional_opt_args[9].opt = yes_ARG; +commands[124].optional_opt_args[10].opt = aligned_ARG; +commands[124].optional_opt_args[11].opt = all_ARG; +commands[124].optional_opt_args[12].opt = binary_ARG; +commands[124].optional_opt_args[13].opt = configreport_ARG; +commands[124].optional_opt_args[13].def.val_bits = val_enum_to_bit(string_VAL); +commands[124].optional_opt_args[14].opt = foreign_ARG; +commands[124].optional_opt_args[15].opt = ignorelockingfailure_ARG; +commands[124].optional_opt_args[16].opt = ignoreskippedcluster_ARG; +commands[124].optional_opt_args[17].opt = logonly_ARG; +commands[124].optional_opt_args[18].opt = nameprefixes_ARG; +commands[124].optional_opt_args[19].opt = noheadings_ARG; +commands[124].optional_opt_args[20].opt = nolocking_ARG; +commands[124].optional_opt_args[21].opt = nosuffix_ARG; +commands[124].optional_opt_args[22].opt = options_ARG; +commands[124].optional_opt_args[22].def.val_bits = val_enum_to_bit(string_VAL); +commands[124].optional_opt_args[23].opt = partial_ARG; +commands[124].optional_opt_args[24].opt = readonly_ARG; +commands[124].optional_opt_args[25].opt = reportformat_ARG; +commands[124].optional_opt_args[25].def.val_bits = val_enum_to_bit(string_VAL); +commands[124].optional_opt_args[26].opt = rows_ARG; +commands[124].optional_opt_args[27].opt = select_ARG; +commands[124].optional_opt_args[27].def.val_bits = val_enum_to_bit(string_VAL); +commands[124].optional_opt_args[28].opt = separator_ARG; +commands[124].optional_opt_args[28].def.val_bits = val_enum_to_bit(string_VAL); +commands[124].optional_opt_args[29].opt = shared_ARG; +commands[124].optional_opt_args[30].opt = sort_ARG; +commands[124].optional_opt_args[30].def.val_bits = val_enum_to_bit(string_VAL); +commands[124].optional_opt_args[31].opt = trustcache_ARG; +commands[124].optional_opt_args[32].opt = unbuffered_ARG; +commands[124].optional_opt_args[33].opt = units_ARG; +commands[124].optional_opt_args[33].def.val_bits = val_enum_to_bit(units_VAL); +commands[124].optional_opt_args[34].opt = unquoted_ARG; +commands[124].optional_pos_args[0].pos = 1; +commands[124].optional_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL) | val_enum_to_bit(tag_VAL); +commands[124].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[125].name = "vgscan"; +commands[125].command_line_id = "vgscan_general"; +commands[125].command_line_enum = vgscan_general_CMD; +commands[125].fn = vgscan; +commands[125].ro_count = 0; +commands[125].rp_count = 0; +commands[125].oo_count = 16; +commands[125].op_count = 0; +commands[125].desc = ""; +commands[125].usage = "vgscan" +" [ --cache, --ignorelockingfailure, --mknodes, --notifydbus, --partial, --reportformat String ]"; +commands[125].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[125].optional_opt_args[0].opt = commandprofile_ARG; +commands[125].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[125].optional_opt_args[1].opt = config_ARG; +commands[125].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[125].optional_opt_args[2].opt = debug_ARG; +commands[125].optional_opt_args[3].opt = driverloaded_ARG; +commands[125].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[125].optional_opt_args[4].opt = help_ARG; +commands[125].optional_opt_args[5].opt = profile_ARG; +commands[125].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[125].optional_opt_args[6].opt = quiet_ARG; +commands[125].optional_opt_args[7].opt = verbose_ARG; +commands[125].optional_opt_args[8].opt = version_ARG; +commands[125].optional_opt_args[9].opt = yes_ARG; +commands[125].optional_opt_args[10].opt = cache_long_ARG; +commands[125].optional_opt_args[11].opt = ignorelockingfailure_ARG; +commands[125].optional_opt_args[12].opt = mknodes_ARG; +commands[125].optional_opt_args[13].opt = notifydbus_ARG; +commands[125].optional_opt_args[14].opt = partial_ARG; +commands[125].optional_opt_args[15].opt = reportformat_ARG; +commands[125].optional_opt_args[15].def.val_bits = val_enum_to_bit(string_VAL); + +commands[126].name = "vgsplit"; +commands[126].command_line_id = "vgsplit_by_pv_to_existing"; +commands[126].command_line_enum = vgsplit_by_pv_to_existing_CMD; +commands[126].fn = vgsplit; +commands[126].ro_count = 0; +commands[126].rp_count = 3; +commands[126].oo_count = 12; +commands[126].op_count = 0; +commands[126].desc = ""; +commands[126].usage = "vgsplit VG VG PV ..." +" [ --autobackup y|n ]"; +commands[126].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[126].required_pos_args[0].pos = 1; +commands[126].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[126].required_pos_args[1].pos = 2; +commands[126].required_pos_args[1].def.val_bits = val_enum_to_bit(vg_VAL); +commands[126].required_pos_args[2].pos = 3; +commands[126].required_pos_args[2].def.val_bits = val_enum_to_bit(pv_VAL); +commands[126].required_pos_args[2].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[126].optional_opt_args[0].opt = commandprofile_ARG; +commands[126].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[126].optional_opt_args[1].opt = config_ARG; +commands[126].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[126].optional_opt_args[2].opt = debug_ARG; +commands[126].optional_opt_args[3].opt = driverloaded_ARG; +commands[126].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[126].optional_opt_args[4].opt = help_ARG; +commands[126].optional_opt_args[5].opt = profile_ARG; +commands[126].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[126].optional_opt_args[6].opt = quiet_ARG; +commands[126].optional_opt_args[7].opt = verbose_ARG; +commands[126].optional_opt_args[8].opt = version_ARG; +commands[126].optional_opt_args[9].opt = yes_ARG; +commands[126].optional_opt_args[10].opt = autobackup_ARG; +commands[126].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[126].optional_opt_args[11].opt = test_ARG; + +commands[127].name = "vgsplit"; +commands[127].command_line_id = "vgsplit_by_lv_to_existing"; +commands[127].command_line_enum = vgsplit_by_lv_to_existing_CMD; +commands[127].fn = vgsplit; +commands[127].ro_count = 1; +commands[127].rp_count = 2; +commands[127].oo_count = 12; +commands[127].op_count = 0; +commands[127].desc = ""; +commands[127].usage = "vgsplit --name LV VG VG" +" [ --autobackup y|n ]"; +commands[127].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[127].required_opt_args[0].opt = name_ARG; +commands[127].required_opt_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[127].required_pos_args[0].pos = 1; +commands[127].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[127].required_pos_args[1].pos = 2; +commands[127].required_pos_args[1].def.val_bits = val_enum_to_bit(vg_VAL); +commands[127].optional_opt_args[0].opt = commandprofile_ARG; +commands[127].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[127].optional_opt_args[1].opt = config_ARG; +commands[127].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[127].optional_opt_args[2].opt = debug_ARG; +commands[127].optional_opt_args[3].opt = driverloaded_ARG; +commands[127].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[127].optional_opt_args[4].opt = help_ARG; +commands[127].optional_opt_args[5].opt = profile_ARG; +commands[127].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[127].optional_opt_args[6].opt = quiet_ARG; +commands[127].optional_opt_args[7].opt = verbose_ARG; +commands[127].optional_opt_args[8].opt = version_ARG; +commands[127].optional_opt_args[9].opt = yes_ARG; +commands[127].optional_opt_args[10].opt = autobackup_ARG; +commands[127].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[127].optional_opt_args[11].opt = test_ARG; + +commands[128].name = "vgsplit"; +commands[128].command_line_id = "vgsplit_by_pv_to_new"; +commands[128].command_line_enum = vgsplit_by_pv_to_new_CMD; +commands[128].fn = vgsplit; +commands[128].ro_count = 0; +commands[128].rp_count = 3; +commands[128].oo_count = 18; +commands[128].op_count = 0; +commands[128].desc = ""; +commands[128].usage = "vgsplit VG VG_new PV ..." +" [ --autobackup y|n, --alloc contiguous|cling|normal|anywhere|inherit, --clustered y|n, --maxlogicalvolumes Number, --maxphysicalvolumes Number, --metadatatype lvm2|lvm1, --vgmetadatacopies all|unmanaged|Number ]"; +commands[128].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[128].required_pos_args[0].pos = 1; +commands[128].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[128].required_pos_args[1].pos = 2; +commands[128].required_pos_args[1].def.val_bits = val_enum_to_bit(vg_VAL); +commands[128].required_pos_args[1].def.flags = ARG_DEF_FLAG_NEW; +commands[128].required_pos_args[2].pos = 3; +commands[128].required_pos_args[2].def.val_bits = val_enum_to_bit(pv_VAL); +commands[128].required_pos_args[2].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[128].optional_opt_args[0].opt = commandprofile_ARG; +commands[128].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[128].optional_opt_args[1].opt = config_ARG; +commands[128].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[128].optional_opt_args[2].opt = debug_ARG; +commands[128].optional_opt_args[3].opt = driverloaded_ARG; +commands[128].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[128].optional_opt_args[4].opt = help_ARG; +commands[128].optional_opt_args[5].opt = profile_ARG; +commands[128].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[128].optional_opt_args[6].opt = quiet_ARG; +commands[128].optional_opt_args[7].opt = verbose_ARG; +commands[128].optional_opt_args[8].opt = version_ARG; +commands[128].optional_opt_args[9].opt = yes_ARG; +commands[128].optional_opt_args[10].opt = autobackup_ARG; +commands[128].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[128].optional_opt_args[11].opt = test_ARG; +commands[128].optional_opt_args[12].opt = alloc_ARG; +commands[128].optional_opt_args[12].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[128].optional_opt_args[13].opt = clustered_ARG; +commands[128].optional_opt_args[13].def.val_bits = val_enum_to_bit(bool_VAL); +commands[128].optional_opt_args[14].opt = maxlogicalvolumes_ARG; +commands[128].optional_opt_args[14].def.val_bits = val_enum_to_bit(number_VAL); +commands[128].optional_opt_args[15].opt = maxphysicalvolumes_ARG; +commands[128].optional_opt_args[15].def.val_bits = val_enum_to_bit(number_VAL); +commands[128].optional_opt_args[16].opt = metadatatype_ARG; +commands[128].optional_opt_args[16].def.val_bits = val_enum_to_bit(metadatatype_VAL); +commands[128].optional_opt_args[17].opt = vgmetadatacopies_ARG; +commands[128].optional_opt_args[17].def.val_bits = val_enum_to_bit(metadatacopies_VAL); + +commands[129].name = "vgsplit"; +commands[129].command_line_id = "vgsplit_by_lv_to_new"; +commands[129].command_line_enum = vgsplit_by_lv_to_new_CMD; +commands[129].fn = vgsplit; +commands[129].ro_count = 1; +commands[129].rp_count = 2; +commands[129].oo_count = 18; +commands[129].op_count = 0; +commands[129].desc = ""; +commands[129].usage = "vgsplit --name LV VG VG_new" +" [ --autobackup y|n, --alloc contiguous|cling|normal|anywhere|inherit, --clustered y|n, --maxlogicalvolumes Number, --maxphysicalvolumes Number, --metadatatype lvm2|lvm1, --vgmetadatacopies all|unmanaged|Number ]"; +commands[129].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[129].required_opt_args[0].opt = name_ARG; +commands[129].required_opt_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[129].required_pos_args[0].pos = 1; +commands[129].required_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[129].required_pos_args[1].pos = 2; +commands[129].required_pos_args[1].def.val_bits = val_enum_to_bit(vg_VAL); +commands[129].required_pos_args[1].def.flags = ARG_DEF_FLAG_NEW; +commands[129].optional_opt_args[0].opt = commandprofile_ARG; +commands[129].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[129].optional_opt_args[1].opt = config_ARG; +commands[129].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[129].optional_opt_args[2].opt = debug_ARG; +commands[129].optional_opt_args[3].opt = driverloaded_ARG; +commands[129].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[129].optional_opt_args[4].opt = help_ARG; +commands[129].optional_opt_args[5].opt = profile_ARG; +commands[129].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[129].optional_opt_args[6].opt = quiet_ARG; +commands[129].optional_opt_args[7].opt = verbose_ARG; +commands[129].optional_opt_args[8].opt = version_ARG; +commands[129].optional_opt_args[9].opt = yes_ARG; +commands[129].optional_opt_args[10].opt = autobackup_ARG; +commands[129].optional_opt_args[10].def.val_bits = val_enum_to_bit(bool_VAL); +commands[129].optional_opt_args[11].opt = test_ARG; +commands[129].optional_opt_args[12].opt = alloc_ARG; +commands[129].optional_opt_args[12].def.val_bits = val_enum_to_bit(alloc_VAL); +commands[129].optional_opt_args[13].opt = clustered_ARG; +commands[129].optional_opt_args[13].def.val_bits = val_enum_to_bit(bool_VAL); +commands[129].optional_opt_args[14].opt = maxlogicalvolumes_ARG; +commands[129].optional_opt_args[14].def.val_bits = val_enum_to_bit(number_VAL); +commands[129].optional_opt_args[15].opt = maxphysicalvolumes_ARG; +commands[129].optional_opt_args[15].def.val_bits = val_enum_to_bit(number_VAL); +commands[129].optional_opt_args[16].opt = metadatatype_ARG; +commands[129].optional_opt_args[16].def.val_bits = val_enum_to_bit(metadatatype_VAL); +commands[129].optional_opt_args[17].opt = vgmetadatacopies_ARG; +commands[129].optional_opt_args[17].def.val_bits = val_enum_to_bit(metadatacopies_VAL); + +commands[130].name = "config"; +commands[130].command_line_id = "lvmconfig_general"; +commands[130].command_line_enum = lvmconfig_general_CMD; +commands[130].fn = config; +commands[130].ro_count = 0; +commands[130].rp_count = 0; +commands[130].oo_count = 28; +commands[130].op_count = 1; +commands[130].desc = ""; +commands[130].usage = "config" +" [ --atversion String, --typeconfig String, --file String, --ignoreadvanced, --ignoreunsupported, --ignorelocal, --list, --mergedconfig, --metadataprofile String, --sinceversion String, --showdeprecated, --showunsupported, --validate, --withsummary, --withcomments, --withspaces, --unconfigured, --withversions ]" +" [ String ... ]"; +commands[130].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[130].optional_opt_args[0].opt = commandprofile_ARG; +commands[130].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[130].optional_opt_args[1].opt = config_ARG; +commands[130].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[130].optional_opt_args[2].opt = debug_ARG; +commands[130].optional_opt_args[3].opt = driverloaded_ARG; +commands[130].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[130].optional_opt_args[4].opt = help_ARG; +commands[130].optional_opt_args[5].opt = profile_ARG; +commands[130].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[130].optional_opt_args[6].opt = quiet_ARG; +commands[130].optional_opt_args[7].opt = verbose_ARG; +commands[130].optional_opt_args[8].opt = version_ARG; +commands[130].optional_opt_args[9].opt = yes_ARG; +commands[130].optional_opt_args[10].opt = atversion_ARG; +commands[130].optional_opt_args[10].def.val_bits = val_enum_to_bit(string_VAL); +commands[130].optional_opt_args[11].opt = configtype_ARG; +commands[130].optional_opt_args[11].def.val_bits = val_enum_to_bit(string_VAL); +commands[130].optional_opt_args[12].opt = file_ARG; +commands[130].optional_opt_args[12].def.val_bits = val_enum_to_bit(string_VAL); +commands[130].optional_opt_args[13].opt = ignoreadvanced_ARG; +commands[130].optional_opt_args[14].opt = ignoreunsupported_ARG; +commands[130].optional_opt_args[15].opt = ignorelocal_ARG; +commands[130].optional_opt_args[16].opt = list_ARG; +commands[130].optional_opt_args[17].opt = mergedconfig_ARG; +commands[130].optional_opt_args[18].opt = metadataprofile_ARG; +commands[130].optional_opt_args[18].def.val_bits = val_enum_to_bit(string_VAL); +commands[130].optional_opt_args[19].opt = sinceversion_ARG; +commands[130].optional_opt_args[19].def.val_bits = val_enum_to_bit(string_VAL); +commands[130].optional_opt_args[20].opt = showdeprecated_ARG; +commands[130].optional_opt_args[21].opt = showunsupported_ARG; +commands[130].optional_opt_args[22].opt = validate_ARG; +commands[130].optional_opt_args[23].opt = withsummary_ARG; +commands[130].optional_opt_args[24].opt = withcomments_ARG; +commands[130].optional_opt_args[25].opt = withspaces_ARG; +commands[130].optional_opt_args[26].opt = unconfigured_ARG; +commands[130].optional_opt_args[27].opt = withversions_ARG; +commands[130].optional_pos_args[0].pos = 1; +commands[130].optional_pos_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[130].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[131].name = "dumpconfig"; +commands[131].command_line_id = "lvmconfig_general"; +commands[131].command_line_enum = lvmconfig_general_CMD; +commands[131].fn = dumpconfig; +commands[131].ro_count = 0; +commands[131].rp_count = 0; +commands[131].oo_count = 28; +commands[131].op_count = 1; +commands[131].desc = ""; +commands[131].usage = "dumpconfig" +" [ --atversion String, --typeconfig String, --file String, --ignoreadvanced, --ignoreunsupported, --ignorelocal, --list, --mergedconfig, --metadataprofile String, --sinceversion String, --showdeprecated, --showunsupported, --validate, --withsummary, --withcomments, --withspaces, --unconfigured, --withversions ]" +" [ String ... ]"; +commands[131].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[131].optional_opt_args[0].opt = commandprofile_ARG; +commands[131].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[131].optional_opt_args[1].opt = config_ARG; +commands[131].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[131].optional_opt_args[2].opt = debug_ARG; +commands[131].optional_opt_args[3].opt = driverloaded_ARG; +commands[131].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[131].optional_opt_args[4].opt = help_ARG; +commands[131].optional_opt_args[5].opt = profile_ARG; +commands[131].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[131].optional_opt_args[6].opt = quiet_ARG; +commands[131].optional_opt_args[7].opt = verbose_ARG; +commands[131].optional_opt_args[8].opt = version_ARG; +commands[131].optional_opt_args[9].opt = yes_ARG; +commands[131].optional_opt_args[10].opt = atversion_ARG; +commands[131].optional_opt_args[10].def.val_bits = val_enum_to_bit(string_VAL); +commands[131].optional_opt_args[11].opt = configtype_ARG; +commands[131].optional_opt_args[11].def.val_bits = val_enum_to_bit(string_VAL); +commands[131].optional_opt_args[12].opt = file_ARG; +commands[131].optional_opt_args[12].def.val_bits = val_enum_to_bit(string_VAL); +commands[131].optional_opt_args[13].opt = ignoreadvanced_ARG; +commands[131].optional_opt_args[14].opt = ignoreunsupported_ARG; +commands[131].optional_opt_args[15].opt = ignorelocal_ARG; +commands[131].optional_opt_args[16].opt = list_ARG; +commands[131].optional_opt_args[17].opt = mergedconfig_ARG; +commands[131].optional_opt_args[18].opt = metadataprofile_ARG; +commands[131].optional_opt_args[18].def.val_bits = val_enum_to_bit(string_VAL); +commands[131].optional_opt_args[19].opt = sinceversion_ARG; +commands[131].optional_opt_args[19].def.val_bits = val_enum_to_bit(string_VAL); +commands[131].optional_opt_args[20].opt = showdeprecated_ARG; +commands[131].optional_opt_args[21].opt = showunsupported_ARG; +commands[131].optional_opt_args[22].opt = validate_ARG; +commands[131].optional_opt_args[23].opt = withsummary_ARG; +commands[131].optional_opt_args[24].opt = withcomments_ARG; +commands[131].optional_opt_args[25].opt = withspaces_ARG; +commands[131].optional_opt_args[26].opt = unconfigured_ARG; +commands[131].optional_opt_args[27].opt = withversions_ARG; +commands[131].optional_pos_args[0].pos = 1; +commands[131].optional_pos_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[131].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[132].name = "devtypes"; +commands[132].command_line_id = "devtypes_general"; +commands[132].command_line_enum = devtypes_general_CMD; +commands[132].fn = devtypes; +commands[132].ro_count = 0; +commands[132].rp_count = 0; +commands[132].oo_count = 23; +commands[132].op_count = 0; +commands[132].desc = ""; +commands[132].usage = "devtypes" +" [ --aligned, --binary, --nameprefixes, --noheadings, --nosuffix, --options String, --reportformat String, --rows, --select String, --separator String, --sort String, --unbuffered, --unquoted ]"; +commands[132].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[132].optional_opt_args[0].opt = commandprofile_ARG; +commands[132].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[132].optional_opt_args[1].opt = config_ARG; +commands[132].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[132].optional_opt_args[2].opt = debug_ARG; +commands[132].optional_opt_args[3].opt = driverloaded_ARG; +commands[132].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[132].optional_opt_args[4].opt = help_ARG; +commands[132].optional_opt_args[5].opt = profile_ARG; +commands[132].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[132].optional_opt_args[6].opt = quiet_ARG; +commands[132].optional_opt_args[7].opt = verbose_ARG; +commands[132].optional_opt_args[8].opt = version_ARG; +commands[132].optional_opt_args[9].opt = yes_ARG; +commands[132].optional_opt_args[10].opt = aligned_ARG; +commands[132].optional_opt_args[11].opt = binary_ARG; +commands[132].optional_opt_args[12].opt = nameprefixes_ARG; +commands[132].optional_opt_args[13].opt = noheadings_ARG; +commands[132].optional_opt_args[14].opt = nosuffix_ARG; +commands[132].optional_opt_args[15].opt = options_ARG; +commands[132].optional_opt_args[15].def.val_bits = val_enum_to_bit(string_VAL); +commands[132].optional_opt_args[16].opt = reportformat_ARG; +commands[132].optional_opt_args[16].def.val_bits = val_enum_to_bit(string_VAL); +commands[132].optional_opt_args[17].opt = rows_ARG; +commands[132].optional_opt_args[18].opt = select_ARG; +commands[132].optional_opt_args[18].def.val_bits = val_enum_to_bit(string_VAL); +commands[132].optional_opt_args[19].opt = separator_ARG; +commands[132].optional_opt_args[19].def.val_bits = val_enum_to_bit(string_VAL); +commands[132].optional_opt_args[20].opt = sort_ARG; +commands[132].optional_opt_args[20].def.val_bits = val_enum_to_bit(string_VAL); +commands[132].optional_opt_args[21].opt = unbuffered_ARG; +commands[132].optional_opt_args[22].opt = unquoted_ARG; + +commands[133].name = "fullreport"; +commands[133].command_line_id = "fullreport_general"; +commands[133].command_line_enum = fullreport_general_CMD; +commands[133].fn = fullreport; +commands[133].ro_count = 0; +commands[133].rp_count = 0; +commands[133].oo_count = 35; +commands[133].op_count = 1; +commands[133].desc = ""; +commands[133].usage = "fullreport" +" [ --aligned, --all, --binary, --configreport String, --foreign, --ignorelockingfailure, --ignoreskippedcluster, --logonly, --nameprefixes, --noheadings, --nolocking, --nosuffix, --options String, --partial, --readonly, --reportformat String, --rows, --select String, --separator String, --shared, --sort String, --trustcache, --unbuffered, --units hHbBsSkKmMgGtTpPeE, --unquoted ]" +" [ VG ... ]"; +commands[133].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[133].optional_opt_args[0].opt = commandprofile_ARG; +commands[133].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[133].optional_opt_args[1].opt = config_ARG; +commands[133].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[133].optional_opt_args[2].opt = debug_ARG; +commands[133].optional_opt_args[3].opt = driverloaded_ARG; +commands[133].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[133].optional_opt_args[4].opt = help_ARG; +commands[133].optional_opt_args[5].opt = profile_ARG; +commands[133].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[133].optional_opt_args[6].opt = quiet_ARG; +commands[133].optional_opt_args[7].opt = verbose_ARG; +commands[133].optional_opt_args[8].opt = version_ARG; +commands[133].optional_opt_args[9].opt = yes_ARG; +commands[133].optional_opt_args[10].opt = aligned_ARG; +commands[133].optional_opt_args[11].opt = all_ARG; +commands[133].optional_opt_args[12].opt = binary_ARG; +commands[133].optional_opt_args[13].opt = configreport_ARG; +commands[133].optional_opt_args[13].def.val_bits = val_enum_to_bit(string_VAL); +commands[133].optional_opt_args[14].opt = foreign_ARG; +commands[133].optional_opt_args[15].opt = ignorelockingfailure_ARG; +commands[133].optional_opt_args[16].opt = ignoreskippedcluster_ARG; +commands[133].optional_opt_args[17].opt = logonly_ARG; +commands[133].optional_opt_args[18].opt = nameprefixes_ARG; +commands[133].optional_opt_args[19].opt = noheadings_ARG; +commands[133].optional_opt_args[20].opt = nolocking_ARG; +commands[133].optional_opt_args[21].opt = nosuffix_ARG; +commands[133].optional_opt_args[22].opt = options_ARG; +commands[133].optional_opt_args[22].def.val_bits = val_enum_to_bit(string_VAL); +commands[133].optional_opt_args[23].opt = partial_ARG; +commands[133].optional_opt_args[24].opt = readonly_ARG; +commands[133].optional_opt_args[25].opt = reportformat_ARG; +commands[133].optional_opt_args[25].def.val_bits = val_enum_to_bit(string_VAL); +commands[133].optional_opt_args[26].opt = rows_ARG; +commands[133].optional_opt_args[27].opt = select_ARG; +commands[133].optional_opt_args[27].def.val_bits = val_enum_to_bit(string_VAL); +commands[133].optional_opt_args[28].opt = separator_ARG; +commands[133].optional_opt_args[28].def.val_bits = val_enum_to_bit(string_VAL); +commands[133].optional_opt_args[29].opt = shared_ARG; +commands[133].optional_opt_args[30].opt = sort_ARG; +commands[133].optional_opt_args[30].def.val_bits = val_enum_to_bit(string_VAL); +commands[133].optional_opt_args[31].opt = trustcache_ARG; +commands[133].optional_opt_args[32].opt = unbuffered_ARG; +commands[133].optional_opt_args[33].opt = units_ARG; +commands[133].optional_opt_args[33].def.val_bits = val_enum_to_bit(units_VAL); +commands[133].optional_opt_args[34].opt = unquoted_ARG; +commands[133].optional_pos_args[0].pos = 1; +commands[133].optional_pos_args[0].def.val_bits = val_enum_to_bit(vg_VAL); +commands[133].optional_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; + +commands[134].name = "lastlog"; +commands[134].command_line_id = "lastlog_general"; +commands[134].command_line_enum = lastlog_general_CMD; +commands[134].fn = lastlog; +commands[134].ro_count = 0; +commands[134].rp_count = 0; +commands[134].oo_count = 12; +commands[134].op_count = 0; +commands[134].desc = ""; +commands[134].usage = "lastlog" +" [ --reportformat String, --select String ]"; +commands[134].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[134].optional_opt_args[0].opt = commandprofile_ARG; +commands[134].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[134].optional_opt_args[1].opt = config_ARG; +commands[134].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[134].optional_opt_args[2].opt = debug_ARG; +commands[134].optional_opt_args[3].opt = driverloaded_ARG; +commands[134].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[134].optional_opt_args[4].opt = help_ARG; +commands[134].optional_opt_args[5].opt = profile_ARG; +commands[134].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[134].optional_opt_args[6].opt = quiet_ARG; +commands[134].optional_opt_args[7].opt = verbose_ARG; +commands[134].optional_opt_args[8].opt = version_ARG; +commands[134].optional_opt_args[9].opt = yes_ARG; +commands[134].optional_opt_args[10].opt = reportformat_ARG; +commands[134].optional_opt_args[10].def.val_bits = val_enum_to_bit(string_VAL); +commands[134].optional_opt_args[11].opt = select_ARG; +commands[134].optional_opt_args[11].def.val_bits = val_enum_to_bit(string_VAL); + +commands[135].name = "lvpoll"; +commands[135].command_line_id = "lvpoll_general"; +commands[135].command_line_enum = lvpoll_general_CMD; +commands[135].fn = lvpoll; +commands[135].ro_count = 1; +commands[135].rp_count = 1; +commands[135].oo_count = 15; +commands[135].op_count = 0; +commands[135].desc = ""; +commands[135].usage = "lvpoll --polloperation String LV ..." +" [ --abort, --autobackup y|n, --handlemissingpvs, --interval Number ]"; +commands[135].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[135].required_opt_args[0].opt = polloperation_ARG; +commands[135].required_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[135].required_pos_args[0].pos = 1; +commands[135].required_pos_args[0].def.val_bits = val_enum_to_bit(lv_VAL); +commands[135].required_pos_args[0].def.flags = ARG_DEF_FLAG_MAY_REPEAT; +commands[135].optional_opt_args[0].opt = commandprofile_ARG; +commands[135].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[135].optional_opt_args[1].opt = config_ARG; +commands[135].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[135].optional_opt_args[2].opt = debug_ARG; +commands[135].optional_opt_args[3].opt = driverloaded_ARG; +commands[135].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[135].optional_opt_args[4].opt = help_ARG; +commands[135].optional_opt_args[5].opt = profile_ARG; +commands[135].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[135].optional_opt_args[6].opt = quiet_ARG; +commands[135].optional_opt_args[7].opt = verbose_ARG; +commands[135].optional_opt_args[8].opt = version_ARG; +commands[135].optional_opt_args[9].opt = yes_ARG; +commands[135].optional_opt_args[10].opt = abort_ARG; +commands[135].optional_opt_args[11].opt = autobackup_ARG; +commands[135].optional_opt_args[11].def.val_bits = val_enum_to_bit(bool_VAL); +commands[135].optional_opt_args[12].opt = handlemissingpvs_ARG; +commands[135].optional_opt_args[13].opt = interval_ARG; +commands[135].optional_opt_args[13].def.val_bits = val_enum_to_bit(number_VAL); +commands[135].optional_opt_args[14].opt = test_ARG; + +commands[136].name = "formats"; +commands[136].command_line_id = "formats_general"; +commands[136].command_line_enum = formats_general_CMD; +commands[136].fn = formats; +commands[136].ro_count = 0; +commands[136].rp_count = 0; +commands[136].oo_count = 10; +commands[136].op_count = 0; +commands[136].desc = ""; +commands[136].usage = "formats"; +commands[136].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[136].optional_opt_args[0].opt = commandprofile_ARG; +commands[136].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[136].optional_opt_args[1].opt = config_ARG; +commands[136].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[136].optional_opt_args[2].opt = debug_ARG; +commands[136].optional_opt_args[3].opt = driverloaded_ARG; +commands[136].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[136].optional_opt_args[4].opt = help_ARG; +commands[136].optional_opt_args[5].opt = profile_ARG; +commands[136].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[136].optional_opt_args[6].opt = quiet_ARG; +commands[136].optional_opt_args[7].opt = verbose_ARG; +commands[136].optional_opt_args[8].opt = version_ARG; +commands[136].optional_opt_args[9].opt = yes_ARG; + +commands[137].name = "help"; +commands[137].command_line_id = "help_general"; +commands[137].command_line_enum = help_general_CMD; +commands[137].fn = help; +commands[137].ro_count = 0; +commands[137].rp_count = 0; +commands[137].oo_count = 10; +commands[137].op_count = 0; +commands[137].desc = ""; +commands[137].usage = "help"; +commands[137].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[137].optional_opt_args[0].opt = commandprofile_ARG; +commands[137].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[137].optional_opt_args[1].opt = config_ARG; +commands[137].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[137].optional_opt_args[2].opt = debug_ARG; +commands[137].optional_opt_args[3].opt = driverloaded_ARG; +commands[137].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[137].optional_opt_args[4].opt = help_ARG; +commands[137].optional_opt_args[5].opt = profile_ARG; +commands[137].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[137].optional_opt_args[6].opt = quiet_ARG; +commands[137].optional_opt_args[7].opt = verbose_ARG; +commands[137].optional_opt_args[8].opt = version_ARG; +commands[137].optional_opt_args[9].opt = yes_ARG; + +commands[138].name = "version"; +commands[138].command_line_id = "version_general"; +commands[138].command_line_enum = version_general_CMD; +commands[138].fn = version; +commands[138].ro_count = 0; +commands[138].rp_count = 0; +commands[138].oo_count = 10; +commands[138].op_count = 0; +commands[138].desc = ""; +commands[138].usage = "version"; +commands[138].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[138].optional_opt_args[0].opt = commandprofile_ARG; +commands[138].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[138].optional_opt_args[1].opt = config_ARG; +commands[138].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[138].optional_opt_args[2].opt = debug_ARG; +commands[138].optional_opt_args[3].opt = driverloaded_ARG; +commands[138].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[138].optional_opt_args[4].opt = help_ARG; +commands[138].optional_opt_args[5].opt = profile_ARG; +commands[138].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[138].optional_opt_args[6].opt = quiet_ARG; +commands[138].optional_opt_args[7].opt = verbose_ARG; +commands[138].optional_opt_args[8].opt = version_ARG; +commands[138].optional_opt_args[9].opt = yes_ARG; + +commands[139].name = "pvdata"; +commands[139].command_line_id = "pvdata_general"; +commands[139].command_line_enum = pvdata_general_CMD; +commands[139].fn = pvdata; +commands[139].ro_count = 0; +commands[139].rp_count = 0; +commands[139].oo_count = 10; +commands[139].op_count = 0; +commands[139].desc = ""; +commands[139].usage = "pvdata"; +commands[139].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[139].optional_opt_args[0].opt = commandprofile_ARG; +commands[139].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[139].optional_opt_args[1].opt = config_ARG; +commands[139].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[139].optional_opt_args[2].opt = debug_ARG; +commands[139].optional_opt_args[3].opt = driverloaded_ARG; +commands[139].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[139].optional_opt_args[4].opt = help_ARG; +commands[139].optional_opt_args[5].opt = profile_ARG; +commands[139].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[139].optional_opt_args[6].opt = quiet_ARG; +commands[139].optional_opt_args[7].opt = verbose_ARG; +commands[139].optional_opt_args[8].opt = version_ARG; +commands[139].optional_opt_args[9].opt = yes_ARG; + +commands[140].name = "segtypes"; +commands[140].command_line_id = "segtypes_general"; +commands[140].command_line_enum = segtypes_general_CMD; +commands[140].fn = segtypes; +commands[140].ro_count = 0; +commands[140].rp_count = 0; +commands[140].oo_count = 10; +commands[140].op_count = 0; +commands[140].desc = ""; +commands[140].usage = "segtypes"; +commands[140].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[140].optional_opt_args[0].opt = commandprofile_ARG; +commands[140].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[140].optional_opt_args[1].opt = config_ARG; +commands[140].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[140].optional_opt_args[2].opt = debug_ARG; +commands[140].optional_opt_args[3].opt = driverloaded_ARG; +commands[140].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[140].optional_opt_args[4].opt = help_ARG; +commands[140].optional_opt_args[5].opt = profile_ARG; +commands[140].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[140].optional_opt_args[6].opt = quiet_ARG; +commands[140].optional_opt_args[7].opt = verbose_ARG; +commands[140].optional_opt_args[8].opt = version_ARG; +commands[140].optional_opt_args[9].opt = yes_ARG; + +commands[141].name = "systemid"; +commands[141].command_line_id = "systemid_general"; +commands[141].command_line_enum = systemid_general_CMD; +commands[141].fn = systemid; +commands[141].ro_count = 0; +commands[141].rp_count = 0; +commands[141].oo_count = 10; +commands[141].op_count = 0; +commands[141].desc = ""; +commands[141].usage = "systemid"; +commands[141].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[141].optional_opt_args[0].opt = commandprofile_ARG; +commands[141].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[141].optional_opt_args[1].opt = config_ARG; +commands[141].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[141].optional_opt_args[2].opt = debug_ARG; +commands[141].optional_opt_args[3].opt = driverloaded_ARG; +commands[141].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[141].optional_opt_args[4].opt = help_ARG; +commands[141].optional_opt_args[5].opt = profile_ARG; +commands[141].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[141].optional_opt_args[6].opt = quiet_ARG; +commands[141].optional_opt_args[7].opt = verbose_ARG; +commands[141].optional_opt_args[8].opt = version_ARG; +commands[141].optional_opt_args[9].opt = yes_ARG; + +commands[142].name = "tags"; +commands[142].command_line_id = "tags_general"; +commands[142].command_line_enum = tags_general_CMD; +commands[142].fn = tags; +commands[142].ro_count = 0; +commands[142].rp_count = 0; +commands[142].oo_count = 10; +commands[142].op_count = 0; +commands[142].desc = ""; +commands[142].usage = "tags"; +commands[142].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[142].optional_opt_args[0].opt = commandprofile_ARG; +commands[142].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[142].optional_opt_args[1].opt = config_ARG; +commands[142].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[142].optional_opt_args[2].opt = debug_ARG; +commands[142].optional_opt_args[3].opt = driverloaded_ARG; +commands[142].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[142].optional_opt_args[4].opt = help_ARG; +commands[142].optional_opt_args[5].opt = profile_ARG; +commands[142].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[142].optional_opt_args[6].opt = quiet_ARG; +commands[142].optional_opt_args[7].opt = verbose_ARG; +commands[142].optional_opt_args[8].opt = version_ARG; +commands[142].optional_opt_args[9].opt = yes_ARG; + +commands[143].name = "lvmchange"; +commands[143].command_line_id = "lvmchange_general"; +commands[143].command_line_enum = lvmchange_general_CMD; +commands[143].fn = lvmchange; +commands[143].ro_count = 0; +commands[143].rp_count = 0; +commands[143].oo_count = 10; +commands[143].op_count = 0; +commands[143].desc = ""; +commands[143].usage = "lvmchange"; +commands[143].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[143].optional_opt_args[0].opt = commandprofile_ARG; +commands[143].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[143].optional_opt_args[1].opt = config_ARG; +commands[143].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[143].optional_opt_args[2].opt = debug_ARG; +commands[143].optional_opt_args[3].opt = driverloaded_ARG; +commands[143].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[143].optional_opt_args[4].opt = help_ARG; +commands[143].optional_opt_args[5].opt = profile_ARG; +commands[143].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[143].optional_opt_args[6].opt = quiet_ARG; +commands[143].optional_opt_args[7].opt = verbose_ARG; +commands[143].optional_opt_args[8].opt = version_ARG; +commands[143].optional_opt_args[9].opt = yes_ARG; + +commands[144].name = "lvmdiskscan"; +commands[144].command_line_id = "lvmdiskscan_general"; +commands[144].command_line_enum = lvmdiskscan_general_CMD; +commands[144].fn = lvmdiskscan; +commands[144].ro_count = 0; +commands[144].rp_count = 0; +commands[144].oo_count = 12; +commands[144].op_count = 0; +commands[144].desc = ""; +commands[144].usage = "lvmdiskscan" +" [ --lvmpartition, --readonly ]"; +commands[144].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[144].optional_opt_args[0].opt = commandprofile_ARG; +commands[144].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[144].optional_opt_args[1].opt = config_ARG; +commands[144].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[144].optional_opt_args[2].opt = debug_ARG; +commands[144].optional_opt_args[3].opt = driverloaded_ARG; +commands[144].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[144].optional_opt_args[4].opt = help_ARG; +commands[144].optional_opt_args[5].opt = profile_ARG; +commands[144].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[144].optional_opt_args[6].opt = quiet_ARG; +commands[144].optional_opt_args[7].opt = verbose_ARG; +commands[144].optional_opt_args[8].opt = version_ARG; +commands[144].optional_opt_args[9].opt = yes_ARG; +commands[144].optional_opt_args[10].opt = lvmpartition_ARG; +commands[144].optional_opt_args[11].opt = readonly_ARG; + +commands[145].name = "lvmsadc"; +commands[145].command_line_id = "lvmsadc_general"; +commands[145].command_line_enum = lvmsadc_general_CMD; +commands[145].fn = lvmsadc; +commands[145].ro_count = 0; +commands[145].rp_count = 0; +commands[145].oo_count = 10; +commands[145].op_count = 0; +commands[145].desc = ""; +commands[145].usage = "lvmsadc"; +commands[145].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[145].optional_opt_args[0].opt = commandprofile_ARG; +commands[145].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[145].optional_opt_args[1].opt = config_ARG; +commands[145].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[145].optional_opt_args[2].opt = debug_ARG; +commands[145].optional_opt_args[3].opt = driverloaded_ARG; +commands[145].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[145].optional_opt_args[4].opt = help_ARG; +commands[145].optional_opt_args[5].opt = profile_ARG; +commands[145].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[145].optional_opt_args[6].opt = quiet_ARG; +commands[145].optional_opt_args[7].opt = verbose_ARG; +commands[145].optional_opt_args[8].opt = version_ARG; +commands[145].optional_opt_args[9].opt = yes_ARG; + +commands[146].name = "lvmsar"; +commands[146].command_line_id = "lvmsar_general"; +commands[146].command_line_enum = lvmsar_general_CMD; +commands[146].fn = lvmsar; +commands[146].ro_count = 0; +commands[146].rp_count = 0; +commands[146].oo_count = 12; +commands[146].op_count = 0; +commands[146].desc = ""; +commands[146].usage = "lvmsar" +" [ --full, --stdin ]"; +commands[146].usage_common = +" [ --commandprofile String, --config String, --debug, --driverloaded y|n, --help, --profile String, --quiet, --verbose, --version, --yes, --force, --test, --noudevsync ]"; +commands[146].optional_opt_args[0].opt = commandprofile_ARG; +commands[146].optional_opt_args[0].def.val_bits = val_enum_to_bit(string_VAL); +commands[146].optional_opt_args[1].opt = config_ARG; +commands[146].optional_opt_args[1].def.val_bits = val_enum_to_bit(string_VAL); +commands[146].optional_opt_args[2].opt = debug_ARG; +commands[146].optional_opt_args[3].opt = driverloaded_ARG; +commands[146].optional_opt_args[3].def.val_bits = val_enum_to_bit(bool_VAL); +commands[146].optional_opt_args[4].opt = help_ARG; +commands[146].optional_opt_args[5].opt = profile_ARG; +commands[146].optional_opt_args[5].def.val_bits = val_enum_to_bit(string_VAL); +commands[146].optional_opt_args[6].opt = quiet_ARG; +commands[146].optional_opt_args[7].opt = verbose_ARG; +commands[146].optional_opt_args[8].opt = version_ARG; +commands[146].optional_opt_args[9].opt = yes_ARG; +commands[146].optional_opt_args[10].opt = full_ARG; +commands[146].optional_opt_args[11].opt = stdin_ARG; + diff --git a/tools/command.h b/tools/command.h new file mode 100644 index 000000000..993f4489d --- /dev/null +++ b/tools/command.h @@ -0,0 +1,169 @@ +/* + * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. + * Copyright (C) 2004-2015 Red Hat, Inc. All rights reserved. + * + * This file is part of LVM2. + * + * This copyrighted material is made available to anyone wishing to use, + * modify, copy, or redistribute it subject to the terms and conditions + * of the GNU Lesser General Public License v.2.1. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef _LVM_COMMAND_H +#define _LVM_COMMAND_H + +struct cmd_context; + +/* old per-command-name function */ +typedef int (*command_fn) (struct cmd_context *cmd, int argc, char **argv); + +/* new per-command-line-id functions */ +typedef int (*command_line_fn) (struct cmd_context *cmd, int argc, char **argv); + +struct command_function { + int command_line_enum; + command_line_fn fn; +}; + +struct command_name { + const char *name; + const char *desc; /* general command description from commands.h */ + unsigned int flags; + + /* union of {required,optional}_opt_args for all commands with this name */ + int valid_args[ARG_COUNT]; + int num_args; +}; + +/* + * Command defintion + * + * A command is defined in terms of a command name, + * required options (+args), optional options (+args), + * required positional args, optional positional args. + * + * A positional arg always has non-zero pos_arg.def.types. + * The first positional arg has pos_arg.pos of 1. + */ + +/* arg_def flags */ +#define ARG_DEF_FLAG_NEW 1 << 0 +#define ARG_DEF_FLAG_MAY_REPEAT 1 << 1 + +/* arg_def lv_types */ +enum { + ARG_DEF_LV_ANY = 0, + ARG_DEF_LV_LINEAR = 1 << 0, + ARG_DEF_LV_STRIPED = 1 << 1, + ARG_DEF_LV_SNAPSHOT = 1 << 2, + ARG_DEF_LV_MIRROR = 1 << 3, + ARG_DEF_LV_RAID = 1 << 4, + ARG_DEF_LV_RAID0 = 1 << 5, + ARG_DEF_LV_RAID1 = 1 << 6, + ARG_DEF_LV_RAID4 = 1 << 7, + ARG_DEF_LV_RAID5 = 1 << 8, + ARG_DEF_LV_RAID6 = 1 << 9, + ARG_DEF_LV_RAID10 = 1 << 10, + ARG_DEF_LV_THIN = 1 << 11, + ARG_DEF_LV_THINPOOL = 1 << 12, + ARG_DEF_LV_CACHE = 1 << 13, + ARG_DEF_LV_CACHEPOOL = 1 << 14, + ARG_DEF_LV_LAST = 1 << 15, +}; + +static inline int val_bit_is_set(uint64_t val_bits, int val_enum) +{ + return (val_bits & (1 << val_enum)) ? 1 : 0; +} + +static inline uint64_t val_enum_to_bit(int val_enum) +{ + return 1 << val_enum; +} + +/* Description a value that follows an option or exists in a position. */ + +struct arg_def { + uint64_t val_bits; /* bits of x_VAL, can be multiple for pos_arg */ + uint64_t num; /* a literal number for conststr_VAL */ + const char *str; /* a literal string for constnum_VAL */ + uint32_t lv_types; /* ARG_DEF_LV_, for lv_VAL, can be multiple */ + uint32_t flags; /* ARG_DEF_FLAG_ */ +}; + +/* Description of an option and the value that follows it. */ + +struct opt_arg { + int opt; /* option, e.g. foo_ARG */ + struct arg_def def; /* defines accepted values */ +}; + +/* Description of a position and the value that exists there. */ + +struct pos_arg { + int pos; /* position, e.g. first is 1 */ + struct arg_def def; /* defines accepted values */ +}; + +/* + * CMD_RO_ARGS needs to accomodate a list of options, + * of which one is required after which the rest are + * optional. + */ +#define CMD_RO_ARGS 64 /* required opt args */ +#define CMD_OO_ARGS 150 /* optional opt args */ +#define CMD_RP_ARGS 8 /* required positional args */ +#define CMD_OP_ARGS 8 /* optional positional args */ + +/* + * one or more from required_opt_args is required, + * then the rest are optional. + */ +#define CMD_FLAG_ONE_REQUIRED_OPT 1 + +/* a register of the lvm commands */ +struct command { + const char *name; + const char *desc; /* specific command description from command-lines.h */ + const char *usage; /* excludes common options like --help, --debug */ + const char *usage_common; /* includes commmon options like --help, --debug */ + const char *command_line_id; + int command_line_enum; /* <command_line_id>_CMD */ + + struct command_name *cname; + + command_fn fn; /* old style */ + struct command_function *functions; /* new style */ + + unsigned int flags; /* copied from command_name.flags from commands.h */ + + unsigned int cmd_flags; /* CMD_FLAG_ */ + + /* definitions of opt/pos args */ + + /* required args following an --opt */ + struct opt_arg required_opt_args[CMD_RO_ARGS]; + + /* optional args following an --opt */ + struct opt_arg optional_opt_args[CMD_OO_ARGS]; + + /* required positional args */ + struct pos_arg required_pos_args[CMD_RP_ARGS]; + + /* optional positional args */ + struct pos_arg optional_pos_args[CMD_OP_ARGS]; + + int ro_count; + int oo_count; + int rp_count; + int op_count; + + /* used for processing current position */ + int pos_count; +}; + +#endif diff --git a/tools/commands.h b/tools/commands.h index baf89b15f..c66320794 100644 --- a/tools/commands.h +++ b/tools/commands.h @@ -13,1546 +13,232 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/*********** Replace with script? -xx(e2fsadm, - "Resize logical volume and ext2 filesystem", - "e2fsadm " - "[-d|--debug] " "[-h|--help] " "[-n|--nofsck]\n" - "\t{[-l|--extents] [+|-]LogicalExtentsNumber |\n" - "\t [-L|--size] [+|-]LogicalVolumeSize[bBsSkKmMgGtTpPeE]}\n" - "\t[-t|--test]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\tLogicalVolumePath\n", - - extents_ARG, size_ARG, nofsck_ARG, test_ARG) -*********/ - xx(config, "Display and manipulate configuration information", - PERMITTED_READ_ONLY | NO_METADATA_PROCESSING, - "config\n" - "\t[-f|--file filename]\n" - "\t[--type {current|default|diff|full|list|missing|new|profilable|profilable-command|profilable-metadata}]\n" - "\t[--atversion version]\n" - "\t[--ignoreadvanced]\n" - "\t[--ignoreunsupported]\n" - "\t[--ignorelocal]\n" - "\t[-l|--list]\n" - "\t[--config ConfigurationString]\n" - "\t[--commandprofile ProfileName]\n" - "\t[--profile ProfileName]\n" - "\t[--metadataprofile ProfileName]\n" - "\t[--mergedconfig]\n" - "\t[--sinceversion version]\n" - "\t[--showdeprecated]\n" - "\t[--showunsupported]\n" - "\t[--validate]\n" - "\t[--withsummary]\n" - "\t[--withcomments]\n" - "\t[--withspaces]\n" - "\t[--unconfigured]\n" - "\t[--withversions]\n" - "\t[ConfigurationNode...]\n", - atversion_ARG, configtype_ARG, file_ARG, ignoreadvanced_ARG, - ignoreunsupported_ARG, ignorelocal_ARG, list_ARG, mergedconfig_ARG, metadataprofile_ARG, - sinceversion_ARG, showdeprecated_ARG, showunsupported_ARG, validate_ARG, withsummary_ARG, - withcomments_ARG, withspaces_ARG, unconfigured_ARG, withversions_ARG) + PERMITTED_READ_ONLY | NO_METADATA_PROCESSING) xx(devtypes, "Display recognised built-in block device types", - PERMITTED_READ_ONLY | NO_METADATA_PROCESSING, - "devtypes\n" - "\t[--aligned]\n" - "\t[--binary]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-h|--help]\n" - "\t[--nameprefixes]\n" - "\t[--noheadings]\n" - "\t[--nosuffix]\n" - "\t[-o|--options [+|-|#]Field[,Field]]\n" - "\t[-O|--sort [+|-]key1[,[+|-]key2[,...]]]\n" - "\t[--reportformat {basic|json}]\n" - "\t[--rows]\n" - "\t[-S|--select Selection]\n" - "\t[--separator Separator]\n" - "\t[--unbuffered]\n" - "\t[--unquoted]\n" - "\t[--version]\n", - - aligned_ARG, binary_ARG, nameprefixes_ARG, noheadings_ARG, - nosuffix_ARG, options_ARG, reportformat_ARG, rows_ARG, - select_ARG, separator_ARG, sort_ARG, unbuffered_ARG, unquoted_ARG) + PERMITTED_READ_ONLY | NO_METADATA_PROCESSING) xx(dumpconfig, "Display and manipulate configuration information", - PERMITTED_READ_ONLY | NO_METADATA_PROCESSING, - "dumpconfig\n" - "\t[-f|--file filename]\n" - "\t[--type {current|default|diff|full|list|missing|new|profilable|profilable-command|profilable-metadata}]\n" - "\t[--atversion version]\n" - "\t[--ignoreadvanced]\n" - "\t[--ignoreunsupported]\n" - "\t[--ignorelocal]\n" - "\t[-l|--list]\n" - "\t[--config ConfigurationString]\n" - "\t[--commandprofile ProfileName]\n" - "\t[--profile ProfileName]\n" - "\t[--metadataprofile ProfileName]\n" - "\t[--mergedconfig]\n" - "\t[--sinceversion version]\n" - "\t[--showdeprecated]\n" - "\t[--showunsupported]\n" - "\t[--validate]\n" - "\t[--withsummary]\n" - "\t[--withcomments]\n" - "\t[--withspaces]\n" - "\t[--unconfigured]\n" - "\t[--withversions]\n" - "\t[ConfigurationNode...]\n", - atversion_ARG, configtype_ARG, file_ARG, ignoreadvanced_ARG, - ignoreunsupported_ARG, ignorelocal_ARG, list_ARG, mergedconfig_ARG, metadataprofile_ARG, - sinceversion_ARG, showdeprecated_ARG, showunsupported_ARG, validate_ARG, withsummary_ARG, - withcomments_ARG, withspaces_ARG, unconfigured_ARG, withversions_ARG) + PERMITTED_READ_ONLY | NO_METADATA_PROCESSING) xx(formats, "List available metadata formats", - PERMITTED_READ_ONLY | NO_METADATA_PROCESSING, - "formats\n") + PERMITTED_READ_ONLY | NO_METADATA_PROCESSING) xx(help, "Display help for commands", - PERMITTED_READ_ONLY | NO_METADATA_PROCESSING, - "help <command>\n") - -/********* -xx(lvactivate, - "Activate logical volume on given partition(s)", - "lvactivate " - "\t[-d|--debug]\n" - "\t[-h|--help]\n" - "\t[-v|--verbose]\n" - "Logical Volume(s)\n") -***********/ + PERMITTED_READ_ONLY | NO_METADATA_PROCESSING) xx(fullreport, "Display full report", - PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH, - "fullreport\n" - "\t[--aligned]\n" - "\t[--binary]\n" - "\t[-a|--all]\n" - "\t[--commandprofile ProfileName]\n" - "\t[--configreport ReportName]\n" - "\t[-d|--debug]\n" - "\t[--foreign]\n" - "\t[-h|--help]\n" - "\t[--ignorelockingfailure]\n" - "\t[--ignoreskippedcluster]\n" - "\t[--logonly]\n" - "\t[--nameprefixes]\n" - "\t[--noheadings]\n" - "\t[--nosuffix]\n" - "\t[-o|--options [+|-|#]Field[,Field]]\n" - "\t[-O|--sort [+|-]key1[,[+|-]key2[,...]]]\n" - "\t[-P|--partial]\n" - "\t[--readonly]\n" - "\t[--reportformat {basic|json}]\n" - "\t[--rows]\n" - "\t[-S|--select Selection]\n" - "\t[--separator Separator]\n" - "\t[--trustcache]\n" - "\t[--unbuffered]\n" - "\t[--units hHbBsSkKmMgGtTpPeE]\n" - "\t[--unquoted]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\t[VolumeGroupName [VolumeGroupName...]]\n", - - aligned_ARG, all_ARG, binary_ARG, configreport_ARG, foreign_ARG, - ignorelockingfailure_ARG, ignoreskippedcluster_ARG, logonly_ARG, - nameprefixes_ARG, noheadings_ARG, nolocking_ARG, nosuffix_ARG, - options_ARG, partial_ARG, readonly_ARG, reportformat_ARG, rows_ARG, - select_ARG, separator_ARG, shared_ARG, sort_ARG, trustcache_ARG, - unbuffered_ARG, units_ARG, unquoted_ARG) + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH) xx(lastlog, "Display last command's log report", - PERMITTED_READ_ONLY | NO_METADATA_PROCESSING, - "log\n" - "\t[--reportformat {basic|json}]\n" - "\t[-S|--select Selection]\n", - - reportformat_ARG, select_ARG) + PERMITTED_READ_ONLY | NO_METADATA_PROCESSING) xx(lvchange, "Change the attributes of logical volume(s)", - CACHE_VGMETADATA | PERMITTED_READ_ONLY, - "lvchange\n" - "\t[-A|--autobackup {y|n}]\n" - "\t[-a|--activate [a][e|s|l]{y|n}]\n" - "\t[--activationmode {complete|degraded|partial}" - "\t[--addtag <Tag>]\n" - "\t[--alloc <AllocationPolicy>]\n" - "\t[--rebuild PhysicalVolume]\n" - "\t[-C|--contiguous {y|n}]\n" - "\t[--cachemode <CacheMode>]\n" - "\t[--cachepolicy <policyname>] [--cachesettings <parameter=value>]\n" - "\t[--commandprofile <ProfileName>]\n" - "\t[-d|--debug]\n" - "\t[--deltag <Tag>]\n" - "\t[--detachprofile]\n" - "\t[--errorwhenfull {y|n}]\n" - "\t[-f|--force]\n" - "\t[-h|--help]\n" - "\t[--discards {ignore|nopassdown|passdown}]\n" - "\t[--ignorelockingfailure]\n" - "\t[--ignoremonitoring]\n" - "\t[--ignoreskippedcluster]\n" - "\t[-k|--setactivationskip {y|n}]\n" - "\t[-K|--ignoreactivationskip]\n" - "\t[--monitor {y|n}]\n" - "\t[--poll {y|n}]\n" - "\t[--noudevsync]\n" - "\t[-M|--persistent {y|n}] [-j|--major <major>] [--minor <minor>]\n" - "\t[--metadataprofile <ProfileName>]\n" - "\t[-P|--partial]\n" - "\t[-p|--permission {r|rw}]\n" - "\t[--[raid]minrecoveryrate <Rate>]\n" - "\t[--[raid]maxrecoveryrate <Rate>]\n" - "\t[--[raid]syncaction {check|repair}\n" - "\t[--[raid]writebehind <IOCount>]\n" - "\t[--[raid]writemostly <PhysicalVolume>[:{t|n|y}]]\n" - "\t[-r|--readahead <ReadAheadSectors>|auto|none]\n" - "\t[--refresh]\n" - "\t[--reportformat {basic|json}]\n" - "\t[--resync]\n" - "\t[-S|--select Selection]\n" - "\t[--sysinit]\n" - "\t[-t|--test]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\t[-y|--yes]\n" - "\t[-Z|--zero {y|n}]\n" - "\t<LogicalVolume[Path]> [<LogicalVolume[Path]>...]\n", - - activationmode_ARG, addtag_ARG, alloc_ARG, autobackup_ARG, activate_ARG, - available_ARG, cachemode_ARG, cachepolicy_ARG, cachesettings_ARG, - contiguous_ARG, deltag_ARG, - discards_ARG, detachprofile_ARG, errorwhenfull_ARG, force_ARG, - ignorelockingfailure_ARG, ignoremonitoring_ARG, ignoreactivationskip_ARG, - ignoreskippedcluster_ARG, major_ARG, metadataprofile_ARG, minor_ARG, - monitor_ARG, minrecoveryrate_ARG, maxrecoveryrate_ARG, noudevsync_ARG, - partial_ARG, permission_ARG, persistent_ARG, poll_ARG, - raidrebuild_ARG, raidminrecoveryrate_ARG, raidmaxrecoveryrate_ARG, - raidsyncaction_ARG, raidwritebehind_ARG, raidwritemostly_ARG, readahead_ARG, - reportformat_ARG, rebuild_ARG, resync_ARG, refresh_ARG, select_ARG, setactivationskip_ARG, - syncaction_ARG, sysinit_ARG, test_ARG, writebehind_ARG, writemostly_ARG, zero_ARG) - -#define COMMON_OPTS \ - "\t[--commandprofile <ProfileName>] [-d|--debug] [-h|-?|--help]\n" \ - "\t[--noudevsync] [-t|--test] [-v|--verbose] [--version] [-y|--yes]\n" + CACHE_VGMETADATA | PERMITTED_READ_ONLY) xx(lvconvert, "Change logical volume layout", - 0, - "lvconvert " - "[-m|--mirrors <Mirrors> [--mirrorlog {disk|core|mirrored}|--corelog]]\n" - "\t[--type <SegmentType>]\n" - "\t[--rebuild PhysicalVolume]\n" - "\t[--repair [--use-policies]]\n" - "\t[--replace PhysicalVolume]\n" - "\t[-R|--regionsize <MirrorLogRegionSize>]\n" - "\t[--alloc <AllocationPolicy>]\n" - "\t[-b|--background]\n" - "\t[-f|--force]\n" - "\t[-i|--interval <Seconds>]\n" - "\t[--stripes <Stripes> [-I|--stripesize <StripeSize>]]\n" - COMMON_OPTS - "\tLogicalVolume[Path] [PhysicalVolume[Path]...]\n\n" - - "lvconvert " - "[--splitmirrors <Images> --trackchanges]\n" - "\t[--splitmirrors Images --name SplitLogicalVolumeName]\n" - COMMON_OPTS - "\tLogicalVolume[Path] [SplittablePhysicalVolume[Path]...]\n\n" - - "lvconvert " - "--splitsnapshot\n" - COMMON_OPTS - "\tSnapshotLogicalVolume[Path]\n\n" - - "lvconvert " - "--splitcache\n" - COMMON_OPTS - "\tCacheLogicalVolume[Path]\n\n" - - "lvconvert " - "--split\n" - "\t[--name SplitLogicalVolumeName]\n" - COMMON_OPTS - "\tSplitableLogicalVolume[Path]\n\n" - - "lvconvert " - "--uncache\n" - COMMON_OPTS - "\tCacheLogicalVolume[Path]\n\n" - - "lvconvert " - "[--type snapshot|-s|--snapshot]\n" - "\t[-c|--chunksize <ChunkSize>]\n" - "\t[-Z|--zero {y|n}]\n" - COMMON_OPTS - "\tOriginalLogicalVolume[Path] SnapshotLogicalVolume[Path]\n\n" - - "lvconvert " - "--merge\n" - "\t[-b|--background]\n" - "\t[-i|--interval <Seconds>]\n" - COMMON_OPTS - "\tLogicalVolume[Path]\n\n" - - "lvconvert " - "[--type thin[-pool]|-T|--thin]\n" - "\t[--thinpool ThinPoolLogicalVolume[Path]]\n" - "\t[--chunksize <ChunkSize>]\n" - "\t[--discards {ignore|nopassdown|passdown}]\n" - "\t[--poolmetadataspare {y|n}]\n" - "\t[--poolmetadata ThinMetadataLogicalVolume[Path] |\n" - "\t --poolmetadatasize <MetadataSize>]\n" - "\t[-r|--readahead <ReadAheadSectors>|auto|none]\n" - "\t[--stripes <Stripes> [-I|--stripesize <StripeSize>]]]\n" - "\t[--originname NewExternalOriginVolumeName]]\n" - "\t[-Z|--zero {y|n}]\n" - COMMON_OPTS - "\t[ExternalOrigin|ThinDataPool]LogicalVolume[Path] [PhysicalVolumePath...]\n\n" - - "lvconvert " - "[--type cache[-pool]|-H|--cache]\n" - "\t[--cachepool CacheDataLogicalVolume[Path]]\n" - "\t[--cachemode <CacheMode>]\n" - "\t[--cachepolicy <CachePolicy>]\n" - "\t[--cachesettings <Key>=<Value>]\n" - "\t[--chunksize <ChunkSize>]\n" - "\t[--poolmetadata CacheMetadataLogicalVolume[Path] |\n" - "\t --poolmetadatasize <MetadataSize>]\n" - "\t[--poolmetadataspare {y|n}]]\n" - COMMON_OPTS - "\t[Cache|CacheDataPool]LogicalVolume[Path] [PhysicalVolumePath...]\n\n", - - alloc_ARG, background_ARG, cache_ARG, cachemode_ARG, - cachepool_ARG, cachepolicy_ARG, cachesettings_ARG, chunksize_ARG, - corelog_ARG, discards_ARG, force_ARG, interval_ARG, merge_ARG, mirrorlog_ARG, - mirrors_ARG, name_ARG, noudevsync_ARG, originname_ARG, poolmetadata_ARG, - poolmetadatasize_ARG, poolmetadataspare_ARG, readahead_ARG, regionsize_ARG, - repair_ARG, replace_ARG, snapshot_ARG, - split_ARG, splitcache_ARG, splitmirrors_ARG, splitsnapshot_ARG, - stripes_long_ARG, stripesize_ARG, test_ARG, thin_ARG, thinpool_ARG, - trackchanges_ARG, type_ARG, uncache_ARG, usepolicies_ARG, zero_ARG) + 0) xx(lvcreate, "Create a logical volume", - 0, - "lvcreate\n" - "\t[-A|--autobackup {y|n}]\n" - "\t[-a|--activate [a|e|l]{y|n}]\n" - "\t[--addtag Tag]\n" - "\t[--alloc AllocationPolicy]\n" - "\t[-H|--cache\n" - "\t [--cachemode {writeback|writethrough}]\n" - "\t [--cachepolicy policy]\n" - "\t [--cachesettings key=value]\n" - "\t[--cachepool CachePoolLogicalVolume{Name|Path}]\n" - "\t[-c|--chunksize ChunkSize]\n" - "\t[-C|--contiguous {y|n}]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-h|-?|--help]\n" - "\t[--errorwhenfull {y|n}]\n" - "\t[--ignoremonitoring]\n" - "\t[--monitor {y|n}]\n" - "\t[-i|--stripes Stripes [-I|--stripesize StripeSize]]\n" - "\t[-k|--setactivationskip {y|n}]\n" - "\t[-K|--ignoreactivationskip]\n" - "\t{-l|--extents LogicalExtentsNumber[%{VG|PVS|FREE}] |\n" - "\t -L|--size LogicalVolumeSize[bBsSkKmMgGtTpPeE]}\n" - "\t[-M|--persistent {y|n}] [-j|--major major] [--minor minor]\n" - "\t[--metadataprofile ProfileName]\n" - "\t[-m|--mirrors Mirrors [--nosync]\n" - "\t [{--mirrorlog {disk|core|mirrored}|--corelog}]]\n" - "\t[-n|--name LogicalVolumeName]\n" - "\t[--noudevsync]\n" - "\t[-p|--permission {r|rw}]\n" - //"\t[--pooldatasize DataSize[bBsSkKmMgGtTpPeE]]\n" - "\t[--poolmetadatasize MetadataSize[bBsSkKmMgG]]\n" - "\t[--poolmetadataspare {y|n}]]\n" - "\t[--[raid]minrecoveryrate Rate]\n" - "\t[--[raid]maxrecoveryrate Rate]\n" - "\t[-r|--readahead {ReadAheadSectors|auto|none}]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-R|--regionsize MirrorLogRegionSize]\n" - "\t[-T|--thin\n" - "\t [--discards {ignore|nopassdown|passdown}]\n" - "\t[--thinpool ThinPoolLogicalVolume{Name|Path}]\n" - "\t[-t|--test]\n" - "\t[--type VolumeType]\n" - "\t[-v|--verbose]\n" - "\t[-W|--wipesignatures {y|n}]\n" - "\t[-Z|--zero {y|n}]\n" - "\t[--version]\n" - "\tVolumeGroupName [PhysicalVolumePath...]\n\n" - - "lvcreate\n" - "\t{ {-s|--snapshot} OriginalLogicalVolume[Path] |\n" - "\t [-s|--snapshot] VolumeGroupName[Path] -V|--virtualsize VirtualSize}\n" - "\t {-H|--cache} VolumeGroupName[Path][/OriginalLogicalVolume]\n" - "\t {-T|--thin} VolumeGroupName[Path][/PoolLogicalVolume]\n" - "\t -V|--virtualsize VirtualSize}\n" - "\t[-A|--autobackup {y|n}]\n" - "\t[--addtag Tag]\n" - "\t[--alloc AllocationPolicy]\n" - "\t[--cachepolicy Policy] [--cachesettings Key=Value]\n" - "\t[-c|--chunksize]\n" - "\t[-C|--contiguous {y|n}]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[--discards {ignore|nopassdown|passdown}]\n" - "\t[-h|-?|--help]\n" - "\t[--ignoremonitoring]\n" - "\t[--monitor {y|n}]\n" - "\t[-i|--stripes Stripes [-I|--stripesize StripeSize]]\n" - "\t[-k|--setactivationskip {y|n}]\n" - "\t[-K|--ignoreactivationskip]\n" - "\t{-l|--extents LogicalExtentsNumber[%{VG|FREE|ORIGIN}] |\n" - "\t -L|--size LogicalVolumeSize[bBsSkKmMgGtTpPeE]}\n" - //"\t[--pooldatasize DataVolumeSize[bBsSkKmMgGtTpPeE]]\n" - "\t[--poolmetadatasize MetadataVolumeSize[bBsSkKmMgG]]\n" - "\t[-M|--persistent {y|n}] [-j|--major major] [--minor minor]\n" - "\t[--metadataprofile ProfileName]\n" - "\t[-n|--name LogicalVolumeName]\n" - "\t[--noudevsync]\n" - "\t[-p|--permission {r|rw}]\n" - "\t[-r|--readahead ReadAheadSectors|auto|none]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-t|--test]\n" - "\t[{--thinpool ThinPoolLogicalVolume[Path] |\n" - "\t --cachepool CachePoolLogicalVolume[Path]}]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\t[PhysicalVolumePath...]\n\n", - - addtag_ARG, alloc_ARG, autobackup_ARG, activate_ARG, available_ARG, - cache_ARG, cachemode_ARG, cachepool_ARG, cachepolicy_ARG, cachesettings_ARG, - chunksize_ARG, contiguous_ARG, corelog_ARG, discards_ARG, errorwhenfull_ARG, - extents_ARG, ignoreactivationskip_ARG, ignoremonitoring_ARG, major_ARG, - metadataprofile_ARG, minor_ARG, mirrorlog_ARG, mirrors_ARG, monitor_ARG, - minrecoveryrate_ARG, maxrecoveryrate_ARG, name_ARG, nosync_ARG, - noudevsync_ARG, permission_ARG, persistent_ARG, - //pooldatasize_ARG, - poolmetadatasize_ARG, poolmetadataspare_ARG, - raidminrecoveryrate_ARG, raidmaxrecoveryrate_ARG, - readahead_ARG, regionsize_ARG, reportformat_ARG, setactivationskip_ARG, - size_ARG, snapshot_ARG, stripes_ARG, stripesize_ARG, test_ARG, thin_ARG, - thinpool_ARG, type_ARG, virtualoriginsize_ARG, virtualsize_ARG, - wipesignatures_ARG, zero_ARG) + 0) xx(lvdisplay, "Display information about a logical volume", - PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH, - "lvdisplay\n" - "\t[-a|--all]\n" - "\t[-c|--colon]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[--foreign]\n" - "\t[-h|--help]\n" - "\t[-H|--history]\n" - "\t[--ignorelockingfailure]\n" - "\t[--ignoreskippedcluster]\n" - "\t[-m|--maps]\n" - "\t[--nosuffix]\n" - "\t[-P|--partial]\n" - "\t[--readonly]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-S|--select Selection]\n" - "\t[--units hHbBsSkKmMgGtTpPeE]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\t[LogicalVolume[Path] [LogicalVolume[Path]...]]\n" - "\n" - "lvdisplay --columns|-C\n" - "\t[--aligned]\n" - "\t[-a|--all]\n" - "\t[--binary]\n" - "\t[--commandprofile ProfileName]\n" - "\t[--configreport ReportName]\n" - "\t[-d|--debug]\n" - "\t[--foreign]\n" - "\t[-h|--help]\n" - "\t[-H|--history]\n" - "\t[--ignorelockingfailure]\n" - "\t[--ignoreskippedcluster]\n" - "\t[--logonly]\n" - "\t[--noheadings]\n" - "\t[--nosuffix]\n" - "\t[-o|--options [+|-|#]Field[,Field]]\n" - "\t[-O|--sort [+|-]key1[,[+|-]key2[,...]]]\n" - "\t[-S|--select Selection]\n" - "\t[-P|--partial]\n" - "\t[--readonly]\n" - "\t[--reportformat {basic|json}]\n" - "\t[--segments]\n" - "\t[--separator Separator]\n" - "\t[--unbuffered]\n" - "\t[--units hHbBsSkKmMgGtTpPeE]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\t[LogicalVolume[Path] [LogicalVolume[Path]...]]\n", - - aligned_ARG, all_ARG, binary_ARG, colon_ARG, columns_ARG, - configreport_ARG, foreign_ARG, history_ARG, ignorelockingfailure_ARG, - ignoreskippedcluster_ARG, logonly_ARG, maps_ARG, noheadings_ARG, - nosuffix_ARG, options_ARG, sort_ARG, partial_ARG, readonly_ARG, - reportformat_ARG, segments_ARG, select_ARG, separator_ARG, - shared_ARG, unbuffered_ARG, units_ARG) + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH) xx(lvextend, "Add space to a logical volume", - 0, - "lvextend\n" - "\t[-A|--autobackup y|n]\n" - "\t[--alloc AllocationPolicy]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-f|--force]\n" - "\t[-h|--help]\n" - "\t[-i|--stripes Stripes [-I|--stripesize StripeSize]]\n" - "\t{-l|--extents [+]LogicalExtentsNumber[%{VG|LV|PVS|FREE|ORIGIN}] |\n" - "\t -L|--size [+]LogicalVolumeSize[bBsSkKmMgGtTpPeE]}\n" - "\t --poolmetadatasize [+]MetadataVolumeSize[bBsSkKmMgG]}\n" - "\t[-m|--mirrors Mirrors]\n" - "\t[--nosync]\n" - "\t[--use-policies]\n" - "\t[-n|--nofsck]\n" - "\t[--noudevsync]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-r|--resizefs]\n" - "\t[-t|--test]\n" - "\t[--type VolumeType]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\tLogicalVolume[Path] [ PhysicalVolumePath... ]\n", - - alloc_ARG, autobackup_ARG, extents_ARG, force_ARG, mirrors_ARG, - nofsck_ARG, nosync_ARG, noudevsync_ARG, poolmetadatasize_ARG, - reportformat_ARG, resizefs_ARG, size_ARG, stripes_ARG, stripesize_ARG, - test_ARG, type_ARG, usepolicies_ARG) + 0) xx(lvmchange, "With the device mapper, this is obsolete and does nothing.", - 0, - "lvmchange\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-h|--help]\n" - "\t[-R|--reset]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n", - - reset_ARG) + 0) xx(lvmconfig, "Display and manipulate configuration information", - PERMITTED_READ_ONLY | NO_METADATA_PROCESSING, - "lvmconfig\n" - "\t[-f|--file filename]\n" - "\t[--type {current|default|diff|full|list|missing|new|profilable|profilable-command|profilable-metadata}]\n" - "\t[--atversion version]\n" - "\t[--ignoreadvanced]\n" - "\t[--ignoreunsupported]\n" - "\t[--ignorelocal]\n" - "\t[-l|--list]\n" - "\t[--config ConfigurationString]\n" - "\t[--commandprofile ProfileName]\n" - "\t[--profile ProfileName]\n" - "\t[--metadataprofile ProfileName]\n" - "\t[--mergedconfig]\n" - "\t[--sinceversion version]\n" - "\t[--showdeprecated]\n" - "\t[--showunsupported]\n" - "\t[--validate]\n" - "\t[--withsummary]\n" - "\t[--withcomments]\n" - "\t[--withspaces]\n" - "\t[--unconfigured]\n" - "\t[--withversions]\n" - "\t[ConfigurationNode...]\n", - atversion_ARG, configtype_ARG, file_ARG, ignoreadvanced_ARG, - ignoreunsupported_ARG, ignorelocal_ARG, list_ARG, mergedconfig_ARG, metadataprofile_ARG, - sinceversion_ARG, showdeprecated_ARG, showunsupported_ARG, validate_ARG, withsummary_ARG, - withcomments_ARG, withspaces_ARG, unconfigured_ARG, withversions_ARG) + PERMITTED_READ_ONLY | NO_METADATA_PROCESSING) xx(lvmdiskscan, "List devices that may be used as physical volumes", - PERMITTED_READ_ONLY | ENABLE_ALL_DEVS, - "lvmdiskscan\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-h|--help]\n" - "\t[-l|--lvmpartition]\n" - "\t[--readonly]\n" - "\t[--version]\n", - - lvmpartition_ARG, readonly_ARG) + PERMITTED_READ_ONLY | ENABLE_ALL_DEVS) xx(lvmsadc, "Collect activity data", - 0, - "lvmsadc\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-h|--help]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\t[LogFilePath]\n") + 0) xx(lvmsar, "Create activity report", - 0, - "lvmsar\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-f|--full]\n" - "\t[-h|--help]\n" - "\t[-s|--stdin]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\tLogFilePath\n", - - full_ARG, stdin_ARG) + 0) xx(lvreduce, "Reduce the size of a logical volume", - 0, - "lvreduce\n" - "\t[-A|--autobackup y|n]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-f|--force]\n" - "\t[-h|--help]\n" - "\t{-l|--extents [-]LogicalExtentsNumber[%{VG|LV|FREE|ORIGIN}] |\n" - "\t -L|--size [-]LogicalVolumeSize[bBsSkKmMgGtTpPeE]}\n" - "\t[-n|--nofsck]\n" - "\t[--noudevsync]\n" - "\t[-r|--resizefs]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-t|--test]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\t[-y|--yes]\n" - "\tLogicalVolume[Path]\n", - - autobackup_ARG, force_ARG, extents_ARG, nofsck_ARG, noudevsync_ARG, - reportformat_ARG, resizefs_ARG, size_ARG, test_ARG) + 0) xx(lvremove, "Remove logical volume(s) from the system", - ALL_VGS_IS_DEFAULT, /* all VGs only with --select */ - "lvremove\n" - "\t[-A|--autobackup y|n]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-f|--force]\n" - "\t[-h|--help]\n" - "\t[--nohistory]\n" - "\t[--noudevsync]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-S|--select Selection]\n" - "\t[-t|--test]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\tLogicalVolume[Path] [LogicalVolume[Path]...]\n", - - autobackup_ARG, force_ARG, nohistory_ARG, noudevsync_ARG, - reportformat_ARG, select_ARG, test_ARG) + ALL_VGS_IS_DEFAULT) /* all VGs only with --select */ xx(lvrename, "Rename a logical volume", - 0, - "lvrename\n" - "\t[-A|--autobackup {y|n}]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-h|-?|--help]\n" - "\t[--noudevsync]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-t|--test]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\t{ OldLogicalVolumePath NewLogicalVolumePath |\n" - "\t VolumeGroupName OldLogicalVolumeName NewLogicalVolumeName }\n", - - autobackup_ARG, noudevsync_ARG, reportformat_ARG, test_ARG) + 0) xx(lvresize, "Resize a logical volume", - 0, - "lvresize\n" - "\t[-A|--autobackup y|n]\n" - "\t[--alloc AllocationPolicy]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-f|--force]\n" - "\t[-h|--help]\n" - "\t[-i|--stripes Stripes [-I|--stripesize StripeSize]]\n" - "\t{-l|--extents [+|-]LogicalExtentsNumber[%{VG|LV|PVS|FREE|ORIGIN}] |\n" - "\t -L|--size [+|-]LogicalVolumeSize[bBsSkKmMgGtTpPeE]}\n" - "\t --poolmetadatasize [+]MetadataVolumeSize[bBsSkKmMgG]}\n" - "\t[-n|--nofsck]\n" - "\t[--noudevsync]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-r|--resizefs]\n" - "\t[-t|--test]\n" - "\t[--type VolumeType]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\tLogicalVolume[Path] [ PhysicalVolumePath... ]\n", - - alloc_ARG, autobackup_ARG, extents_ARG, force_ARG, nofsck_ARG, - noudevsync_ARG, reportformat_ARG, resizefs_ARG, - poolmetadatasize_ARG, size_ARG, stripes_ARG, stripesize_ARG, - test_ARG, type_ARG) + 0) xx(lvs, "Display information about logical volumes", - PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH, - "lvs\n" - "\t[-a|--all]\n" - "\t[--aligned]\n" - "\t[--binary]\n" - "\t[--commandprofile ProfileName]\n" - "\t[--configreport ReportName]\n" - "\t[-d|--debug]\n" - "\t[--foreign]\n" - "\t[-h|--help]\n" - "\t[-H|--history]\n" - "\t[--ignorelockingfailure]\n" - "\t[--ignoreskippedcluster]\n" - "\t[--logonly]\n" - "\t[--nameprefixes]\n" - "\t[--noheadings]\n" - "\t[--nosuffix]\n" - "\t[-o|--options [+|-|#]Field[,Field]]\n" - "\t[-O|--sort [+|-]key1[,[+|-]key2[,...]]]\n" - "\t[-P|--partial]\n" - "\t[--readonly]\n" - "\t[--reportformat {basic|json}]\n" - "\t[--rows]\n" - "\t[--segments]\n" - "\t[-S|--select Selection]\n" - "\t[--separator Separator]\n" - "\t[--trustcache]\n" - "\t[--unbuffered]\n" - "\t[--units hHbBsSkKmMgGtTpPeE]\n" - "\t[--unquoted]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\t[LogicalVolume[Path] [LogicalVolume[Path]...]]\n", - - aligned_ARG, all_ARG, binary_ARG, configreport_ARG, foreign_ARG, history_ARG, - ignorelockingfailure_ARG, ignoreskippedcluster_ARG, logonly_ARG, - nameprefixes_ARG, noheadings_ARG, nolocking_ARG, nosuffix_ARG, - options_ARG, partial_ARG, readonly_ARG, reportformat_ARG, rows_ARG, - segments_ARG, select_ARG, separator_ARG, shared_ARG, sort_ARG, - trustcache_ARG, unbuffered_ARG, units_ARG, unquoted_ARG) + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH) xx(lvscan, "List all logical volumes in all volume groups", - PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH | NO_LVMETAD_AUTOSCAN, - "lvscan\n" - "\t[-a|--all]\n" - "\t[-b|--blockdevice]\n" - "\t[--cache]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-h|-?|--help]\n" - "\t[--ignorelockingfailure]\n" - "\t[-P|--partial]\n" - "\t[--readonly]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n", - - all_ARG, blockdevice_ARG, ignorelockingfailure_ARG, partial_ARG, - readonly_ARG, reportformat_ARG, cache_long_ARG) + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH | NO_LVMETAD_AUTOSCAN) xx(pvchange, "Change attributes of physical volume(s)", - 0, - "pvchange\n" - "\t[-a|--all]\n" - "\t[-A|--autobackup y|n]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-f|--force]\n" - "\t[-h|--help]\n" - "\t[--ignoreskippedcluster]\n" - "\t[--metadataignore y|n]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-S|--select Selection]\n" - "\t[-t|--test]\n" - "\t[-u|--uuid]\n" - "\t[-x|--allocatable y|n]\n" - "\t[-v|--verbose]\n" - "\t[--addtag Tag]\n" - "\t[--deltag Tag]\n" - "\t[--version]\n" - "\t[PhysicalVolumePath...]\n", - - all_ARG, allocatable_ARG, allocation_ARG, autobackup_ARG, deltag_ARG, - addtag_ARG, force_ARG, ignoreskippedcluster_ARG, metadataignore_ARG, - reportformat_ARG, select_ARG, test_ARG, uuid_ARG) + 0) xx(pvresize, "Resize physical volume(s)", - 0, - "pvresize\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-h|-?|--help]\n" - "\t[--reportformat {basic|json}]\n" - "\t[--setphysicalvolumesize PhysicalVolumeSize[bBsSkKmMgGtTpPeE]\n" - "\t[-t|--test]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\tPhysicalVolume [PhysicalVolume...]\n", - - physicalvolumesize_ARG, reportformat_ARG, test_ARG) + 0) xx(pvck, "Check the consistency of physical volume(s)", - LOCKD_VG_SH, - "pvck " - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-h|--help]\n" - "\t[--labelsector sector]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\tPhysicalVolume [PhysicalVolume...]\n", - - labelsector_ARG) + LOCKD_VG_SH) xx(pvcreate, "Initialize physical volume(s) for use by LVM", - ENABLE_ALL_DEVS, - "pvcreate\n" - "\t[--norestorefile]\n" - "\t[--restorefile file]\n" - "\t[--reportformat {basic|json}]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-f[f]|--force [--force]]\n" - "\t[-h|-?|--help]\n" - "\t[--labelsector sector]\n" - "\t[-M|--metadatatype 1|2]\n" - "\t[--pvmetadatacopies #copies]\n" - "\t[--bootloaderareasize BootLoaderAreaSize[bBsSkKmMgGtTpPeE]]\n" - "\t[--metadatasize MetadataSize[bBsSkKmMgGtTpPeE]]\n" - "\t[--dataalignment Alignment[bBsSkKmMgGtTpPeE]]\n" - "\t[--dataalignmentoffset AlignmentOffset[bBsSkKmMgGtTpPeE]]\n" - "\t[--setphysicalvolumesize PhysicalVolumeSize[bBsSkKmMgGtTpPeE]\n" - "\t[-t|--test]\n" - "\t[-u|--uuid uuid]\n" - "\t[-v|--verbose]\n" - "\t[-y|--yes]\n" - "\t[-Z|--zero {y|n}]\n" - "\t[--version]\n" - "\tPhysicalVolume [PhysicalVolume...]\n", - - dataalignment_ARG, dataalignmentoffset_ARG, bootloaderareasize_ARG, - force_ARG, test_ARG, labelsector_ARG, metadatatype_ARG, - metadatacopies_ARG, metadatasize_ARG, metadataignore_ARG, - norestorefile_ARG, physicalvolumesize_ARG, pvmetadatacopies_ARG, - reportformat_ARG, restorefile_ARG, uuidstr_ARG, zero_ARG) + ENABLE_ALL_DEVS) xx(pvdata, "Display the on-disk metadata for physical volume(s)", - 0, - "pvdata\n" - "\t[-a|--all]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-E|--physicalextent]\n" - "\t[-h|-?|--help]\n" - "\t[-L|--logicalvolume]\n" - "\t[-P[P]|--physicalvolume [--physicalvolume]]\n" - "\t[-U|--uuidlist]\n" - "\t[-v[v]|--verbose [--verbose]]\n" - "\t[-V|--volumegroup]\n" - "\t[--version]\n" - "\tPhysicalVolume [PhysicalVolume...]\n", - - all_ARG, logicalextent_ARG, physicalextent_ARG, - physicalvolume_ARG, uuidlist_ARG, volumegroup_ARG) + 0) xx(pvdisplay, "Display various attributes of physical volume(s)", - CACHE_VGMETADATA | PERMITTED_READ_ONLY | ENABLE_ALL_DEVS | ENABLE_DUPLICATE_DEVS | LOCKD_VG_SH, - "pvdisplay\n" - "\t[-c|--colon]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[--foreign]\n" - "\t[-h|--help]\n" - "\t[--ignorelockingfailure]\n" - "\t[--ignoreskippedcluster]\n" - "\t[-m|--maps]\n" - "\t[--nosuffix]\n" - "\t[--readonly]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-S|--select Selection]\n" - "\t[-s|--short]\n" - "\t[--units hHbBsSkKmMgGtTpPeE]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\t[PhysicalVolumePath [PhysicalVolumePath...]]\n" - "\n" - "pvdisplay --columns|-C\n" - "\t[--aligned]\n" - "\t[-a|--all]\n" - "\t[--binary]\n" - "\t[--commandprofile ProfileName]\n" - "\t[--configreport ReportName]\n" - "\t[-d|--debug]\n" - "\t[--foreign]\n" - "\t[-h|--help]\n" - "\t[--ignorelockingfailure]\n" - "\t[--ignoreskippedcluster]\n" - "\t[--logonly]\n" - "\t[--noheadings]\n" - "\t[--nosuffix]\n" - "\t[-o|--options [+|-|#]Field[,Field]]\n" - "\t[-O|--sort [+|-]key1[,[+|-]key2[,...]]]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-S|--select Selection]\n" - "\t[--readonly]\n" - "\t[--separator Separator]\n" - "\t[--unbuffered]\n" - "\t[--units hHbBsSkKmMgGtTpPeE]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\t[PhysicalVolumePath [PhysicalVolumePath...]]\n", - - aligned_ARG, all_ARG, binary_ARG, colon_ARG, columns_ARG, configreport_ARG, - foreign_ARG, ignorelockingfailure_ARG, ignoreskippedcluster_ARG, - logonly_ARG, maps_ARG, noheadings_ARG, nosuffix_ARG, options_ARG, - readonly_ARG, reportformat_ARG, select_ARG, separator_ARG, shared_ARG, - short_ARG, sort_ARG, unbuffered_ARG, units_ARG) + CACHE_VGMETADATA | PERMITTED_READ_ONLY | ENABLE_ALL_DEVS | ENABLE_DUPLICATE_DEVS | LOCKD_VG_SH) /* ALL_VGS_IS_DEFAULT is for polldaemon to find pvmoves in-progress using process_each_vg. */ xx(pvmove, "Move extents from one physical volume to another", - ALL_VGS_IS_DEFAULT | DISALLOW_TAG_ARGS, - "pvmove\n" - "\t[--abort]\n" - "\t[--alloc AllocationPolicy]\n" - "\t[--atomic]\n" - "\t[-A|--autobackup {y|n}]\n" - "\t[-b|--background]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n " - "\t[-h|-?|--help]\n" - "\t[-i|--interval seconds]\n" - "\t[--noudevsync]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-t|--test]\n " - "\t[-v|--verbose]\n " - "\t[--version]\n" - "\t[{-n|--name} LogicalVolume]\n" -/* "\t[{-n|--name} LogicalVolume[:LogicalExtent[-LogicalExtent]...]]\n" */ - "\tSourcePhysicalVolume[:PhysicalExtent[-PhysicalExtent]...]}\n" - "\t[DestinationPhysicalVolume[:PhysicalExtent[-PhysicalExtent]...]...]\n", - - abort_ARG, alloc_ARG, atomic_ARG, autobackup_ARG, background_ARG, - interval_ARG, name_ARG, noudevsync_ARG, reportformat_ARG, test_ARG) + ALL_VGS_IS_DEFAULT | DISALLOW_TAG_ARGS) xx(lvpoll, "Continue already initiated poll operation on a logical volume", - 0, - "\t[--abort]\n" - "\t[-A|--autobackup {y|n}]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n " - "\t[-h|-?|--help]\n" - "\t[--handlemissingpvs]\n" - "\t[-i|--interval seconds]\n" - "\t[--polloperation]\n" - "\t[-t|--test]\n " - "\t[-v|--verbose]\n " - "\t[--version]\n", - - abort_ARG, autobackup_ARG, handlemissingpvs_ARG, interval_ARG, polloperation_ARG, - test_ARG) + 0) xx(pvremove, "Remove LVM label(s) from physical volume(s)", - ENABLE_ALL_DEVS, - "pvremove\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-f[f]|--force [--force]]\n" - "\t[-h|-?|--help]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-t|--test]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\t[-y|--yes]\n" - "\tPhysicalVolume [PhysicalVolume...]\n", - - force_ARG, reportformat_ARG, test_ARG) + ENABLE_ALL_DEVS) xx(pvs, "Display information about physical volumes", - CACHE_VGMETADATA | PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | ENABLE_ALL_DEVS | ENABLE_DUPLICATE_DEVS | LOCKD_VG_SH, - "pvs\n" - "\t[-a|--all]\n" - "\t[--aligned]\n" - "\t[--binary]\n" - "\t[--commandprofile ProfileName]\n" - "\t[--configreport ReportName]\n" - "\t[-d|--debug]\n" - "\t[--foreign]\n" - "\t[-h|-?|--help]\n" - "\t[--ignorelockingfailure]\n" - "\t[--ignoreskippedcluster]\n" - "\t[--logonly]\n" - "\t[--nameprefixes]\n" - "\t[--noheadings]\n" - "\t[--nosuffix]\n" - "\t[-o|--options [+|-|#]Field[,Field]]\n" - "\t[-O|--sort [+|-]key1[,[+|-]key2[,...]]]\n" - "\t[-P|--partial]\n" - "\t[--readonly]\n" - "\t[--reportformat {basic|json}]\n" - "\t[--rows]\n" - "\t[--segments]\n" - "\t[-S|--select Selection]\n" - "\t[--separator Separator]\n" - "\t[--trustcache]\n" - "\t[--unbuffered]\n" - "\t[--units hHbBsSkKmMgGtTpPeE]\n" - "\t[--unquoted]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\t[PhysicalVolume [PhysicalVolume...]]\n", - - aligned_ARG, all_ARG, binary_ARG, configreport_ARG, foreign_ARG, - ignorelockingfailure_ARG, ignoreskippedcluster_ARG, logonly_ARG, - nameprefixes_ARG, noheadings_ARG, nolocking_ARG, nosuffix_ARG, - options_ARG, partial_ARG, readonly_ARG, reportformat_ARG, rows_ARG, - segments_ARG, select_ARG, separator_ARG, shared_ARG, sort_ARG, - trustcache_ARG, unbuffered_ARG, units_ARG, unquoted_ARG) + CACHE_VGMETADATA | PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | ENABLE_ALL_DEVS | ENABLE_DUPLICATE_DEVS | LOCKD_VG_SH) xx(pvscan, "List all physical volumes", - PERMITTED_READ_ONLY | LOCKD_VG_SH | NO_LVMETAD_AUTOSCAN, - "pvscan\n" - "\t[-b|--background]\n" - "\t[--cache [-a|--activate ay] [ DevicePath | -j|--major major --minor minor]...]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t{-e|--exported | -n|--novolumegroup}\n" - "\t[-h|-?|--help]\n" - "\t[--ignorelockingfailure]\n" - "\t[-P|--partial]\n" - "\t[--readonly]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-s|--short]\n" - "\t[-u|--uuid]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n", - - activate_ARG, available_ARG, backgroundfork_ARG, cache_long_ARG, - exported_ARG, ignorelockingfailure_ARG, major_ARG, minor_ARG, - novolumegroup_ARG, partial_ARG, readonly_ARG, reportformat_ARG, - short_ARG, uuid_ARG) + PERMITTED_READ_ONLY | LOCKD_VG_SH | NO_LVMETAD_AUTOSCAN) xx(segtypes, "List available segment types", - PERMITTED_READ_ONLY | NO_METADATA_PROCESSING, - "segtypes\n") + PERMITTED_READ_ONLY | NO_METADATA_PROCESSING) xx(systemid, "Display the system ID, if any, currently set on this host", - PERMITTED_READ_ONLY | NO_METADATA_PROCESSING, - "systemid\n") + PERMITTED_READ_ONLY | NO_METADATA_PROCESSING) xx(tags, "List tags defined on this host", - PERMITTED_READ_ONLY | NO_METADATA_PROCESSING, - "tags\n") + PERMITTED_READ_ONLY | NO_METADATA_PROCESSING) xx(vgcfgbackup, "Backup volume group configuration(s)", - PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH, - "vgcfgbackup\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-f|--file filename]\n" - "\t[--foreign]\n" - "\t[-h|-?|--help]\n" - "\t[--ignorelockingfailure]\n" - "\t[-P|--partial]\n" - "\t[--readonly]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\t[VolumeGroupName...]\n", - - file_ARG, foreign_ARG, ignorelockingfailure_ARG, partial_ARG, readonly_ARG, - reportformat_ARG) + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH) xx(vgcfgrestore, "Restore volume group configuration", - 0, - "vgcfgrestore\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-f|--file filename]\n" - "\t[--force]\n" - "\t[-l[l]|--list [--list]]\n" - "\t[-M|--metadatatype 1|2]\n" - "\t[-h|--help]\n" - "\t[-t|--test]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\tVolumeGroupName", - - file_ARG, force_long_ARG, list_ARG, metadatatype_ARG, test_ARG) + 0) xx(vgchange, "Change volume group attributes", - CACHE_VGMETADATA | PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, - "vgchange\n" - "\t[-A|--autobackup {y|n}]\n" - "\t[--alloc AllocationPolicy]\n" - "\t[-P|--partial]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[--detachprofile]\n" - "\t[-h|--help]\n" - "\t[--ignorelockingfailure]\n" - "\t[--ignoremonitoring]\n" - "\t[--ignoreskippedcluster]\n" - "\t[-K|--ignoreactivationskip]\n" - "\t[--metadataprofile ProfileName]\n" - "\t[--monitor {y|n}]\n" - "\t[--[vg]metadatacopies #copies]\n" - "\t[--poll {y|n}]\n" - "\t[--noudevsync]\n" - "\t[--refresh]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-S|--select Selection]\n" - "\t[--sysinit]\n" - "\t[--systemid SystemID]\n" - "\t[-t|--test]\n" - "\t[-u|--uuid]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\t{-a|--activate [a|e|l]{y|n} |\n" - "\t[--activationmode {complete|degraded|partial}]\n" - "\t -c|--clustered {y|n} |\n" - "\t -x|--resizeable {y|n} |\n" - "\t -l|--logicalvolume MaxLogicalVolumes |\n" - "\t -p|--maxphysicalvolumes MaxPhysicalVolumes |\n" - "\t -s|--physicalextentsize PhysicalExtentSize[bBsSkKmMgGtTpPeE] |\n" - "\t --addtag Tag |\n" - "\t --deltag Tag}\n" - "\t[VolumeGroupName...]\n", - - activationmode_ARG, addtag_ARG, alloc_ARG, allocation_ARG, autobackup_ARG, - activate_ARG, available_ARG, clustered_ARG, deltag_ARG, detachprofile_ARG, - ignoreactivationskip_ARG, ignorelockingfailure_ARG, ignoremonitoring_ARG, - ignoreskippedcluster_ARG, logicalvolume_ARG, maxphysicalvolumes_ARG, - metadataprofile_ARG, monitor_ARG, noudevsync_ARG, metadatacopies_ARG, - vgmetadatacopies_ARG, partial_ARG, physicalextentsize_ARG, poll_ARG, - refresh_ARG, reportformat_ARG, resizeable_ARG, resizable_ARG, select_ARG, - sysinit_ARG, systemid_ARG, test_ARG, uuid_ARG, lockstart_ARG, lockstop_ARG, - locktype_ARG, lockopt_ARG, force_ARG) + CACHE_VGMETADATA | PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT) xx(vgck, "Check the consistency of volume group(s)", - ALL_VGS_IS_DEFAULT | LOCKD_VG_SH, - "vgck " - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-h|--help]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\t[VolumeGroupName...]\n", - - reportformat_ARG) + ALL_VGS_IS_DEFAULT | LOCKD_VG_SH) xx(vgconvert, "Change volume group metadata format", - 0, - "vgconvert\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-h|--help]\n" - "\t[--labelsector sector]\n" - "\t[-M|--metadatatype 1|2]\n" - "\t[--pvmetadatacopies #copies]\n" - "\t[--metadatasize MetadataSize[bBsSkKmMgGtTpPeE]]\n" - "\t[--bootloaderareasize BootLoaderAreaSize[bBsSkKmMgGtTpPeE]]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-t|--test]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\tVolumeGroupName [VolumeGroupName...]\n", - - force_ARG, test_ARG, labelsector_ARG, bootloaderareasize_ARG, - metadatatype_ARG, metadatacopies_ARG, pvmetadatacopies_ARG, - metadatasize_ARG, reportformat_ARG) + 0) xx(vgcreate, "Create a volume group", - MUST_USE_ALL_ARGS | ENABLE_ALL_DEVS, - "vgcreate\n" - "\t[-A|--autobackup {y|n}]\n" - "\t[--addtag Tag]\n" - "\t[--alloc AllocationPolicy]\n" - "\t[-c|--clustered {y|n}]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-h|--help]\n" - "\t[-l|--maxlogicalvolumes MaxLogicalVolumes]\n" - "\t[--metadataprofile ProfileName]\n" - "\t[-M|--metadatatype 1|2]\n" - "\t[--[vg]metadatacopies #copies]\n" - "\t[-p|--maxphysicalvolumes MaxPhysicalVolumes]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-s|--physicalextentsize PhysicalExtentSize[bBsSkKmMgGtTpPeE]]\n" - "\t[--systemid SystemID]\n" - "\t[-t|--test]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\t[-y|--yes]\n" - "\t[ PHYSICAL DEVICE OPTIONS ]\n" - "\tVolumeGroupName PhysicalDevicePath [PhysicalDevicePath...]\n", - - addtag_ARG, alloc_ARG, autobackup_ARG, clustered_ARG, maxlogicalvolumes_ARG, - maxphysicalvolumes_ARG, metadataprofile_ARG, metadatatype_ARG, - physicalextentsize_ARG, test_ARG, force_ARG, zero_ARG, labelsector_ARG, - metadatasize_ARG, pvmetadatacopies_ARG, reportformat_ARG, metadatacopies_ARG, - vgmetadatacopies_ARG, dataalignment_ARG, dataalignmentoffset_ARG, - shared_ARG, systemid_ARG, locktype_ARG, lockopt_ARG) + MUST_USE_ALL_ARGS | ENABLE_ALL_DEVS) xx(vgdisplay, "Display volume group information", - PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH, - "vgdisplay\n" - "\t[-A|--activevolumegroups]\n" - "\t[-c|--colon | -s|--short | -v|--verbose]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[--foreign]\n" - "\t[-h|--help]\n" - "\t[--ignorelockingfailure]\n" - "\t[--ignoreskippedcluster]\n" - "\t[--nosuffix]\n" - "\t[-P|--partial]\n" - "\t[--readonly]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-S|--select Selection]\n" - "\t[--units hHbBsSkKmMgGtTpPeE]\n" - "\t[--version]\n" - "\t[VolumeGroupName [VolumeGroupName...]]\n" - "\n" - "vgdisplay --columns|-C\n" - "\t[--aligned]\n" - "\t[--binary]\n" - "\t[--commandprofile ProfileName]\n" - "\t[--configreport ReportName]\n" - "\t[-d|--debug]\n" - "\t[--foreign]\n" - "\t[-h|--help]\n" - "\t[--ignorelockingfailure]\n" - "\t[--ignoreskippedcluster]\n" - "\t[--logonly]\n" - "\t[--noheadings]\n" - "\t[--nosuffix]\n" - "\t[-o|--options [+|-|#]Field[,Field]]\n" - "\t[-O|--sort [+|-]key1[,[+|-]key2[,...]]]\n" - "\t[-P|--partial]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-S|--select Selection]\n" - "\t[--readonly]\n" - "\t[--separator Separator]\n" - "\t[--unbuffered]\n" - "\t[--units hHbBsSkKmMgGtTpPeE]\n" - "\t[--verbose]\n" - "\t[--version]\n" - "\t[VolumeGroupName [VolumeGroupName...]]\n", - - activevolumegroups_ARG, aligned_ARG, binary_ARG, colon_ARG, columns_ARG, - configreport_ARG, foreign_ARG, ignorelockingfailure_ARG, - ignoreskippedcluster_ARG, logonly_ARG, noheadings_ARG, nosuffix_ARG, - options_ARG, partial_ARG, readonly_ARG, reportformat_ARG, select_ARG, - shared_ARG, short_ARG, separator_ARG, sort_ARG, unbuffered_ARG, units_ARG) + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH) xx(vgexport, "Unregister volume group(s) from the system", - ALL_VGS_IS_DEFAULT, - "vgexport\n" - "\t[-a|--all]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-h|--help]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-S|--select Selection]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\tVolumeGroupName [VolumeGroupName...]\n", - - all_ARG, reportformat_ARG, select_ARG, test_ARG) + ALL_VGS_IS_DEFAULT) xx(vgextend, "Add physical volumes to a volume group", - MUST_USE_ALL_ARGS | ENABLE_ALL_DEVS, - "vgextend\n" - "\t[-A|--autobackup y|n]\n" - "\t[--restoremissing]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-f|--force]\n" - "\t[-h|--help]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-t|--test]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\t[-y|--yes]\n" - "\t[ PHYSICAL DEVICE OPTIONS ]\n" - "\tVolumeGroupName PhysicalDevicePath [PhysicalDevicePath...]\n", - - autobackup_ARG, test_ARG, - force_ARG, zero_ARG, labelsector_ARG, metadatatype_ARG, - metadatasize_ARG, pvmetadatacopies_ARG, metadatacopies_ARG, - metadataignore_ARG, dataalignment_ARG, dataalignmentoffset_ARG, - reportformat_ARG, restoremissing_ARG) + MUST_USE_ALL_ARGS | ENABLE_ALL_DEVS) xx(vgimport, "Register exported volume group with system", - ALL_VGS_IS_DEFAULT | NO_LVMETAD_AUTOSCAN, - "vgimport\n" - "\t[-a|--all]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-f|--force]\n" - "\t[-h|--help]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-S|--select Selection]\n" - "\t[-t|--test]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\tVolumeGroupName...\n", - - all_ARG, force_ARG, reportformat_ARG, select_ARG, test_ARG) + ALL_VGS_IS_DEFAULT | NO_LVMETAD_AUTOSCAN) xx(vgimportclone, "Import a VG from cloned PVs", - NO_LVMETAD_AUTOSCAN, - "vgimportclone\n" - "\t[-d|--debug]\n" - "\t[-h|--help]\n" - "\t[-i|--import]\n" - "\t[-n|--basevgname]\n" - "\t[-t|--test]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\t[PhysicalVolumePath...]\n", - - basevgname_ARG, test_ARG, import_ARG) + NO_LVMETAD_AUTOSCAN) xx(vgmerge, "Merge volume groups", - 0, - "vgmerge\n" - "\t[-A|--autobackup y|n]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-h|--help]\n" - "\t[-l|--list]\n" - "\t[-t|--test]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\tDestinationVolumeGroupName SourceVolumeGroupName\n", - - autobackup_ARG, list_ARG, test_ARG) + 0) xx(vgmknodes, "Create the special files for volume group devices in /dev", - ALL_VGS_IS_DEFAULT, - "vgmknodes\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-h|--help]\n" - "\t[--ignorelockingfailure]\n" - "\t[--refresh]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\t[VolumeGroupName...]\n", - - ignorelockingfailure_ARG, refresh_ARG, reportformat_ARG) + ALL_VGS_IS_DEFAULT) xx(vgreduce, "Remove physical volume(s) from a volume group", - 0, - "vgreduce\n" - "\t[-a|--all]\n" - "\t[-A|--autobackup y|n]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-h|--help]\n" - "\t[--mirrorsonly]\n" - "\t[--removemissing]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-f|--force]\n" - "\t[-t|--test]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\tVolumeGroupName\n" - "\t[PhysicalVolumePath...]\n", - - all_ARG, autobackup_ARG, force_ARG, mirrorsonly_ARG, removemissing_ARG, - reportformat_ARG, test_ARG) + 0) xx(vgremove, "Remove volume group(s)", - ALL_VGS_IS_DEFAULT, /* all VGs only with select */ - "vgremove\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-f|--force]\n" - "\t[-h|--help]\n" - "\t[--noudevsync]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-S|--select Selection]\n" - "\t[-t|--test]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\tVolumeGroupName [VolumeGroupName...]\n", - - force_ARG, noudevsync_ARG, reportformat_ARG, select_ARG, test_ARG) + ALL_VGS_IS_DEFAULT) /* all VGs only with select */ xx(vgrename, "Rename a volume group", - ALLOW_UUID_AS_NAME | REQUIRES_FULL_LABEL_SCAN, - "vgrename\n" - "\t[-A|--autobackup y|n]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-h|--help]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-t|--test]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\tOldVolumeGroupPath NewVolumeGroupPath |\n" - "\tOldVolumeGroupName NewVolumeGroupName\n", - - autobackup_ARG, force_ARG, reportformat_ARG, test_ARG) + ALLOW_UUID_AS_NAME | REQUIRES_FULL_LABEL_SCAN) xx(vgs, "Display information about volume groups", - PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH, - "vgs\n" - "\t[--aligned]\n" - "\t[--binary]\n" - "\t[-a|--all]\n" - "\t[--commandprofile ProfileName]\n" - "\t[--configreport ReportName]\n" - "\t[-d|--debug]\n" - "\t[--foreign]\n" - "\t[-h|--help]\n" - "\t[--ignorelockingfailure]\n" - "\t[--ignoreskippedcluster]\n" - "\t[--logonly]\n" - "\t[--nameprefixes]\n" - "\t[--noheadings]\n" - "\t[--nosuffix]\n" - "\t[-o|--options [+|-|#]Field[,Field]]\n" - "\t[-O|--sort [+|-]key1[,[+|-]key2[,...]]]\n" - "\t[-P|--partial]\n" - "\t[--readonly]\n" - "\t[--reportformat {basic|json}]\n" - "\t[--rows]\n" - "\t[-S|--select Selection]\n" - "\t[--separator Separator]\n" - "\t[--trustcache]\n" - "\t[--unbuffered]\n" - "\t[--units hHbBsSkKmMgGtTpPeE]\n" - "\t[--unquoted]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\t[VolumeGroupName [VolumeGroupName...]]\n", - - aligned_ARG, all_ARG, binary_ARG, configreport_ARG, foreign_ARG, - ignorelockingfailure_ARG, ignoreskippedcluster_ARG, logonly_ARG, - nameprefixes_ARG, noheadings_ARG, nolocking_ARG, nosuffix_ARG, - options_ARG, partial_ARG, readonly_ARG, reportformat_ARG, rows_ARG, - select_ARG, separator_ARG, shared_ARG, sort_ARG, trustcache_ARG, - unbuffered_ARG, units_ARG, unquoted_ARG) + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH) xx(vgscan, "Search for all volume groups", - PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH | NO_LVMETAD_AUTOSCAN, - "vgscan " - "\t[--cache]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-h|--help]\n" - "\t[--ignorelockingfailure]\n" - "\t[--mknodes]\n" - "\t[--notifydbus]\n" - "\t[-P|--partial]\n" - "\t[--reportformat {basic|json}]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n", - - cache_long_ARG, ignorelockingfailure_ARG, mknodes_ARG, notifydbus_ARG, - partial_ARG, reportformat_ARG) + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | LOCKD_VG_SH | NO_LVMETAD_AUTOSCAN) xx(vgsplit, "Move physical volumes into a new or existing volume group", - 0, - "vgsplit\n" - "\t[-A|--autobackup {y|n}]\n" - "\t[--alloc AllocationPolicy]\n" - "\t[-c|--clustered {y|n}]\n" - "\t[--commandprofile ProfileName]\n" - "\t[-d|--debug]\n" - "\t[-h|--help]\n" - "\t[-l|--maxlogicalvolumes MaxLogicalVolumes]\n" - "\t[-M|--metadatatype 1|2]\n" - "\t[--[vg]metadatacopies #copies]\n" - "\t[-n|--name LogicalVolumeName]\n" - "\t[-p|--maxphysicalvolumes MaxPhysicalVolumes]\n" - "\t[-t|--test]\n" - "\t[-v|--verbose]\n" - "\t[--version]\n" - "\tSourceVolumeGroupName DestinationVolumeGroupName\n" - "\t[PhysicalVolumePath...]\n", - - alloc_ARG, autobackup_ARG, clustered_ARG, - maxlogicalvolumes_ARG, maxphysicalvolumes_ARG, - metadatatype_ARG, vgmetadatacopies_ARG, name_ARG, test_ARG) + 0) xx(version, "Display software and driver version information", - PERMITTED_READ_ONLY | NO_METADATA_PROCESSING, - "version\n") + PERMITTED_READ_ONLY | NO_METADATA_PROCESSING) diff --git a/tools/lvchange.c b/tools/lvchange.c index 250d7209b..462e0a71f 100644 --- a/tools/lvchange.c +++ b/tools/lvchange.c @@ -1436,3 +1436,286 @@ int lvchange(struct cmd_context *cmd, int argc, char **argv) update ? READ_FOR_UPDATE : 0, NULL, &_lvchange_single); } + +#if 0 +/* + * Check if the status of the LV allows running lvchange. + * + * FIXME: check for invalid VG/LV properties in a way that is not prone + * to missing some. Currently, there are some checks here, some in the + * functions above, some in process_each, and some may be missing. + */ +static int _lvchange_status_is_valid(struct cmd_context *cmd, struct logical_volume *lv) +{ + if (!(lv->vg->status & LVM_WRITE)) { + log_error("Operation not permitted on LV %s: writable VG required.", + display_lvname(lv)); + return 0; + } + + if (lv_is_pvmove(lv)) { + log_error("Operation not permitted on LV %s: used for pvmove.", + display_lvname(lv)); + if (arg_is_set(cmd, activate_ARG)) + log_error("Use 'pvmove --abort' to abandon a pvmove"); + return 0; + } + + if (lv_is_mirror_log(lv)) { + log_error("Operation not permitted on LV %s: is mirror log.", + display_lvname(lv)); + return 0; + } + + if (lv_is_mirror_image(lv)) { + log_error("Operation not permitted on LV %s: is mirror image.", + display_lvname(lv)); + return 0; + } + + if (lv_is_origin(lv) && !lv_is_thin_volume(lv)) { + log_error("Operation not permitted on LV %s: is under snapshot.", + display_lvname(lv)); + return 0; + } + + return 1; +} + +static int _lvchange_properties_single(struct cmd_context *cmd, + struct logical_volume *lv, + struct processing_handle *handle) +{ + int doit = 0, docmds = 0; + + /* FIXME: sort out hidden/internal LVs, e.g. _lvchange_hidden_is_valid() */ + + if (!_lvchange_status_is_valid(cmd, lv)) + return_ECMD_FAILED; + + if (arg_is_set(cmd, persistent_ARG) && lv_is_pool(lv)) { + log_error("Operation not permitted on LV %s: persistent device numbers are not supported with pools.", + display_lvname(lv)); + return ECMD_FAILED; + } + + /* + * If a persistent lv lock already exists from activation + * (with the needed mode or higher), this will be a no-op. + * Otherwise, the lv lock will be taken as non-persistent + * and released when this command exits. + */ + if (!lockd_lv(cmd, lv, "ex", 0)) { + stack; + return ECMD_FAILED; + } + + for (i = 0; i < cmd->command->ro_count; i++) { + opt_enum = cmd->command->required_opt_args[i].opt; + + if (!arg_is_set(cmd, opt_enum)) + continue; + + if (!archive(lv->vg)) + return_ECMD_FAILED; + + docmds++; + + switch (opt_enum) { + case permission_ARG: + doit += _lvchange_permission(cmd, lv); + break; + + case alloc_ARG: + case contiguous_ARG: + doit += _lvchange_alloc(cmd, lv); + break; + + case errorwhenfull_ARG: + doit += _lvchange_errorwhenfull(cmd, lv); + break; + + case readahead_ARG: + doit += _lvchange_readahead(cmd, lv); + break; + + case persistent_ARG: + doit += _lvchange_persistent(cmd, lv); + break; + + case discards_ARG: + case zero_ARG: + doit += _lvchange_pool_update(cmd, lv); + break; + + case addtag_ARG: + case deltag_ARG: + doit += _lvchange_tag(cmd, lv, opt_enum); + break; + + case writemostly_ARG: + case writebehind_ARG: + doit += _lvchange_writemostly(lv); + break; + + case minrecoveryrate_ARG: + case maxrecoveryrate_ARG: + doit += _lvchange_recovery_rate(lv); + break; + + case profile_ARG: + case metadataprofile_ARG: + case detachprofile_ARG: + doit += _lvchange_profile(lv); + break; + + case setactivationskip_ARG: + doit += _lvchange_activation_skip(lv); + break; + + case cachemode_ARG: + case cachepolicy_ARG: + case cachesettings_ARG: + doit += _lvchange_cache(cmd, lv); + break; + + default: + log_error(INTERNAL_ERROR "Failed to check for option %s", + arg_long_option_name(i)); + } + + if (doit) + log_print_unless_silent("Logical volume %s changed.", display_lvname(lv)); + + if (doit != docmds) + return_ECMD_FAILED; + + return ECMD_PROCESSED; +} + +int lvchange_properties_cmd(struct cmd_context *cmd, int argc, char **argv) +{ + struct processing_handle *handle = init_processing_handle(cmd, NULL); + int ret; + + ret = process_each_lv(cmd, argc, argv, NULL, NULL, READ_FOR_UPDATE, handle, _lvchange_properties_single); + + destroy_processing_handle(cmd, handle); + return ret; +} + +static int _lvchange_activate_single(struct cmd_context *cmd, + struct logical_volume *lv, + struct processing_handle *handle) +{ + struct logical_volume *origin; + char snaps_msg[128]; + + /* FIXME: sort out hidden/internal LVs, e.g. _lvchange_hidden_is_valid() */ + + if (!_lvchange_status_is_valid(cmd, lv)) + return_ECMD_FAILED; + + /* FIXME: untangle the proper logic for cow / sparse / virtual origin */ + + /* If LV is sparse, activate origin instead */ + if (lv_is_cow(lv) && lv_is_virtual_origin(origin = origin_from_cow(lv))) + lv = origin; + + if (lv_is_cow(lv)) { + origin = origin_from_cow(lv); + if (origin->origin_count < 2) + snaps_msg[0] = '\0'; + else if (dm_snprintf(snaps_msg, sizeof(snaps_msg), + " and %u other snapshot(s)", + origin->origin_count - 1) < 0) { + log_error("Failed to prepare message."); + return ECMD_FAILED; + } + + if (!arg_is_set(cmd, yes_ARG) && + (yes_no_prompt("Change of snapshot %s will also change its " + "origin %s%s. Proceed? [y/n]: ", + display_lvname(lv), display_lvname(origin), + snaps_msg) == 'n')) { + log_error("Logical volume %s not changed.", display_lvname(lv)); + return ECMD_FAILED; + } + } + + /* + * If --sysinit -aay is used and at the same time lvmetad is used, + * we want to rely on autoactivation to take place. Also, we + * need to take special care here as lvmetad service does + * not neet to be running at this moment yet - it could be + * just too early during system initialization time. + */ + if (arg_is_set(cmd, sysinit_ARG) && (arg_uint_value(cmd, activate_ARG, 0) == CHANGE_AAY)) { + if (lvmetad_used()) { + log_warn("WARNING: lvmetad is active, skipping direct activation during sysinit."); + return ECMD_PROCESSED; + } + } + + if (!_lvchange_activate(cmd, lv)) + return_ECMD_FAILED; + + return ECMD_PROCESSED; +} + +int lvchange_activate_cmd(struct cmd_context *cmd, int argc, char **argv) +{ + struct processing_handle *handle = init_processing_handle(cmd, NULL); + + cmd->handles_missing_pvs = 1; + cmd->lockd_vg_default_sh = 1; + + /* + * Include foreign VGs that contain active LVs. + * That shouldn't happen in general, but if it does by some + * mistake, then we want to allow those LVs to be deactivated. + */ + cmd->include_active_foreign_vgs = 1; + + /* Allow deactivating if locks fail. */ + if (is_change_activating((activation_change_t)arg_uint_value(cmd, activate_ARG, CHANGE_AY))) + cmd->lockd_vg_enforce_sh = 1; + + ret = process_each_lv(cmd, argc, argv, NULL, NULL, 0, handle, _lvchange_activate_single); + + destroy_processing_handle(cmd, handle); + return ret; +} + +static int _lvchange_refresh_single(struct cmd_context *cmd, + struct logical_volume *lv, + struct processing_handle *handle) +{ + /* FIXME: sort out hidden/internal LVs, e.g. _lvchange_hidden_is_valid() */ + + if (!_lvchange_status_is_valid(cmd, lv)) + return_ECMD_FAILED; + + log_verbose("Refreshing logical volume %s (if active).", display_lvname(lv)); + + if (!_lv_refresh(cmd, lv)) + return_ECMD_FAILED; + + return ECMD_PROCESSED; +} + +int lvchange_refresh_cmd(struct cmd_context *cmd, int argc, char **argv) +{ + struct processing_handle *handle = init_processing_handle(cmd, NULL); + int ret; + + cmd->handles_missing_pvs = 1; + cmd->lockd_vg_default_sh = 1; + + ret = process_each_lv(cmd, argc, argv, NULL, NULL, 0, handle, _lvchange_refresh_single); + + destroy_processing_handle(cmd, handle); + return ret; +} +#endif + diff --git a/tools/lvm.c b/tools/lvm.c index b3af0206b..aae6da037 100644 --- a/tools/lvm.c +++ b/tools/lvm.c @@ -45,9 +45,9 @@ static char *_list_cmds(const char *text, int state) len = strlen(text); } - while (i < _cmdline->num_commands) - if (!strncmp(text, _cmdline->commands[i++].name, len)) - return strdup(_cmdline->commands[i - 1].name); + while (i < _cmdline->num_command_names) + if (!strncmp(text, _cmdline->command_names[i++].name, len)) + return strdup(_cmdline->command_names[i - 1].name); return NULL; } @@ -57,7 +57,7 @@ static char *_list_args(const char *text, int state) { static int match_no = 0; static size_t len = 0; - static struct command *com; + static struct command_name *cname; /* Initialise if this is a new completion attempt */ if (!state) { @@ -65,40 +65,40 @@ static char *_list_args(const char *text, int state) int j; match_no = 0; - com = NULL; + cname = NULL; len = strlen(text); /* Find start of first word in line buffer */ while (isspace(*s)) s++; - /* Look for word in list of commands */ - for (j = 0; j < _cmdline->num_commands; j++) { + /* Look for word in list of command names */ + for (j = 0; j < _cmdline->num_command_names; j++) { const char *p; char *q = s; - p = _cmdline->commands[j].name; + p = _cmdline->command_names[j].name; while (*p == *q) { p++; q++; } if ((!*p) && *q == ' ') { - com = _cmdline->commands + j; + cname = _cmdline->command_names + j; break; } } } - if (!com) + if (!cname) return NULL; /* Short form arguments */ if (len < 3) { - while (match_no < com->num_args) { + while (match_no < cname->num_args) { char s[3]; char c; if (!(c = (_cmdline->arg_props + - com->valid_args[match_no++])->short_arg)) + cname->valid_args[match_no++])->short_arg)) continue; sprintf(s, "-%c", c); @@ -108,13 +108,13 @@ static char *_list_args(const char *text, int state) } /* Long form arguments */ - if (match_no < com->num_args) - match_no = com->num_args; + if (match_no < cname->num_args) + match_no = cname->num_args; - while (match_no - com->num_args < com->num_args) { + while (match_no - cname->num_args < cname->num_args) { const char *l; l = (_cmdline->arg_props + - com->valid_args[match_no++ - com->num_args])->long_arg; + cname->valid_args[match_no++ - cname->num_args])->long_arg; if (*(l + 2) && !strncmp(text, l, len)) return strdup(l); } diff --git a/tools/lvm2cmdline.h b/tools/lvm2cmdline.h index 80bd03ea1..9b75c36d5 100644 --- a/tools/lvm2cmdline.h +++ b/tools/lvm2cmdline.h @@ -19,10 +19,11 @@ struct cmd_context; struct cmdline_context { - struct arg_props *arg_props; - struct command *commands; - int num_commands; - int commands_size; + struct arg_props *arg_props; + struct command *commands; + int num_commands; + struct command_name *command_names; + int num_command_names; }; int lvm2_main(int argc, char **argv); diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c index 9a4deb7d5..7c0cb9aa0 100644 --- a/tools/lvmcmdline.c +++ b/tools/lvmcmdline.c @@ -49,21 +49,62 @@ extern char *optarg; # define OPTIND_INIT 1 #endif +#include "command-lines-count.h" + /* - * Table of valid switches + * Table of valid --option values. + */ +static struct val_props _val_props[VAL_COUNT + 1] = { +#define val(a, b, c, d) {a, b, c, d}, +#include "vals.h" +#undef val +}; + +/* + * Table of valid --option's */ static struct arg_props _arg_props[ARG_COUNT + 1] = { -#define arg(a, b, c, d, e, f) {b, "", "--" c, d, e, f}, +#define arg(a, b, c, d, e, f) {a, b, "", "--" c, d, e, f}, #include "args.h" #undef arg }; +/* + * Table of valid command names + */ +#define MAX_COMMAND_NAMES 64 +struct command_name command_names[MAX_COMMAND_NAMES] = { +#define xx(a, b, c...) { # a, b, c }, +#include "commands.h" +#undef xx +}; + +/* + * Table of valid command lines + */ +static struct command commands[COMMAND_COUNT]; static struct cmdline_context _cmdline; +/* + * Table of command line functions + * + * This table could be auto-generated once all commands have been converted + * to use these functions instead of the old per-command-name function. + * For now, any command id not included here uses the old command fn. + */ +struct command_function command_functions[COMMAND_ID_COUNT] = { + { lvmconfig_general_CMD, lvmconfig }, +}; +#if 0 + { lvchange_properties_CMD, lvchange_properties_cmd }, + { lvchange_activate_CMD, lvchange_activate_cmd }, + { lvchange_refresh_CMD, lvchange_refresh_cmd }, +#endif + /* Command line args */ unsigned arg_count(const struct cmd_context *cmd, int a) { - return cmd->arg_values ? cmd->arg_values[a].count : 0; + return cmd->opt_arg_values ? cmd->opt_arg_values[a].count : 0; } unsigned grouped_arg_count(const struct arg_values *av, int a) @@ -182,12 +223,12 @@ const char *arg_long_option_name(int a) const char *arg_value(const struct cmd_context *cmd, int a) { - return cmd->arg_values ? cmd->arg_values[a].value : NULL; + return cmd->opt_arg_values ? cmd->opt_arg_values[a].value : NULL; } const char *arg_str_value(const struct cmd_context *cmd, int a, const char *def) { - return arg_is_set(cmd, a) ? cmd->arg_values[a].value : def; + return arg_is_set(cmd, a) ? cmd->opt_arg_values[a].value : def; } const char *grouped_arg_str_value(const struct arg_values *av, int a, const char *def) @@ -217,44 +258,44 @@ int32_t first_grouped_arg_int_value(const struct cmd_context *cmd, int a, const int32_t arg_int_value(const struct cmd_context *cmd, int a, const int32_t def) { return (_cmdline.arg_props[a].flags & ARG_GROUPABLE) ? - first_grouped_arg_int_value(cmd, a, def) : (arg_is_set(cmd, a) ? cmd->arg_values[a].i_value : def); + first_grouped_arg_int_value(cmd, a, def) : (arg_is_set(cmd, a) ? cmd->opt_arg_values[a].i_value : def); } uint32_t arg_uint_value(const struct cmd_context *cmd, int a, const uint32_t def) { - return arg_is_set(cmd, a) ? cmd->arg_values[a].ui_value : def; + return arg_is_set(cmd, a) ? cmd->opt_arg_values[a].ui_value : def; } int64_t arg_int64_value(const struct cmd_context *cmd, int a, const int64_t def) { - return arg_is_set(cmd, a) ? cmd->arg_values[a].i64_value : def; + return arg_is_set(cmd, a) ? cmd->opt_arg_values[a].i64_value : def; } uint64_t arg_uint64_value(const struct cmd_context *cmd, int a, const uint64_t def) { - return arg_is_set(cmd, a) ? cmd->arg_values[a].ui64_value : def; + return arg_is_set(cmd, a) ? cmd->opt_arg_values[a].ui64_value : def; } /* No longer used. const void *arg_ptr_value(struct cmd_context *cmd, int a, const void *def) { - return arg_is_set(cmd, a) ? cmd->arg_values[a].ptr : def; + return arg_is_set(cmd, a) ? cmd->opt_arg_values[a].ptr : def; } */ sign_t arg_sign_value(const struct cmd_context *cmd, int a, const sign_t def) { - return arg_is_set(cmd, a) ? cmd->arg_values[a].sign : def; + return arg_is_set(cmd, a) ? cmd->opt_arg_values[a].sign : def; } percent_type_t arg_percent_value(const struct cmd_context *cmd, int a, const percent_type_t def) { - return arg_is_set(cmd, a) ? cmd->arg_values[a].percent : def; + return arg_is_set(cmd, a) ? cmd->opt_arg_values[a].percent : def; } int arg_count_increment(struct cmd_context *cmd, int a) { - return cmd->arg_values[a].count++; + return cmd->opt_arg_values[a].count++; } int yes_no_arg(struct cmd_context *cmd __attribute__((unused)), struct arg_values *av) @@ -694,7 +735,7 @@ int readahead_arg(struct cmd_context *cmd __attribute__((unused)), struct arg_va */ int metadatacopies_arg(struct cmd_context *cmd, struct arg_values *av) { - if (!strncmp(cmd->command->name, "vg", 2)) { + if (!strncmp(cmd->name, "vg", 2)) { if (!strcasecmp(av->value, "all")) { av->ui_value = VGMETADATACOPIES_ALL; return 1; @@ -709,104 +750,658 @@ int metadatacopies_arg(struct cmd_context *cmd, struct arg_values *av) return int_arg(cmd, av); } -static void __alloc(int size) +/* + * The valid args for a command name in general is a union of + * required_opt_args and optional_opt_args for all commands[] + * with the given name. + */ + +static void _set_valid_args_for_command_name(int ci) { - if (!(_cmdline.commands = dm_realloc(_cmdline.commands, sizeof(*_cmdline.commands) * size))) { - log_fatal("Couldn't allocate memory."); - exit(ECMD_FAILED); + int all_args[ARG_COUNT] = { 0 }; + int num_args = 0; + int opt_enum; /* foo_ARG from args.h */ + int i, ro, oo; + + /* + * all_args is indexed by the foo_ARG enum vals + */ + + for (i = 0; i < COMMAND_COUNT; i++) { + if (strcmp(commands[i].name, command_names[ci].name)) + continue; + + for (ro = 0; ro < commands[i].ro_count; ro++) { + opt_enum = commands[i].required_opt_args[ro].opt; + all_args[opt_enum] = 1; + } + for (oo = 0; oo < commands[i].oo_count; oo++) { + opt_enum = commands[i].optional_opt_args[oo].opt; + all_args[opt_enum] = 1; + } } - _cmdline.commands_size = size; + for (i = 0; i < ARG_COUNT; i++) { + if (all_args[i]) { + command_names[ci].valid_args[num_args] = _cmdline.arg_props[i].arg_enum; + num_args++; + + /* Automatically recognize --extents in addition to --size. */ + if (_cmdline.arg_props[i].arg_enum == size_ARG) { + command_names[ci].valid_args[num_args] = extents_ARG; + num_args++; + } + } + } + command_names[ci].num_args = num_args; } -static void _alloc_command(void) +static struct command_name *_find_command_name(const char *name) { - if (!_cmdline.commands_size) - __alloc(32); + int i; + + for (i = 0; i < MAX_COMMAND_NAMES; i++) { + if (!command_names[i].name) + break; + if (!strcmp(command_names[i].name, name)) + return &command_names[i]; + } + return NULL; +} + +static struct command_function *_find_command_function(int command_line_enum) +{ + int i; + + if (!command_line_enum) + return NULL; + + for (i = 0; i < COMMAND_ID_COUNT; i++) { + if (command_functions[i].command_line_enum == command_line_enum) + return &command_functions[i]; + } + return NULL; +} - if (_cmdline.commands_size <= _cmdline.num_commands) - __alloc(2 * _cmdline.commands_size); +static void _define_commands(void) +{ +/* command-lines.h defines command[] structs, generated from command-lines.in */ +#include "command-lines.h" /* generated from command-lines.in */ } -static void _create_new_command(const char *name, command_fn command, - unsigned flags, - const char *desc, const char *usagestr, - int nargs, int *args) +void lvm_register_commands(void) { - struct command *nc; + struct command_name *cname; + int i; - _alloc_command(); + memset(&commands, 0, sizeof(commands)); - nc = _cmdline.commands + _cmdline.num_commands++; + _define_commands(); - nc->name = name; - nc->desc = desc; - nc->usage = usagestr; - nc->fn = command; - nc->flags = flags; - nc->num_args = nargs; - nc->valid_args = args; + _cmdline.commands = commands; + _cmdline.num_commands = COMMAND_COUNT; + + for (i = 0; i < COMMAND_COUNT; i++) { + if (!(cname = _find_command_name(commands[i].name))) + log_error(INTERNAL_ERROR "Failed to find command name %s.", commands[i].name); + commands[i].cname = cname; + commands[i].flags = cname->flags; + commands[i].functions = _find_command_function(commands[i].command_line_enum); + } + + _cmdline.command_names = command_names; + + for (i = 0; i < MAX_COMMAND_NAMES; i++) { + if (!command_names[i].name) + break; + _cmdline.num_command_names++; + } + + for (i = 0; i < _cmdline.num_command_names; i++) + _set_valid_args_for_command_name(i); } -static void _register_command(const char *name, command_fn fn, const char *desc, - unsigned flags, const char *usagestr, ...) +static int _opt_equivalent_is_set(struct cmd_context *cmd, int opt) { - int nargs = 0, i; - int *args; - va_list ap; + if ((opt == mirrorlog_ARG) && arg_is_set(cmd, corelog_ARG)) + return 1; - /* count how many arguments we have */ - va_start(ap, usagestr); - while (va_arg(ap, int) >= 0) - nargs++; - va_end(ap); + if ((opt == resizeable_ARG) && arg_is_set(cmd, resizable_ARG)) + return 1; + + if ((opt == allocatable_ARG) && arg_is_set(cmd, allocation_ARG)) + return 1; + + if ((opt == resizeable_ARG) && arg_is_set(cmd, allocation_ARG)) + return 1; + + if ((opt == activate_ARG) && arg_is_set(cmd, available_ARG)) + return 1; + + if ((opt == rebuild_ARG) && arg_is_set(cmd, raidrebuild_ARG)) + return 1; + + if ((opt == syncaction_ARG) && arg_is_set(cmd, raidsyncaction_ARG)) + return 1; + + if ((opt == writemostly_ARG) && arg_is_set(cmd, raidwritemostly_ARG)) + return 1; + + if ((opt == minrecoveryrate_ARG) && arg_is_set(cmd, raidminrecoveryrate_ARG)) + return 1; - /* allocate space for them */ - if (!(args = dm_malloc(sizeof(*args) * nargs))) { - log_fatal("Out of memory."); - exit(ECMD_FAILED); + if ((opt == maxrecoveryrate_ARG) && arg_is_set(cmd, raidmaxrecoveryrate_ARG)) + return 1; + + if ((opt == writebehind_ARG) && arg_is_set(cmd, raidwritebehind_ARG)) + return 1; + + return 0; +} + +static int _command_required_opt_matches(struct cmd_context *cmd, int ci, int ro) +{ + int opt_enum = commands[ci].required_opt_args[ro].opt; + + if (arg_is_set(cmd, opt_enum)) + goto check_val; + + /* + * For some commands, --size and --extents are interchangable, + * but command[] definitions use only --size. + */ + if ((opt_enum == size_ARG) && arg_is_set(cmd, extents_ARG)) { + if (!strcmp(commands[ci].name, "lvcreate") || + !strcmp(commands[ci].name, "lvresize") || + !strcmp(commands[ci].name, "lvextend") || + !strcmp(commands[ci].name, "lvreduce")) + goto check_val; } - /* fill them in */ - va_start(ap, usagestr); - for (i = 0; i < nargs; i++) - args[i] = va_arg(ap, int); - va_end(ap); + if (_opt_equivalent_is_set(cmd, opt_enum)) + goto check_val; + + return 0; + + /* + * If the definition requires a literal string or number, check + * that the arg value matches. + */ + +check_val: + if (val_bit_is_set(commands[ci].required_opt_args[ro].def.val_bits, conststr_VAL)) { + if (!strcmp(commands[ci].required_opt_args[ro].def.str, arg_str_value(cmd, opt_enum, ""))) + return 1; + + /* Special case: "raid0" (any raid<N>), matches command def "raid" */ + if (!strcmp(commands[ci].required_opt_args[ro].def.str, "raid") && + !strncmp(arg_str_value(cmd, opt_enum, ""), "raid", 4)) + return 1; + + return 0; + } - /* enter the command in the register */ - _create_new_command(name, fn, flags, desc, usagestr, nargs, args); + if (val_bit_is_set(commands[ci].required_opt_args[ro].def.val_bits, constnum_VAL)) { + if (commands[ci].required_opt_args[ro].def.num == arg_int_value(cmd, opt_enum, 0)) + return 1; + return 0; + } + + return 1; } -void lvm_register_commands(void) +static int _command_required_pos_matches(struct cmd_context *cmd, int ci, int rp, char **argv) { -#define xx(a, b, c, d...) _register_command(# a, a, b, c, ## d, \ - driverloaded_ARG, \ - debug_ARG, help_ARG, help2_ARG, \ - version_ARG, verbose_ARG, \ - yes_ARG, \ - quiet_ARG, config_ARG, \ - commandprofile_ARG, \ - profile_ARG, -1); -#include "commands.h" -#undef xx + /* + * rp is the index in required_pos_args[] of the required positional arg. + * The pos values begin with 1, so the first positional arg has + * pos 1, rp 0. + */ + + if (argv[rp]) { + /* FIXME: can we match object type better than just checking something exists? */ + /* Some cases could be validated by looking at defs.types and at the value. */ + return 1; + } + + /* + * If Select is specified as a pos arg, then that pos arg can be + * empty if --select is used. + */ + if ((val_bit_is_set(commands[ci].required_pos_args[rp].def.val_bits, select_VAL)) && + arg_is_set(cmd, select_ARG)) + return 1; + + return 0; } -static struct command *_find_command(const char *name) + +#define HELP_LINE_SIZE 1024 + +static void _print_usage(const char *usage, int only_required) { - int i; - const char *base; + char buf[HELP_LINE_SIZE]; + int optional_ui = 0; + int optional_pos_ui = 0; + int ui; + int bi; + + if (!usage || !strlen(usage)) + return; - base = last_path_component(name); + /* + * copy the required opt_args/pos_args + * + * The optional portions of the usage string are enclosed + * in [] and follow the required portions. + * + * The optional portion begins with [ followed by a space, + * i.e. "[ " to distinguish the option usage which may + * include [ in cases like --option Number[units]. + */ - for (i = 0; i < _cmdline.num_commands; i++) { - if (!strcmp(base, _cmdline.commands[i].name)) + memset(buf, 0, sizeof(buf)); + bi = 0; + + for (ui = 0; ui < strlen(usage); ui++) { + if (!bi && ((usage[ui] == ' ') || (usage[ui] == '\n'))) + continue; + + /* The first "[ " indicates the start of the optional opt_args. */ + if ((usage[ui] == '[') && (usage[ui+1] == ' ')) { + optional_ui = ui; + break; + } + + if (usage[ui] == '\0') + break; + + if (usage[ui] == '(') { + buf[bi++] = '\n'; + buf[bi++] = '\t'; + } + + buf[bi++] = usage[ui]; + + if (usage[ui] == ')') { + buf[bi++] = '\n'; + buf[bi++] = '\t'; + } + + if (usage[ui] == ',') { + buf[bi++] = '\n'; + buf[bi++] = '\t'; + buf[bi++] = ' '; + } + + if (bi == (HELP_LINE_SIZE - 1)) break; } - if (i >= _cmdline.num_commands) - return 0; + /* + * print the required opt_args/pos_args + */ + + if (bi) + log_print("%s", buf); - return _cmdline.commands + i; + if (only_required) + return; + + /* + * copy the optional opt_args + */ + + if (!optional_ui) + goto out; + + memset(buf, 0, sizeof(buf)); + bi = 0; + + for (ui = optional_ui; ui < strlen(usage); ui++) { + + /* The second "[ " indicates the start of the optional pos_args. */ + if ((ui > optional_ui) && (usage[ui] == '[') && (usage[ui+1] == ' ')) { + optional_pos_ui = ui; + break; + } + + if (usage[ui] == '\0') + break; + if (usage[ui] == '\n') + break; + + if (!bi) + buf[bi++] = '\t'; + + buf[bi++] = usage[ui]; + + if (usage[ui] == ',') { + buf[bi++] = '\n'; + buf[bi++] = '\t'; + buf[bi++] = ' '; + } + + if (bi == (HELP_LINE_SIZE - 1)) + break; + } + + /* + * print the optional opt_args + */ + + if (bi) + log_print("%s", buf); + + /* + * copy the optional pos_args + */ + + if (!optional_pos_ui) + goto out; + + memset(buf, 0, sizeof(buf)); + bi = 0; + + for (ui = optional_pos_ui; ui < strlen(usage); ui++) { + if (usage[ui] == '\0') + break; + if (usage[ui] == '\n') + break; + + if (!bi) + buf[bi++] = '\t'; + + buf[bi++] = usage[ui]; + + if (bi == (HELP_LINE_SIZE - 1)) + break; + } + + /* + * print the optional pos_args + */ + + if (bi) + log_print("%s", buf); + out: + return; +} + +static void _print_description(int ci) +{ + const char *desc = _cmdline.commands[ci].desc; + char buf[HELP_LINE_SIZE] = {0}; + int di = 0; + int bi = 0; + + for (di = 0; di < strlen(desc); di++) { + if (desc[di] == '\0') + break; + if (desc[di] == '\n') + continue; + + if (!strncmp(&desc[di], "DESC:", 5)) { + if (bi) { + log_print("%s", buf); + memset(buf, 0, sizeof(buf)); + bi = 0; + } + di += 5; + continue; + } + + if (!bi && desc[di] == ' ') + continue; + + buf[bi++] = desc[di]; + + if (bi == (HELP_LINE_SIZE - 1)) + break; + } + + if (bi) + log_print("%s", buf); +} + +/* + * Match what the user typed with a one specific command definition/prototype + * from commands[]. If nothing matches, it's not a valid command. The match + * is based on command name, required opt args and required pos args. + * + * Find an entry in the commands array that matches based the arg values. + * + * If the cmd has opt or pos args set that are not accepted by command, + * we can: silently ignore them, warn they are not being used, or fail. + * Default should probably be to warn and continue. + * + * For each command[i], check how many required opt/pos args cmd matches. + * Save the command[i] that matches the most. + * + * commands[i].cmd_flags & CMD_FLAG_ONE_REQUIRED_OPT means + * any one item from commands[i].required_opt_args needs to be + * set to match. + * + * required_pos_args[0].types & select_VAL means + * cmd->argv[] in that pos can be NULL if arg_is_set(select_ARG) + */ + +static struct command *_find_command(struct cmd_context *cmd, const char *path, int *argc, char **argv) +{ + const char *name; + int match_count, match_count_ro, match_count_rp, mismatch_count; + int best_i = 0, best_count = 0; + int closest_i = 0, closest_count_ro = 0; + int ro, rp; + int i, j; + int accepted, count; + + name = last_path_component(path); + + for (i = 0; i < COMMAND_COUNT; i++) { + if (strcmp(name, commands[i].name)) + continue; + + /* For help and version just return the first entry with matching name. */ + if (arg_is_set(cmd, help_ARG) || arg_is_set(cmd, help2_ARG) || arg_is_set(cmd, version_ARG)) + return &commands[i]; + + match_count = 0; /* total parameters that match */ + match_count_ro = 0; /* required opt_args that match */ + match_count_rp = 0; /* required pos_args that match */ + mismatch_count = 0; /* total parameters that do not match */ + + /* if the command name alone is enough, then that's a match */ + + if (!commands[i].ro_count && !commands[i].rp_count) + match_count = 1; + + /* match required_opt_args */ + + for (ro = 0; ro < commands[i].ro_count; ro++) { + if (_command_required_opt_matches(cmd, i, ro)) { + /* log_warn("match %d ro opt %d", i, commands[i].required_opt_args[ro].opt); */ + match_count++; + match_count_ro++; + } else { + /* cmd is missing a required opt arg */ + /* log_warn("mismatch %d ro opt %d", i, commands[i].required_opt_args[ro].opt); */ + mismatch_count++; + } + } + + /* + * Special case where missing required_opt_arg's does not matter + * if one required_opt_arg did match. + */ + if (commands[i].cmd_flags & CMD_FLAG_ONE_REQUIRED_OPT) { + if (match_count_ro) { + /* one or more of the required_opt_args is used */ + mismatch_count = 0; + } else { + /* not even one of the required_opt_args is used */ + mismatch_count = 1; + } + } + + /* match required_pos_args */ + + for (rp = 0; rp < commands[i].rp_count; rp++) { + if (_command_required_pos_matches(cmd, i, rp, argv)) { + /* log_warn("match %d rp %d", i, commands[i].required_pos_args[rp].pos); */ + match_count++; + match_count_rp++; + } else { + /* cmd is missing a required pos arg */ + /* log_warn("mismatch %d rp %d", i, commands[i].required_pos_args[rp].pos); */ + mismatch_count++; + } + } + + /* if cmd is missing any required opt/pos args, it can't be this command. */ + + if (mismatch_count) { + /* save "closest" command that doesn't match */ + if (match_count_ro && (match_count_ro > closest_count_ro)) { + closest_i = i; + closest_count_ro = match_count_ro; + } + continue; + } + + if (!match_count) + continue; + + /* Count the command name as a match if all the required opt/pos args match. */ + + if ((commands[i].ro_count || commands[i].rp_count) && + (match_count_ro || match_count_rp)) + match_count++; + + /* log_warn("command %d has match_count %d match_ro %d match_rp %d", + i, match_count, match_count_ro, match_count_rp); */ + + /* + * Choose the best match, which in general is the command with + * the most matching required_{opt,pos}. + */ + + if (!best_count || (match_count > best_count)) { + /* log_warn("best %d has match_count %d match_ro %d match_rp %d", + i, match_count, match_count_ro, match_count_rp); */ + best_i = i; + best_count = match_count; + } + } + + if (!best_count) { + /* cmd did not have all the required opt/pos args of any command */ + log_error("Failed to find a matching command definition."); + if (closest_count_ro) { + log_warn("Closest command usage is:"); + _print_usage(_cmdline.commands[closest_i].usage, 1); + } + return NULL; + } + + /* + * FIXME: should there be a config setting to fail the command if an + * unused option or pos arg is set? Or a user prompt to continue or + * not without the ignored args? There are ad hoc checks in various + * commands to fail sometimes if an unused option or pos arg is set. + * Does this mean a per-command flag is needed to determine if that + * command ignores or fails with unused args? e.g. "pvscan vg" would + * fail based on the vg arg, but now it's just ignored. + */ + + /* + * Warn about options that are set but are not used by the command. + */ + + for (i = 0; i < ARG_COUNT; i++) { + if (!arg_is_set(cmd, i)) + continue; + + accepted = 0; + + /* NB in some cases required_opt_args are optional */ + for (j = 0; j < commands[best_i].ro_count; j++) { + if (commands[best_i].required_opt_args[j].opt == i) { + accepted = 1; + break; + } + } + + if (accepted) + continue; + + for (j = 0; j < commands[best_i].oo_count; j++) { + if (commands[best_i].optional_opt_args[j].opt == i) { + accepted = 1; + break; + } + } + + /* + * --type is one option that when set but not accepted by the + * command, will not be ignored to make a match. Perhaps there + * are others like this, and perhaps this is a property that + * should be encoded in args.h? + */ + if (!accepted && (i == type_ARG)) { + log_error("Failed to find a matching command definition with --type."); + return NULL; + } + + /* --extents is a special case which is accepted in place of --size */ + + if (!accepted && (i != extents_ARG)) { + log_error("Invalid option for the specified command (%s %d): %s.", + commands[best_i].command_line_id, best_i, arg_long_option_name(i)); + return NULL; +#if 0 + log_warn("Ignoring option which is not used by the specified command: %s.", + arg_long_option_name(i)); + /* clear so it can't be used when processing. */ + cmd->opt_arg_values[i].count = 0; + cmd->opt_arg_values[i].value = NULL; +#endif + } + } + + /* + * Warn about positional args that are set but are not used by the command. + * + * If the last required_pos_arg or the last optional_pos_arg may repeat, + * then there won't be unused positional args. + * + * Otherwise, warn about positional args that exist beyond the number of + * required + optional pos_args. + */ + + count = commands[best_i].rp_count; + if (count && (commands[best_i].required_pos_args[count - 1].def.flags & ARG_DEF_FLAG_MAY_REPEAT)) + goto out; + + count = commands[best_i].op_count; + if (count && (commands[best_i].optional_pos_args[count - 1].def.flags & ARG_DEF_FLAG_MAY_REPEAT)) + goto out; + + for (count = 0; ; count++) { + if (!argv[count]) + break; + + if (count >= (commands[best_i].rp_count + commands[best_i].op_count)) { + log_warn("Ignoring positional argument which is not used by this command: %s.", argv[count]); + /* clear so it can't be used when processing. */ + argv[count] = NULL; + (*argc)--; + } + } +out: + log_debug("command line id: %s %d", commands[best_i].command_line_id, best_i); + + return &commands[best_i]; } static void _short_usage(const char *name) @@ -814,110 +1409,221 @@ static void _short_usage(const char *name) log_error("Run `%s --help' for more information.", name); } -static int _usage(const char *name) +static int _usage(const char *name, int help_count) { - struct command *com = _find_command(name); + struct command_name *cname = _find_command_name(name); + const char *usage_common = NULL; + int i; - if (!com) { + if (!cname) { log_print("%s: no such command.", name); return 0; } - log_print("%s: %s\n\n%s", com->name, com->desc, com->usage); + log_print("%s - %s\n", name, cname->desc); + + for (i = 0; i < _cmdline.num_commands; i++) { + if (strcmp(_cmdline.commands[i].name, name)) + continue; + + if (strlen(_cmdline.commands[i].desc)) + _print_description(i); + + usage_common = _cmdline.commands[i].usage_common; + + _print_usage(_cmdline.commands[i].usage, 0); + log_print(" "); /* for built-in \n */ + } + + /* Common options are printed once for all variants of a command name. */ + if (usage_common) { + log_print("Common options:"); + _print_usage(usage_common, 0); + log_print(" "); /* for built-in \n */ + } + + if (help_count > 1) { + /* + * Excluding commonly understood syntax style like the meanings of: + * [ ] for optional, ... for repeatable, | for one of the following, + * -- for an option name, lower case strings and digits for literals. + */ + log_print("Usage notes:"); + log_print(". Variable parameters are: Number, String, PV, VG, LV, Tag."); + log_print(". Select indicates that a required positional parameter can"); + log_print(" be omitted if the --select option is used."); + log_print(". --size Number can be replaced with --extents NumberExtents."); + log_print(". When --name is omitted from lvcreate, a new LV name is"); + log_print(" generated with the \"lvol\" prefix and a unique numeral suffix."); + log_print(". For required options listed in parentheses, e.g. (--A, --B),"); + log_print(" any one is required, after which the others are optional."); + log_print(". The _new suffix indicates the VG or LV must not yet exist."); + log_print(". LV followed by _<type> indicates that an LV of the given type"); + log_print(" is required. (raid represents any raid<N> type.)"); + log_print(". See man pages for short option equivalents of long option names,"); + log_print(" and for more detailed descriptions of variable parameters."); + } + return 1; } /* + * Sets up the arguments to pass to getopt_long(). + * + * getopt_long() takes a string of short option characters + * where the char is followed by ":" if the option takes an arg, + * e.g. "abc:d:" This string is created in optstrp. + * + * getopt_long() also takes an array of struct option which + * has the name of the long option, if it takes an arg, etc, + * e.g. + * + * option long_options[] = { + * { "foo", required_argument, 0, 0 }, + * { "bar", no_argument, 0, 'b' } + * }; + * + * this array is created in longoptsp. + * + * Original comment: * Sets up the short and long argument. If there * is no short argument then the index of the * argument in the the_args array is set as the * long opt value. Yuck. Of course this means we * can't have more than 'a' long arguments. */ -static void _add_getopt_arg(int arg, char **ptr, struct option **o) + +static void _add_getopt_arg(int arg_enum, char **optstrp, struct option **longoptsp) { - struct arg_props *a = _cmdline.arg_props + arg; + struct arg_props *a = _cmdline.arg_props + arg_enum; if (a->short_arg) { - *(*ptr)++ = a->short_arg; + *(*optstrp)++ = a->short_arg; - if (a->fn) - *(*ptr)++ = ':'; + if (a->val_enum) + *(*optstrp)++ = ':'; } #ifdef HAVE_GETOPTLONG + /* long_arg is "--foo", so +2 is the offset of the name after "--" */ + if (*(a->long_arg + 2)) { - (*o)->name = a->long_arg + 2; - (*o)->has_arg = a->fn ? 1 : 0; - (*o)->flag = NULL; + (*longoptsp)->name = a->long_arg + 2; + (*longoptsp)->has_arg = a->val_enum ? 1 : 0; + (*longoptsp)->flag = NULL; + + /* + * When getopt_long() sees an option that has an associated + * single letter, it returns the ascii value of that letter. + * e.g. getopt_long() returns 100 for '-d' or '--debug' + * (100 is the ascii value of 'd'). + * + * When getopt_long() sees an option that does not have an + * associated single letter, it returns the value of the + * the enum for that long option name plus 128. + * e.g. getopt_long() returns 139 for --cachepool + * (11 is the enum value for --cachepool, so 11+128) + */ + if (a->short_arg) - (*o)->val = a->short_arg; + (*longoptsp)->val = a->short_arg; else - (*o)->val = arg + 128; - (*o)++; + (*longoptsp)->val = arg_enum + 128; + (*longoptsp)++; } #endif } -static int _find_arg(struct command *com, int opt) +/* + * getopt_long() has returned goval which indicates which option it's found. + * We need to translate that goval to an enum value from the args array. + * + * For options with both long and short forms, goval is the character value + * of the short option. For options with only a long form, goval is the + * corresponding enum value plus 128. + * + * The trick with character values is that different long options share the + * same single-letter short form. So, we have to translate goval to an + * enum using only the set of valid options for the given command. And, + * a command name is not allowed to use two different long options that + * have the same single-letter short form. + */ + +static int _find_arg(const char *cmd_name, int goval) { - struct arg_props *a; - int i, arg; + struct command_name *cname; + int arg_enum; + int i; - for (i = 0; i < com->num_args; i++) { - arg = com->valid_args[i]; - a = _cmdline.arg_props + arg; + if (!(cname = _find_command_name(cmd_name))) + return -1; - /* - * opt should equal either the - * short arg, or the index into - * the_args. - */ - if ((a->short_arg && (opt == a->short_arg)) || - (!a->short_arg && (opt == (arg + 128)))) - return arg; + for (i = 0; i < cname->num_args; i++) { + arg_enum = cname->valid_args[i]; + + /* assert arg_enum == _cmdline.arg_props[arg_enum].arg_enum */ + + /* the value returned by getopt matches the ascii value of single letter option */ + if (_cmdline.arg_props[arg_enum].short_arg && (goval == _cmdline.arg_props[arg_enum].short_arg)) + return arg_enum; + + /* the value returned by getopt matches the enum value plus 128 */ + if (!_cmdline.arg_props[arg_enum].short_arg && (goval == (arg_enum + 128))) + return arg_enum; } return -1; } -static int _process_command_line(struct cmd_context *cmd, int *argc, - char ***argv) +static int _process_command_line(struct cmd_context *cmd, int *argc, char ***argv) { - int i, opt, arg; char str[((ARG_COUNT + 1) * 2) + 1], *ptr = str; struct option opts[ARG_COUNT + 1], *o = opts; struct arg_props *a; struct arg_values *av; struct arg_value_group_list *current_group = NULL; + struct command_name *cname; + int arg_enum; /* e.g. foo_ARG */ + int goval; /* the number returned from getopt_long identifying what it found */ + int i; + + if (!(cname = _find_command_name(cmd->name))) + return_0; - if (!(cmd->arg_values = dm_pool_zalloc(cmd->mem, sizeof(*cmd->arg_values) * ARG_COUNT))) { + if (!(cmd->opt_arg_values = dm_pool_zalloc(cmd->mem, sizeof(*cmd->opt_arg_values) * ARG_COUNT))) { log_fatal("Unable to allocate memory for command line arguments."); return 0; } - /* fill in the short and long opts */ - for (i = 0; i < cmd->command->num_args; i++) - _add_getopt_arg(cmd->command->valid_args[i], &ptr, &o); + /* + * create the short-form character array (str) and the long-form option + * array (opts) to pass to the getopt_long() function. IOW we generate + * the arguments to pass to getopt_long() from the args.h/arg_props data. + */ + for (i = 0; i < cname->num_args; i++) + _add_getopt_arg(cname->valid_args[i], &ptr, &o); *ptr = '\0'; memset(o, 0, sizeof(*o)); - /* initialise getopt_long & scan for command line switches */ optarg = 0; optind = OPTIND_INIT; - while ((opt = GETOPTLONG_FN(*argc, *argv, str, opts, NULL)) >= 0) { + while ((goval = GETOPTLONG_FN(*argc, *argv, str, opts, NULL)) >= 0) { - if (opt == '?') + if (goval == '?') return 0; - if ((arg = _find_arg(cmd->command, opt)) < 0) { + /* + * translate the option value used by getopt into the enum + * value (e.g. foo_ARG) from the args array. + */ + if ((arg_enum = _find_arg(cmd->name, goval)) < 0) { log_fatal("Unrecognised option."); return 0; } - a = _cmdline.arg_props + arg; + a = _cmdline.arg_props + arg_enum; - av = &cmd->arg_values[arg]; + av = &cmd->opt_arg_values[arg_enum]; if (a->flags & ARG_GROUPABLE) { /* @@ -927,10 +1633,10 @@ static int _process_command_line(struct cmd_context *cmd, int *argc, * - or if argument has higher priority than current group. */ if (!current_group || - (current_group->arg_values[arg].count && !(a->flags & ARG_COUNTABLE)) || + (current_group->arg_values[arg_enum].count && !(a->flags & ARG_COUNTABLE)) || (current_group->prio < a->prio)) { /* FIXME Reduce size including only groupable args */ - if (!(current_group = dm_pool_zalloc(cmd->mem, sizeof(struct arg_value_group_list) + sizeof(*cmd->arg_values) * ARG_COUNT))) { + if (!(current_group = dm_pool_zalloc(cmd->mem, sizeof(struct arg_value_group_list) + sizeof(*cmd->opt_arg_values) * ARG_COUNT))) { log_fatal("Unable to allocate memory for command line arguments."); return 0; } @@ -940,7 +1646,7 @@ static int _process_command_line(struct cmd_context *cmd, int *argc, } /* Maintain total argument count as well as count within each group */ av->count++; - av = ¤t_group->arg_values[arg]; + av = ¤t_group->arg_values[arg_enum]; } if (av->count && !(a->flags & ARG_COUNTABLE)) { @@ -952,7 +1658,7 @@ static int _process_command_line(struct cmd_context *cmd, int *argc, return 0; } - if (a->fn) { + if (a->val_enum) { if (!optarg) { log_error("Option requires argument."); return 0; @@ -960,7 +1666,7 @@ static int _process_command_line(struct cmd_context *cmd, int *argc, av->value = optarg; - if (!a->fn(cmd, av)) { + if (!_val_props[a->val_enum].fn(cmd, av)) { log_error("Invalid argument for %s: %s", a->long_arg, optarg); return 0; } @@ -1002,12 +1708,12 @@ static int _merge_synonym(struct cmd_context *cmd, int oldarg, int newarg) /* Not groupable? */ if (!(_cmdline.arg_props[oldarg].flags & ARG_GROUPABLE)) { if (arg_is_set(cmd, oldarg)) - _copy_arg_values(cmd->arg_values, oldarg, newarg); + _copy_arg_values(cmd->opt_arg_values, oldarg, newarg); return 1; } if (arg_is_set(cmd, oldarg)) - cmd->arg_values[newarg].count = cmd->arg_values[oldarg].count; + cmd->opt_arg_values[newarg].count = cmd->opt_arg_values[oldarg].count; /* Groupable */ dm_list_iterate_items(current_group, &cmd->arg_value_groups) { @@ -1044,15 +1750,10 @@ int version(struct cmd_context *cmd __attribute__((unused)), return ECMD_PROCESSED; } -static int _get_settings(struct cmd_context *cmd) +static void _get_output_settings(struct cmd_context *cmd) { - const char *activation_mode; - - cmd->current_settings = cmd->default_settings; - if (arg_is_set(cmd, debug_ARG)) - cmd->current_settings.debug = _LOG_FATAL + - (arg_count(cmd, debug_ARG) - 1); + cmd->current_settings.debug = _LOG_FATAL + (arg_count(cmd, debug_ARG) - 1); if (arg_is_set(cmd, verbose_ARG)) cmd->current_settings.verbose = arg_count(cmd, verbose_ARG); @@ -1062,6 +1763,19 @@ static int _get_settings(struct cmd_context *cmd) cmd->current_settings.verbose = 0; cmd->current_settings.silent = (arg_count(cmd, quiet_ARG) > 1) ? 1 : 0; } +} + +static void _apply_output_settings(struct cmd_context *cmd) +{ + init_debug(cmd->current_settings.debug); + init_debug_classes_logged(cmd->default_settings.debug_classes); + init_verbose(cmd->current_settings.verbose + VERBOSE_BASE_LEVEL); + init_silent(cmd->current_settings.silent); +} + +static int _get_settings(struct cmd_context *cmd) +{ + const char *activation_mode; if (arg_is_set(cmd, test_ARG)) cmd->current_settings.test = arg_is_set(cmd, test_ARG); @@ -1175,9 +1889,9 @@ static int _get_settings(struct cmd_context *cmd) !_merge_synonym(cmd, raidwritebehind_ARG, writebehind_ARG)) return EINVALID_CMD_LINE; - if ((!strncmp(cmd->command->name, "pv", 2) && + if ((!strncmp(cmd->name, "pv", 2) && !_merge_synonym(cmd, metadatacopies_ARG, pvmetadatacopies_ARG)) || - (!strncmp(cmd->command->name, "vg", 2) && + (!strncmp(cmd->name, "vg", 2) && !_merge_synonym(cmd, metadatacopies_ARG, vgmetadatacopies_ARG))) return EINVALID_CMD_LINE; @@ -1188,7 +1902,10 @@ static int _get_settings(struct cmd_context *cmd) static int _process_common_commands(struct cmd_context *cmd) { if (arg_is_set(cmd, help_ARG) || arg_is_set(cmd, help2_ARG)) { - _usage(cmd->command->name); + _usage(cmd->name, arg_count(cmd, help_ARG)); + + if (arg_count(cmd, help_ARG) < 2) + log_print("(Use --help --help for usage notes.)"); return ECMD_PROCESSED; } @@ -1208,10 +1925,10 @@ static void _display_help(void) log_error("Use 'lvm help <command>' for more information"); log_error(" "); - for (i = 0; i < _cmdline.num_commands; i++) { - struct command *com = _cmdline.commands + i; + for (i = 0; i < _cmdline.num_command_names; i++) { + struct command_name *cname = _cmdline.command_names + i; - log_error("%-16.16s%s", com->name, com->desc); + log_error("%-16.16s%s", cname->name, cname->desc); } } @@ -1224,7 +1941,7 @@ int help(struct cmd_context *cmd __attribute__((unused)), int argc, char **argv) else { int i; for (i = 0; i < argc; i++) - if (!_usage(argv[i])) + if (!_usage(argv[i], 0)) ret = EINVALID_CMD_LINE; } @@ -1233,10 +1950,6 @@ int help(struct cmd_context *cmd __attribute__((unused)), int argc, char **argv) static void _apply_settings(struct cmd_context *cmd) { - init_debug(cmd->current_settings.debug); - init_debug_classes_logged(cmd->default_settings.debug_classes); - init_verbose(cmd->current_settings.verbose + VERBOSE_BASE_LEVEL); - init_silent(cmd->current_settings.silent); init_test(cmd->current_settings.test); init_full_scan_done(0); init_mirror_in_sync(0); @@ -1431,7 +2144,7 @@ static int _prepare_profiles(struct cmd_context *cmd) log_debug(_setting_global_profile_msg, _command_profile_source_name, profile->name); cmd->profile_params->global_command_profile = profile; - if (!cmd->arg_values) + if (!cmd->opt_arg_values) cmd->profile_params->shell_profile = profile; } @@ -1515,6 +2228,8 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv) /* each command should start out with sigint flag cleared */ sigint_clear(); + cmd->name = strdup(argv[0]); + /* eliminate '-' from all options starting with -- */ for (i = 1; i < argc; i++) { @@ -1548,20 +2263,30 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv) *arg_new = '\0'; } + /* The cmd_line string is only used for logging, not processing. */ if (!(cmd->cmd_line = _copy_command_line(cmd, argc, argv))) return_ECMD_FAILED; - log_debug("Parsing: %s", cmd->cmd_line); - - if (!(cmd->command = _find_command(argv[0]))) - return ENO_SUCH_CMD; - if (!_process_command_line(cmd, &argc, &argv)) { log_error("Error during parsing of command line."); return EINVALID_CMD_LINE; } - set_cmd_name(cmd->command->name); + /* + * log_debug() can be enabled now that we know the settings + * from the command. Previous calls to log_debug() will + * do nothing. + */ + cmd->current_settings = cmd->default_settings; + _get_output_settings(cmd); + _apply_output_settings(cmd); + + log_debug("Parsing: %s", cmd->cmd_line); + + if (!(cmd->command = _find_command(cmd, cmd->name, &argc, argv))) + return EINVALID_CMD_LINE; + + set_cmd_name(cmd->name); if (arg_is_set(cmd, backgroundfork_ARG)) { if (!become_daemon(cmd, 1)) { @@ -1717,10 +2442,12 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv) } } - /* - * FIXME Break up into multiple functions. - */ - ret = cmd->command->fn(cmd, argc, argv); + if (cmd->command->functions) + /* A command-line--specific function is used */ + ret = cmd->command->functions->fn(cmd, argc, argv); + else + /* The old style command-name function is used */ + ret = cmd->command->fn(cmd, argc, argv); lvmlockd_disconnect(); fin_locking(); @@ -2040,23 +2767,8 @@ struct cmd_context *init_lvm(unsigned set_connections, unsigned set_filters) return cmd; } -static void _fin_commands(void) -{ - int i; - - for (i = 0; i < _cmdline.num_commands; i++) - dm_free(_cmdline.commands[i].valid_args); - - dm_free(_cmdline.commands); - - _cmdline.commands = NULL; - _cmdline.num_commands = 0; - _cmdline.commands_size = 0; -} - void lvm_fin(struct cmd_context *cmd) { - _fin_commands(); destroy_toolcontext(cmd); udev_fin_library_context(); } @@ -2203,6 +2915,7 @@ int lvm2_main(int argc, char **argv) return -1; cmd->argv = argv; + lvm_register_commands(); if (_lvm1_fallback(cmd)) { diff --git a/tools/toollib.c b/tools/toollib.c index 9763362d0..3a7904392 100644 --- a/tools/toollib.c +++ b/tools/toollib.c @@ -2350,8 +2350,12 @@ int process_each_lv_in_vg(struct cmd_context *cmd, struct volume_group *vg, struct dm_str_list *sl; struct dm_list final_lvs; struct lv_list *final_lvl; + struct dm_list found_arg_lvnames; struct glv_list *glvl, *tglvl; int do_report_ret_code = 1; + uint32_t lv_types; + struct logical_volume *lv; + struct lv_segment *seg; log_set_report_object_type(LOG_REPORT_OBJECT_TYPE_LV); @@ -2360,6 +2364,7 @@ int process_each_lv_in_vg(struct cmd_context *cmd, struct volume_group *vg, stack; dm_list_init(&final_lvs); + dm_list_init(&found_arg_lvnames); if (!vg_check_status(vg, EXPORTED_VG)) { ret_max = ECMD_FAILED; @@ -2453,6 +2458,7 @@ int process_each_lv_in_vg(struct cmd_context *cmd, struct volume_group *vg, if (lvargs_supplied && str_list_match_item(arg_lvnames, lvl->lv->name)) { /* Remove LV from list of unprocessed LV names */ str_list_del(arg_lvnames, lvl->lv->name); + str_list_add(cmd->mem, &found_arg_lvnames, lvl->lv->name); process_lv = 1; } @@ -2500,6 +2506,64 @@ int process_each_lv_in_vg(struct cmd_context *cmd, struct volume_group *vg, if (lv_is_removed(lvl->lv)) continue; + /* + * If the command definition specifies one required positional + * LV (possibly repeatable), and specifies accepted LV types, + * then verify that the LV being processed matches one of those + * types. + * + * process_each_lv() can only be used for commands that have + * one positional LV arg (optionally repeating, where each is + * processed independently.) It cannot work for commands that + * have different required LVs in designated positions, like + * 'lvrename LV1 LV2', where each LV is not processed + * independently. That means that this LV type check only + * needs to check the lv_type of the first positional arg. + * + * There is one command that violates this rule by stealing + * the first positional LV arg before calling process_each_lv: + * lvconvert --type snapshot LV_linear_striped_raid LV_snapshot + * This code cannot validate that case. process_each_lv() sees + * a single LV name arg, but it's in pos 2. Could we work around + * this by looking at the final positional arg rather than always + * looking at pos 1? + * + * This only validates types for required LV positional args + * (currently there are no command specifications that include + * specific LV types in optional positional args.) + */ + + if ((cmd->command->rp_count == 1) && + val_bit_is_set(cmd->command->required_pos_args[0].def.val_bits, lv_VAL) && + cmd->command->required_pos_args[0].def.lv_types) { + + lv_types = cmd->command->required_pos_args[0].def.lv_types; + lv = lvl->lv; + seg = first_seg(lv); + + if ((lv_is_cow(lv) && !(lv_types & ARG_DEF_LV_SNAPSHOT)) || + (lv_is_thin_volume(lv) && !(lv_types & ARG_DEF_LV_THIN)) || + (lv_is_thin_pool(lv) && !(lv_types & ARG_DEF_LV_THINPOOL)) || + (lv_is_cache(lv) && !(lv_types & ARG_DEF_LV_CACHE)) || + (lv_is_cache_pool(lv) && !(lv_types & ARG_DEF_LV_CACHEPOOL)) || + (lv_is_mirror(lv) && !(lv_types & ARG_DEF_LV_MIRROR)) || + (lv_is_raid(lv) && !(lv_types & (ARG_DEF_LV_RAID | ARG_DEF_LV_RAID0 | ARG_DEF_LV_RAID1 | ARG_DEF_LV_RAID4 | ARG_DEF_LV_RAID5 | ARG_DEF_LV_RAID6 | ARG_DEF_LV_RAID10))) || + (segtype_is_striped(seg->segtype) && !(lv_types & ARG_DEF_LV_STRIPED)) || + (segtype_is_linear(seg->segtype) && !(lv_types & ARG_DEF_LV_LINEAR))) { + /* + * If a named LV arg cannot be processed it's an error, otherwise + * the LV is skipped and doesn't cause the command to fail. + */ + if (str_list_match_item(&found_arg_lvnames, lv->name)) { + log_error("Operation not permitted on LV %s with type %s.", display_lvname(lv), seg->segtype->name); + ret_max = ECMD_FAILED; + } else { + log_warn("Operation not permitted on LV %s with type %s.", display_lvname(lv), seg->segtype->name); + } + continue; + } + } + log_very_verbose("Processing LV %s in VG %s.", lvl->lv->name, vg->name); ret = process_single_lv(cmd, lvl->lv, handle); diff --git a/tools/tools.h b/tools/tools.h index f6d224fb1..de56a9fb1 100644 --- a/tools/tools.h +++ b/tools/tools.h @@ -50,20 +50,27 @@ #define CMD_LEN 256 #define MAX_ARGS 64 -/* command functions */ -typedef int (*command_fn) (struct cmd_context * cmd, int argc, char **argv); - -#define xx(a, b...) int a(struct cmd_context *cmd, int argc, char **argv); -#include "commands.h" -#undef xx +/* define the enums for the values accepted by command line --options */ +enum { +#define val(a, b, c, d) a , +#include "vals.h" +#undef val +}; -/* define the enums for the command line switches */ +/* define the enums for the command line --options */ enum { #define arg(a, b, c, d, e, f) a , #include "args.h" #undef arg }; +/* command functions */ +#define xx(a, b...) int a(struct cmd_context *cmd, int argc, char **argv); +#include "commands.h" +#undef xx + +#include "command.h" + #define ARG_COUNTABLE 0x00000001 /* E.g. -vvvv */ #define ARG_GROUPABLE 0x00000002 /* E.g. --addtag */ @@ -79,13 +86,13 @@ struct arg_values { /* void *ptr; // Currently not used. */ }; -/* a global table of possible arguments */ +/* a global table of possible --option's */ struct arg_props { + int arg_enum; /* foo_ARG from args.h */ const char short_arg; char _padding[7]; const char *long_arg; - - int (*fn) (struct cmd_context *cmd, struct arg_values *av); + int val_enum; /* foo_VAL from vals.h */ uint32_t flags; uint32_t prio; }; @@ -96,6 +103,14 @@ struct arg_value_group_list { uint32_t prio; }; +/* a global table of possible --option values */ +struct val_props { + int val_enum; /* foo_VAL from vals.h */ + int (*fn) (struct cmd_context *cmd, struct arg_values *av); + const char *name; + const char *usage; +}; + #define CACHE_VGMETADATA 0x00000001 #define PERMITTED_READ_ONLY 0x00000002 /* Process all VGs if none specified on the command line. */ @@ -118,19 +133,6 @@ struct arg_value_group_list { #define ENABLE_DUPLICATE_DEVS 0x00000400 /* Command does not accept tags as args. */ #define DISALLOW_TAG_ARGS 0x00000800 - -/* a register of the lvm commands */ -struct command { - const char *name; - const char *desc; - const char *usage; - command_fn fn; - - unsigned flags; - - int num_args; - int *valid_args; -}; void usage(const char *name); diff --git a/tools/vals.h b/tools/vals.h new file mode 100644 index 000000000..8f7759ef4 --- /dev/null +++ b/tools/vals.h @@ -0,0 +1,136 @@ + +/* + * Define value types which describe values accepted + * by the --option's in args.h, and can also describe + * the values accepted as positional args. + * + * Previously, accepted values were only "described" + * by identifying the parsing function to use. + * + * Some standard val types are used by many options, + * e.g. many options (aa_ARG, bb_ARG, cc_ARG) all + * accept a number_VAL. + * + * Other special val types are used by only one option, + * e.g. only mirrorlog_ARG accepts a mirrorlog_VAL. + * This typically means that there are some specific + * words that are recognized after the option. + * + * Some options currently take a standard val type, + * (esp string_VAL), but they could be given their + * own custom val type. The advantage of using a + * custom val type is the possibility of validating + * the value when parsing it with a custom parsing + * function, and the possibility of displaying the + * actual accepted values in the command usage. + * Without a custom val type, the code must do ad hoc + * validation of the string values, and the usage + * output for the option will only say "String" + * rather than giving the accepted string values. + * Even without a custom parsing function, there is + * reason to define a custom x_VAL enum so that a + * more descriptive usage string can be specified + * as opposed to just "String". + * + * Most of the val types defined here are used after + * --option's, and are referenced in foo_ARG entries + * in args.h. But, some val types are only used to + * represent positional values in command definitions, + * e.g. vg_VAL. + * + * val(a, b, c, d) + * + * a: foo_VAL enums + * b: the function to parse and set the value + * c: the name used to reference this value in command defs + * d: what to display in usage output for this value + * + * command defintions will use --option NAME, where NAME + * is shown in val() field c. NAME will be translated to + * foo_VAL enum in field a, which is used in commands[] + * structs. + * + * option definitions (arg.h) will reference foo_VAL enum + * in field a. + * + * FIXME: for specialized val types, the set of recognized + * words is not defined or stored in a consistent way, + * but is just whatever the parsing function happens to look + * for, so adding a new accepted value for the val type is + * often just making the parsing function recognize a new + * word. This new word should then also be added to the + * usage string for the val type here. It would be nice + * if the accepted values could be defined in a more + * consistent way, perhaps in struct val_props. + * + * The usage text for an option is not always the full + * set of words accepted for an option, but may be a + * subset. i.e. an outdated word that no longer does + * anything may not be shown, but may still be recognized + * and ignored, or an option that shouldn't be used in + * general isn't shown to avoid suggesting it. + * e.g. for --activate we show the most common "y|n|ay" + * without showing the lvmlockd variations "ey|sy" which + * are not applicable in general. + * + * FIXME: are there some specialized or irrelevant + * options included in the usage text below that should + * be removed? Should "lvm1" be removed? + * + * For Number args that take optional units, a full usage + * could be "Number[bBsSkKmMgGtTpPeE]" (with implied |), + * but repeating this full specification produces cluttered + * output, and doesn't indicate which unit is the default. + * "Number[units]" would be cleaner, as would a subset of + * common units, e.g. "Number[kmg...]", but neither helps + * with default. "Number[k|unit]" and "Number[m|unit]" show + * the default, and "unit" indicates that other units + * are possible without listing them all. This also + * suggests using the preferred lower case letters, because + * --size and other option args treat upper/lower letters + * the same, all as 1024 SI base. For this reason, we + * should avoid suggesting the upper case letters. + */ + +val(none_VAL, NULL, "None", "") /* unused, for enum value 0 */ +val(conststr_VAL, NULL, "ConstString", "") /* used only for command defs */ +val(constnum_VAL, NULL, "ConstNumber", "") /* used only for command defs */ +val(bool_VAL, yes_no_arg, "Bool", "y|n") +val(number_VAL, int_arg, "Number", NULL) +val(string_VAL, string_arg, "String", NULL) +val(vg_VAL, string_arg, "VG", NULL) +val(lv_VAL, string_arg, "LV", NULL) +val(pv_VAL, string_arg, "PV", NULL) +val(tag_VAL, tag_arg, "Tag", NULL) +val(select_VAL, NULL, "Select", NULL) /* used only for command defs */ +val(activationmode_VAL, string_arg, "ActivationMode", "partial|degraded|complete") +val(activation_VAL, activation_arg, "Active", "y|n|ay") +val(cachemode_VAL, cachemode_arg, "CacheMode", "writethrough|writeback") +val(discards_VAL, discards_arg, "Discards", "passdown|nopassdown|ignore") +val(mirrorlog_VAL, mirrorlog_arg, "MirrorLog", "core|disk") +val(sizekb_VAL, size_kb_arg, "SizeKB", "Number[k|unit]") +val(sizemb_VAL, size_mb_arg, "SizeMB", "Number[m|unit]") +val(numsigned_VAL, int_arg_with_sign, "SNumber", "[+|-]Number") +val(numsignedper_VAL, int_arg_with_sign_and_percent, "SNumberP", "[+|-]Number[%{VG|PVS|FREE}]") +val(permission_VAL, permission_arg, "Permission", "rw|r") +val(metadatatype_VAL, metadatatype_arg, "MetadataType", "lvm2|lvm1") +val(units_VAL, string_arg, "Units", "hHbBsSkKmMgGtTpPeE") +val(segtype_VAL, segtype_arg, "SegType", "linear|striped|snapshot|mirror|raid*|thin|cache|thin-pool|cache-pool") +/* FIXME: cling_by_tags is left out of help text because it makes the line wrap */ +val(alloc_VAL, alloc_arg, "Alloc", "contiguous|cling|normal|anywhere|inherit") +val(locktype_VAL, locktype_arg, "LockType", "sanlock|dlm|none") +val(readahead_VAL, readahead_arg, "Readahead", "auto|none|NumberSectors") +val(metadatacopies_VAL, metadatacopies_arg, "MetadataCopies", "all|unmanaged|Number") + +/* this should always be last */ +val(VAL_COUNT, NULL, NULL, NULL) + +/* + * I suspect many of the following are good candidates for a custom VAL enum + * for the benefit of custom parsing, or custom usage, or both: + * + * configreport_ARG, configtype_ARG, polloperation_ARG, raidrebuild_ARG, + * raidsyncaction_ARG, raidwritemostly_ARG, reportformat_ARG, syncaction_ARG, + * cachepolicy_ARG, cachesettings_ARG, writemostly_ARG + */ + |