Linux "vgsplit" Command Line Options and Examples
Move physical volumes into a new or existing volume group

vgsplit moves one or more PVs from a source VG to a destination VG. The PVs can be specified explicitly or implicitly by naming an LV, in which case on PVs underlying the LV are moved. If the destination VG does not exist, a new VG is created (command options can be used to specify properties of the new VG, also see vgcreate(8).


Usage:

vgsplit option_args position_args
      [ option_args ]






Command Line Options:

--alloc
Determines the allocation policy when a command needs to allocate Physical Extents (PEs) from the VG.Each VG and LV has an allocation policy which can be changed with vgchange/lvchange, or overriden onthe command line. normal applies common sense rules such as not placing parallel stripes on the samePV. inherit applies the VG policy to an LV. contiguous requires new PEs be placed adjacent to exist‐ing PEs. cling places new PEs on the same PV as existing PEs in the same stripe of the LV. If thereare sufficient PEs for an allocation, but normal does not use them, anywhere will use them even if itreduces performance, e.g. by placing two stripes on the same PV. Optional positional PV args on thecommand line can also be used to limit which PVs the command will use for allocation. See lvm(8) formore information about allocation.
vgsplit --alloc ...
-A|--autobackup
Specifies if metadata should be backed up automatically after a change. Enabling this is stronglyadvised! See vgcfgbackup(8) for more information.
vgsplit -A|--autobackup ...
-c|--clustered
Specifies the clustered property of the new VG.
vgsplit -c|--clustered ...
--commandprofile
The command profile to use for command configuration. See lvm.conf(5) for more information about pro‐files.
vgsplit --commandprofile ...
--config
Config settings for the command. These override lvm.conf settings. The String arg uses the same formatas lvm.conf, or may use section/field syntax. See lvm.conf(5) for more information about config.
vgsplit --config ...
-d|--debug
Set debug level. Repeat from 1 to 6 times to increase the detail of messages sent to the log fileand/or syslog (if configured).
vgsplit -d|--debug ...
--driverloaded
If set to no, the command will not attempt to use device-mapper. For testing and debugging.
vgsplit --driverloaded ...
-h|--help
Display help text.
vgsplit -h|--help ...
--longhelp
Display long help text.
vgsplit --longhelp ...
-l|--maxlogicalvolumes
Sets the maximum number of LVs allowed in a VG.
vgsplit -l|--maxlogicalvolumes ...
-p|--maxphysicalvolumes
Sets the maximum number of PVs that can belong to the VG. The value 0 removes any limitation. Forlarge numbers of PVs, also see options --pvmetadatacopies, and --vgmetadatacopies for improving perfor‐mance.
vgsplit -p|--maxphysicalvolumes ...
-M|--metadatatype
Specifies the type of on-disk metadata to use. lvm2 (or just 2) is the current, standard format. lvm1(or just 1) is a historical format that can be used for accessing old data.
vgsplit -M|--metadatatype ...
-n|--name
Move only PVs used by the named LV.
vgsplit -n|--name ...
--profile
An alias for --commandprofile or --metadataprofile, depending on the command.
vgsplit --profile ...
-q|--quiet
Suppress output and log messages. Overrides --debug and --verbose. Repeat once to also suppress anyprompts with answer 'no'.
vgsplit -q|--quiet ...
-t|--test
Run in test mode. Commands will not update metadata. This is implemented by disabling all metadatawriting but nevertheless returning success to the calling function. This may lead to unusual error mes‐sages in multi-stage operations if a tool relies on reading back metadata it believes has changed buthasn't.
vgsplit -t|--test ...
-v|--verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail of messages sent to stdout andstderr.
vgsplit -v|--verbose ...
--version
Display version information.
vgsplit --version ...
--[vg]metadatacopies
Number of copies of the VG metadata that are kept. VG metadata is kept in VG metadata areas on PVs inthe VG, i.e. reserved space at the start and/or end of the PVs. Keeping a copy of the VG metadata onevery PV can reduce performance in VGs containing a large number of PVs. When this number is set to anon-zero value, LVM will automatically choose PVs on which to store metadata, using the metadataignoreflags on PVs to achieve the specified number. The number can also be replaced with special string val‐ues: unmanaged causes LVM to not automatically manage the PV metadataignore flags. all causes LVM tofirst clear the metadataignore flags on all PVs, and then to become unmanaged.
vgsplit --[vg]metadatacopies ...
-y|--yes
Do not prompt for confirmation interactively but always assume the answer yes. Use with extreme cau‐tion. (For automatic no, see -qq.)VARIABLESVGVolume Group name. See lvm(8) for valid names.PVPhysical Volume name, a device path under /dev. For commands managing physical extents, a PV posi‐tional arg generally accepts a suffix indicating a range (or multiple ranges) of physical extents(PEs). When the first PE is omitted, it defaults to the start of the device, and when the last PE isomitted it defaults to end. Start and end range (inclusive): PV[:PE-PE]... Start and length range(counting from 0): PV[:PE+PE]...StringSee the option description for information about the string content.Size[UNIT]Size is an input number that accepts an optional unit. Input units are always treated as base two val‐ues, regardless of capitalization, e.g. 'k' and 'K' both refer to 1024. The default input unit isspecified by letter, followed by |UNIT. UNIT represents other possible input units: bBsSkKmMgGtTpPeE.b|B is bytes, s|S is sectors of 512 bytes, k|K is kilobytes, m|M is megabytes, g|G is gigabytes, t|T isterabytes, p|P is petabytes, e|E is exabytes. (This should not be confused with the output control
vgsplit -y|--yes ...
--units,
ENVIRONMENT VARIABLESSee lvm(8) for information about environment variables used by lvm. For example, LVM_VG_NAME can generally besubstituted for a required VG parameter.
vgsplit --units, ...