lvdisplay

title: lvdisplay(8)

text:
# lvdisplay(8)

## NAME
lvdisplay — Display information about a logical volume

## SYNOPSIS
lvdisplay option_args

[ option_args ]

[ position_args ]

--aligned

-a|--all

--binary

-c|--colon

-C|--columns

--commandprofile String

--config String

--configreport log|vg|lv|pv|pvseg|seg

-d|--debug

--devices PV

--devicesfile String

--driverloaded y|n

--foreign

--headings none|abbrev|full|0|1|2

-h|--help

-H|--history

--ignorelockingfailure

--journal String

--lockopt String

--logonly

--longhelp

-m|--maps

--nameprefixes

--noheadings

--nohints

--nolocking

--nosuffix

-o|--options String

--profile String

-q|--quiet

--readonly

--reportformat basic|json|json_std

--rows

--segments

-S|--select String

--separator String

--shared

-O|--sort String

-t|--test

--unbuffered

--units [Number]r|R|h|H|b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E

--unquoted

-v|--verbose

--version

-y|--yes

## DESCRIPTION
lvdisplay shows the attributes of LVs, like size, read/write status, snapshot information, etc.

lvs(8) is a preferred alternative that shows the same information and more, using a more compact and configurable output format.

## USAGE
lvdisplay

[ -m|--maps ]

[ COMMON_OPTIONS ]

[ VG|LV|Tag ... ]

—

Display output in columns like lvs.

lvdisplay -C|--columns

[ -o|--options String ]

[ -O|--sort String ]

[ --aligned ]

[ --binary ]

[ --headings none|abbrev|full|0|1|2 ]

[ --nameprefixes ]

[ --noheadings ]

[ --nosuffix ]

[ --rows ]

[ --separator String ]

[ --unbuffered ]

[ --unquoted ]

[ COMMON_OPTIONS ]

[ VG|LV|Tag ... ]

—

Generate colon separated output.

lvdisplay -c|--colon

[ COMMON_OPTIONS ]

[ VG|LV|Tag ... ]

—

Common options for command:

[ -a|--all ]

[ -H|--history ]

[ -S|--select String ]

[ --configreport log|vg|lv|pv|pvseg|seg ]

[ --foreign ]

[ --ignorelockingfailure ]

[ --logonly ]

[ --readonly ]

[ --reportformat basic|json|json_std ]

[ --segments ]

[ --shared ]

[ --units [Number]r|R|h|H|b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E ]

Common options for lvm:

[ -d|--debug ]

[ -h|--help ]

[ -q|--quiet ]

[ -t|--test ]

[ -v|--verbose ]

[ -y|--yes ]

[ --commandprofile String ]

[ --config String ]

[ --devices PV ]

[ --devicesfile String ]

[ --driverloaded y|n ]

[ --journal String ]

[ --lockopt String ]

[ --longhelp ]

[ --nohints ]

[ --nolocking ]

[ --profile String ]

[ --version ]

## OPTIONS
--aligned

Use with --separator to align the output columns

-a|--all

Show information about internal LVs. These are components of normal LVs, such as mirrors, which are not independently accessible, e.g. not mountable.

--binary

Use binary values "0" or "1" instead of descriptive literal values for columns that have exactly two valid values to report (not counting the "unknown" value which denotes that the value could not be determined).

-c|--colon

Generate colon separated output for easier parsing in scripts or programs. Also see lvs(8) which provides considerably more control over the output. The values are:

• logical volume name

• volume group name

• logical volume access

• logical volume status

• internal logical volume number

• open count of logical volume

• logical volume size in sectors

• current logical extents associated to logical volume

• allocated logical extents of logical volume

• allocation policy of logical volume

• read ahead sectors of logical volume

• major device number of logical volume

• minor device number of logical volume

-C|--columns

Display output in columns. The equivalent of lvs(8). Options listed are the same as options given in lvs(8).

--commandprofile String

The command profile to use for command configuration. See lvm.conf(5) for more information about profiles.

--config String

Config settings for the command. These override lvm.conf(5) settings. The String arg uses the same format as lvm.conf(5), or may use section/field syntax. See lvm.conf(5) for more information about config.

--configreport log|vg|lv|pv|pvseg|seg

See lvmreport(7).

-d|--debug ...

Set debug level. Repeat from 1 to 6 times to increase the detail of messages sent to the log file and/or syslog (if configured).

--devices PV

Restricts the devices that are visible and accessible to the command. Devices not listed will appear to be missing. This option can be repeated, or accepts a comma separated list of devices. This overrides the devices file.

--devicesfile String

A file listing devices that LVM should use. The file must exist in /etc/lvm/devices/ and is managed with the lvmdevices(8) command. This overrides the lvm.conf(5) devices/devicesfile and devices/use_devicesfile settings.

--driverloaded y|n

If set to no, the command will not attempt to use device-mapper. For testing and debugging.

--foreign

Report/display foreign VGs that would otherwise be skipped. See lvmsystemid(7) for more information about foreign VGs.

--headings none|abbrev|full|0|1|2

Type of headings to use in report output. none or 0: No headings. abbrev or 1: Column name abbreviations. full or 2: Full column names.

-h|--help

Display help text.

-H|--history

Include historical LVs in the output. (This has no effect unless LVs were removed while lvm.conf(5) metadata/record_lvs_history was enabled.

--ignorelockingfailure

Allows a command to continue with read-only metadata operations after locking failures.

--journal String

Record information in the systemd journal. This information is in addition to information enabled by the lvm.conf log/journal setting. command: record information about the command. output: record the default command output. debug: record full command debugging.

--lockopt String

Used to pass options for special cases to lvmlockd. See lvmlockd(8) for more information.

--logonly

Suppress command report and display only log report.

--longhelp

Display long help text.

-m|--maps

Display the mapping of logical extents to PVs and physical extents. To map physical extents to logical extents use: pvs --segments -o+lv_name,seg_start_pe,segtype

--nameprefixes

Add an "LVM2_" prefix plus the field name to the output. Useful with --noheadings to produce a list of field=value pairs that can be used to set environment variables (for example, in udev rules).

--noheadings

Suppress the headings line that is normally the first line of output. Useful if grepping the output.

--nohints

Do not use the hints file to locate devices for PVs. A command may read more devices to find PVs when hints are not used. The command will still perform standard hint file invalidation where appropriate.

--nolocking

Disable locking. Use with caution, concurrent commands may produce incorrect results.

--nosuffix

Suppress the suffix on output sizes. Use with --units (except h and H) if processing the output.

-o|--options String

Comma-separated, ordered list of fields to display in columns. String arg syntax is: [+|-|#]Field1[,Field2 ...] The prefix + will append the specified fields to the default fields, - will remove the specified fields from the default fields, and # will compact specified fields (removing them when empty for all rows.) Use -o help to view the list of all available fields. Use separate lists of fields to add, remove or compact by repeating the -o option: -o+field1,field2 -o-field3,field4 -o#field5. These lists are evaluated from left to right. Use field name lv_all to view all LV fields, vg_all all VG fields, pv_all all PV fields, pvseg_all all PV segment fields, seg_all all LV segment fields, and pvseg_all all PV segment columns. See the lvm.conf(5) report section for more config options. See lvmreport(7) for more information about reporting.

--profile String

An alias for --commandprofile or --metadataprofile, depending on the command.

-q|--quiet ...

Suppress output and log messages. Overrides --debug and --verbose. Repeat once to also suppress any prompts with answer 'no'.

--readonly

Prevent the command from making changes, including activation and metadata updates. (See --permission r for read only LVs.)

--reportformat basic|json|json_std

Overrides current output format for reports which is defined globally by the report/output_format setting in lvm.conf(5). basic is the original format with columns and rows. If there is more than one report per command, each report is prefixed with the report name for identification. json produces report output in JSON format. json_std produces report output in JSON format which is more compliant with JSON standard. See lvmreport(7) for more information.

--rows

Output columns as rows.

--segments

-S|--select String

Select objects for processing and reporting based on specified criteria. The criteria syntax is described by --select help and lvmreport(7). For reporting commands, one row is displayed for each object matching the criteria. See --options help for selectable object fields. Rows can be displayed with an additional "selected" field (-o selected) showing 1 if the row matches the selection and 0 otherwise. For non-reporting commands which process LVM entities, the selection is used to choose items to process.

--separator String

String to use to separate each column. Useful if grepping the output.

--shared

Report/display shared VGs that would otherwise be skipped when lvmlockd is not being used on the host. See lvmlockd(8) for more information about shared VGs.

-O|--sort String

Comma-separated ordered list of columns to sort by. Replaces the default selection. Precede any column with - for a reverse sort on that column.

-t|--test

Run in test mode. Commands will not update metadata. This is implemented by disabling all metadata writing but nevertheless returning success to the calling function. This may lead to unusual error messages in multi-stage operations if a tool relies on reading back metadata it believes has changed but hasn't.

--unbuffered

Produce output immediately without sorting or aligning the columns properly.

--units [Number]r|R|h|H|b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E

All sizes are output in these units: human-(r)eadable with '<' rounding indicator, (h)uman-readable, (b)ytes, (s)ectors, (k)ilobytes, (m)egabytes, (g)igabytes, (t)erabytes, (p)etabytes, (e)xabytes. Capitalise to use multiples of 1000 (S.I.) instead of 1024. Custom units can be specified, e.g. --units 3M.

--unquoted

When used with --nameprefixes, output values in the field=value pairs are not quoted.

-v|--verbose ...

Set verbose level. Repeat from 1 to 4 times to increase the detail of messages sent to stdout and stderr.

--version

Display version information.

-y|--yes

Do not prompt for confirmation interactively but always assume the answer yes. Use with extreme caution. (For automatic no, see -qq.)

## VARIABLES
VG

Volume Group name. See lvm(8) for valid names.

LV

Logical Volume name. See lvm(8) for valid names. An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.

Tag

Tag name. See lvm(8) for information about tag names and using tags in place of a VG, LV or PV.

String

See 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 values, regardless of capitalization, e.g. 'k' and 'K' both refer to 1024. The default input unit is specified by letter, followed by |UNIT. UNIT represents other possible input units: b|B is bytes, s|S is sectors of 512 bytes, k|K is KiB, m|M is MiB, g|G is GiB, t|T is TiB, p|P is PiB, e|E is EiB. (This should not be confused with the output control --units, where capital letters mean multiple of 1000.)

## ENVIRONMENT VARIABLES
See lvm(8) for information about environment variables used by lvm. For example, LVM_VG_NAME can generally be substituted for a required VG parameter.

## SEE ALSO
lvm(8), lvm.conf(5), lvmconfig(8), lvmdevices(8),

pvchange(8), pvck(8), pvcreate(8), pvdisplay(8), pvmove(8), pvremove(8), pvresize(8), pvs(8), pvscan(8),

vgcfgbackup(8), vgcfgrestore(8), vgchange(8), vgck(8), vgcreate(8), vgconvert(8), vgdisplay(8), vgexport(8), vgextend(8), vgimport(8), vgimportclone(8), vgimportdevices(8), vgmerge(8), vgmknodes(8), vgreduce(8), vgremove(8), vgrename(8), vgs(8), vgscan(8), vgsplit(8),

lvcreate(8), lvchange(8), lvconvert(8), lvdisplay(8), lvextend(8), lvreduce(8), lvremove(8), lvrename(8), lvresize(8), lvs(8), lvscan(8),

lvm-fullreport(8), lvm-lvpoll(8), blkdeactivate(8), lvmdump(8),

dmeventd(8), lvmpolld(8), lvmlockd(8), lvmlockctl(8), cmirrord(8), lvmdbusd(8), fsadm(8),

lvmsystemid(7), lvmreport(7), lvmcache(7), lvmraid(7), lvmthin(7), lvmvdo(7), lvmautoactivation(7)


lvextend

title: lvextend(8)

summary: Add space to a logical volume

text:
# lvextend(8)

## NAME
lvextend — Add space to a logical volume

## SYNOPSIS
lvextend option_args position_args

[ option_args ]

[ position_args ]

--alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit

-A|--autobackup y|n

--commandprofile String

--config String

-d|--debug

--devices PV

--devicesfile String

--driverloaded y|n

-l|--extents [+]Number[PERCENT]

-f|--force

--fs String

--fsmode String

-h|--help

--journal String

--lockopt String

--longhelp

-m|--mirrors Number

-n|--nofsck

--nohints

--nolocking

--nosync

--noudevsync

--poolmetadatasize [+]Size[m|UNIT]

--profile String

-q|--quiet

--reportformat basic|json|json_std

-r|--resizefs

-L|--size [+]Size[m|UNIT]

-i|--stripes Number

-I|--stripesize Size[k|UNIT]

-t|--test

--type linear|striped|snapshot|raid|mirror|thin|thin-pool|vdo|vdo-pool|cache|cache-pool|writecache

--usepolicies

-v|--verbose

--version

-y|--yes

## DESCRIPTION
lvextend extends the size of an LV. This requires allocating logical extents from the VG's free physical extents. If the extension adds a new LV segment, the new segment will use the existing segment type of the LV.

Extending a copy-on-write snapshot LV adds space for COW blocks.

Use lvconvert(8) to change the number of data images in a RAID or mirrored LV.

In the usage section below, --size Size can be replaced with --extents Number. See both descriptions the options section.

## USAGE
Extend an LV by a specified size.

lvextend -L|--size [+]Size[m|UNIT] LV

[ -l|--extents [+]Number[PERCENT] ]

[ -r|--resizefs ]

[ -i|--stripes Number ]

[ -I|--stripesize Size[k|UNIT] ]

[ --poolmetadatasize [+]Size[m|UNIT] ]

[ --fs String ]

[ --fsmode String ]

[ COMMON_OPTIONS ]

[ PV ... ]

—

Extend an LV by specified PV extents.

lvextend LV PV ...

[ -r|--resizefs ]

[ -i|--stripes Number ]

[ -I|--stripesize Size[k|UNIT] ]

[ --fs String ]

[ --fsmode String ]

[ COMMON_OPTIONS ]

—

Extend a pool metadata SubLV by a specified size.

lvextend --poolmetadatasize [+]Size[m|UNIT] LV1

[ -i|--stripes Number ]

[ -I|--stripesize Size[k|UNIT] ]

[ COMMON_OPTIONS ]

[ PV ... ]

LV1 types: linear thinpool

—

Extend an LV according to a predefined policy.

lvextend --usepolicies LV1

[ -r|--resizefs ]

[ --fs String ]

[ --fsmode String ]

[ COMMON_OPTIONS ]

[ PV ... ]

LV1 types: snapshot thinpool vdopool

—

Common options for command:

[ -A|--autobackup y|n ]

[ -f|--force ]

[ -m|--mirrors Number ]

[ -n|--nofsck ]

[ --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit ]

[ --nosync ]

[ --noudevsync ]

[ --reportformat basic|json|json_std ]

[ --type linear|striped|snapshot|raid|mirror|thin|thin-pool|vdo|vdo-pool|cache|cache-pool|writecache ]

Common options for lvm:

[ -d|--debug ]

[ -h|--help ]

[ -q|--quiet ]

[ -t|--test ]

[ -v|--verbose ]

[ -y|--yes ]

[ --commandprofile String ]

[ --config String ]

[ --devices PV ]

[ --devicesfile String ]

[ --driverloaded y|n ]

[ --journal String ]

[ --lockopt String ]

[ --longhelp ]

[ --nohints ]

[ --nolocking ]

[ --profile String ]

[ --version ]

## OPTIONS
--alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit

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 overridden on the command line. normal applies common sense rules such as not placing parallel stripes on the same PV. inherit applies the VG policy to an LV. contiguous requires new PEs be placed adjacent to existing PEs. cling places new PEs on the same PV as existing PEs in the same stripe of the LV. If there are sufficient PEs for an allocation, but normal does not use them, anywhere will use them even if it reduces performance, e.g. by placing two stripes on the same PV. Optional positional PV args on the command line can also be used to limit which PVs the command will use for allocation. See lvm(8) for more information about allocation.

-A|--autobackup y|n

Specifies if metadata should be backed up automatically after a change. Enabling this is strongly advised! See vgcfgbackup(8) for more information.

--commandprofile String

The command profile to use for command configuration. See lvm.conf(5) for more information about profiles.

--config String

Config settings for the command. These override lvm.conf(5) settings. The String arg uses the same format as lvm.conf(5), or may use section/field syntax. See lvm.conf(5) for more information about config.

-d|--debug ...

Set debug level. Repeat from 1 to 6 times to increase the detail of messages sent to the log file and/or syslog (if configured).

--devices PV

Restricts the devices that are visible and accessible to the command. Devices not listed will appear to be missing. This option can be repeated, or accepts a comma separated list of devices. This overrides the devices file.

--devicesfile String

A file listing devices that LVM should use. The file must exist in /etc/lvm/devices/ and is managed with the lvmdevices(8) command. This overrides the lvm.conf(5) devices/devicesfile and devices/use_devicesfile settings.

--driverloaded y|n

If set to no, the command will not attempt to use device-mapper. For testing and debugging.

-l|--extents [+]Number[PERCENT]

Specifies the new size of the LV in logical extents. The --size and --extents options are alternate methods of specifying size. The total number of physical extents used will be greater when redundant data is needed for RAID levels. An alternate syntax allows the size to be determined indirectly as a percentage of the size of a related VG, LV, or set of PVs. The suffix %VG denotes the total size of the VG, the suffix %FREE the remaining free space in the VG, and the suffix %PVS the free space in the specified PVs. For a snapshot, the size can be expressed as a percentage of the total size of the origin LV with the suffix %ORIGIN (100%ORIGIN provides space for the whole origin). When expressed as a percentage, the size defines an upper limit for the number of logical extents in the new LV. The precise number of logical extents in the new LV is not determined until the command has completed. When the plus + or minus - prefix is used, the value is not an absolute size, but is relative and added or subtracted from the current size.

-f|--force ...

Override various checks, confirmations and protections. Use with extreme caution.

--fs String

Control file system resizing when resizing an LV. checksize: Check the fs size and reduce the LV if the fs is not using the reduced space (fs reduce is not needed.) If the reduced space is used by the fs, then do not resize the fs or LV, and return an error. (checksize only applies when reducing, and does nothing for extend.) resize: Resize the fs by calling the fs-specific resize command. This may also include mounting, unmounting, or running fsck. See --fsmode to control mounting behavior, and --nofsck to disable fsck. resize_fsadm: Use the old method of calling fsadm to handle the fs (deprecated.) Warning: this option does not prevent lvreduce from destroying file systems that are unmounted (or mounted if prompts are skipped.) ignore: Resize the LV without checking for or handling a file system. Warning: using ignore when reducing the LV size may destroy the file system.

--fsmode String

Control file system mounting behavior for fs resize. manage: Mount or unmount the fs as needed to resize the fs, and attempt to restore the original mount state at the end. nochange: Do not mount or unmount the fs. If mounting or unmounting is required to resize the fs, then do not resize the fs or the LV and fail the command. offline: Unmount the fs if it is mounted, and resize the fs while it is unmounted. If mounting is required to resize the fs, then do not resize the fs or the LV and fail the command.

-h|--help

Display help text.

--journal String

Record information in the systemd journal. This information is in addition to information enabled by the lvm.conf log/journal setting. command: record information about the command. output: record the default command output. debug: record full command debugging.

--lockopt String

Used to pass options for special cases to lvmlockd. See lvmlockd(8) for more information.

--longhelp

Display long help text.

-m|--mirrors Number

Not used.

-n|--nofsck

Do not perform fsck when resizing the file system with --resizefs.

--nohints

Do not use the hints file to locate devices for PVs. A command may read more devices to find PVs when hints are not used. The command will still perform standard hint file invalidation where appropriate.

--nolocking

Disable locking. Use with caution, concurrent commands may produce incorrect results.

--nosync

Causes the creation of mirror, raid1, raid4, raid5 and raid10 to skip the initial synchronization. In case of mirror, raid1 and raid10, any data written afterwards will be mirrored, but the original contents will not be copied. In case of raid4 and raid5, no parity blocks will be written, though any data written afterwards will cause parity blocks to be stored. This is useful for skipping a potentially long and resource intensive initial sync of an empty mirror/raid1/raid4/raid5 and raid10 LV. This option is not valid for raid6, because raid6 relies on proper parity (P and Q Syndromes) being created during initial synchronization in order to reconstruct proper user date in case of device failures. raid0 and raid0_meta do not provide any data copies or parity support and thus do not support initial synchronization.

--noudevsync

Disables udev synchronization. The process will not wait for notification from udev. It will continue irrespective of any possible udev processing in the background. Only use this if udev is not running or has rules that ignore the devices LVM creates.

--poolmetadatasize [+]Size[m|UNIT]

Specifies the new size of the pool metadata LV. The plus prefix + can be used, in which case the value is added to the current size.

--profile String

An alias for --commandprofile or --metadataprofile, depending on the command.

-q|--quiet ...

Suppress output and log messages. Overrides --debug and --verbose. Repeat once to also suppress any prompts with answer 'no'.

--reportformat basic|json|json_std

Overrides current output format for reports which is defined globally by the report/output_format setting in lvm.conf(5). basic is the original format with columns and rows. If there is more than one report per command, each report is prefixed with the report name for identification. json produces report output in JSON format. json_std produces report output in JSON format which is more compliant with JSON standard. See lvmreport(7) for more information.

-r|--resizefs

Resize the fs using the fs-specific resize command. May include mounting, unmounting, or running fsck. See --fsmode to control mounting behavior, and --nofsck to disable fsck. See --fs for more options (--resizefs is equivalent to --fs resize.)

-L|--size [+]Size[m|UNIT]

Specifies the new size of the LV. The --size and --extents options are alternate methods of specifying size. The total number of physical extents used will be greater when redundant data is needed for RAID levels. When the plus + or minus - prefix is used, the value is not an absolute size, but is relative and added or subtracted from the current size.

-i|--stripes Number

Specifies the number of stripes in a striped LV. This is the number of PVs (devices) that a striped LV is spread across. Data that appears sequential in the LV is spread across multiple devices in units of the stripe size (see --stripesize). This does not change existing allocated space, but only applies to space being allocated by the command. When creating a RAID 4/5/6 LV, this number does not include the extra devices that are required for parity. The largest number depends on the RAID type (raid0: 64, raid10: 32, raid4/5: 63, raid6: 62), and when unspecified, the default depends on the RAID type (raid0: 2, raid10: 2, raid4/5: 3, raid6: 5.) To stripe a new raid LV across all PVs by default, see lvm.conf(5) allocation/raid_stripe_all_devices.

-I|--stripesize Size[k|UNIT]

The amount of data that is written to one device before moving to the next in a striped LV.

-t|--test

Run in test mode. Commands will not update metadata. This is implemented by disabling all metadata writing but nevertheless returning success to the calling function. This may lead to unusual error messages in multi-stage operations if a tool relies on reading back metadata it believes has changed but hasn't.

--type linear|striped|snapshot|raid|mirror|thin|thin-pool|vdo|vdo-pool|cache|cache-pool|writecache

The LV type, also known as "segment type" or "segtype". See usage descriptions for the specific ways to use these types. For more information about redundancy and performance (raid<N>, mirror, striped, linear) see lvmraid(7). For thin provisioning (thin, thin-pool) see lvmthin(7). For performance caching (cache, cache-pool) see lvmcache(7). For copy-on-write snapshots (snapshot) see usage definitions. For VDO (vdo) see lvmvdo(7). Several commands omit an explicit type option because the type is inferred from other options or shortcuts (e.g. --stripes, --mirrors, --snapshot, --virtualsize, --thin, --cache, --vdo). Use inferred types with care because it can lead to unexpected results.

--usepolicies

Perform an operation according to the policy configured in lvm.conf(5) or a profile.

-v|--verbose ...

Set verbose level. Repeat from 1 to 4 times to increase the detail of messages sent to stdout and stderr.

--version

Display version information.

-y|--yes

Do not prompt for confirmation interactively but always assume the answer yes. Use with extreme caution. (For automatic no, see -qq.)

## VARIABLES
LV

Logical Volume name. See lvm(8) for valid names. An LV positional arg generally includes the VG name and LV name, e.g. VG/LV. LV1 indicates the LV must have a specific type, where the accepted LV types are listed. (raid represents raid<N> type).

PV

Physical Volume name, a device path under /dev. For commands managing physical extents, a PV positional 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 is omitted it defaults to end. Start and end range (inclusive): PV[:PE-PE]... Start and length range (counting from 0): PV[:PE+PE]...

String

See 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 values, regardless of capitalization, e.g. 'k' and 'K' both refer to 1024. The default input unit is specified by letter, followed by |UNIT. UNIT represents other possible input units: b|B is bytes, s|S is sectors of 512 bytes, k|K is KiB, m|M is MiB, g|G is GiB, t|T is TiB, p|P is PiB, e|E is EiB. (This should not be confused with the output control --units, where capital letters mean multiple of 1000.)

## ENVIRONMENT VARIABLES
See lvm(8) for information about environment variables used by lvm. For example, LVM_VG_NAME can generally be substituted for a required VG parameter.

## EXAMPLES
Extend the size of an LV by 54MiB, using a specific PV.

lvextend -L +54 vg01/lvol10 /dev/sdk3

Extend the size of an LV by the amount of free space on PV /dev/sdk3. This is equivalent to specifying "-l +100%PVS" on the command line.

lvextend vg01/lvol01 /dev/sdk3

Extend an LV by 16MiB using specific physical extents.

lvextend -L+16m vg01/lvol01 /dev/sda:8-9 /dev/sdb:8-9

Extend an LV to use all remaining free space in volume group and all resize its filesystem with fsadm(8).

lvextend -l+100%FREE -r vg01/lvol01

## SEE ALSO
lvm(8), lvm.conf(5), lvmconfig(8), lvmdevices(8),

pvchange(8), pvck(8), pvcreate(8), pvdisplay(8), pvmove(8), pvremove(8), pvresize(8), pvs(8), pvscan(8),

vgcfgbackup(8), vgcfgrestore(8), vgchange(8), vgck(8), vgcreate(8), vgconvert(8), vgdisplay(8), vgexport(8), vgextend(8), vgimport(8), vgimportclone(8), vgimportdevices(8), vgmerge(8), vgmknodes(8), vgreduce(8), vgremove(8), vgrename(8), vgs(8), vgscan(8), vgsplit(8),

lvcreate(8), lvchange(8), lvconvert(8), lvdisplay(8), lvextend(8), lvreduce(8), lvremove(8), lvrename(8), lvresize(8), lvs(8), lvscan(8),

lvm-fullreport(8), lvm-lvpoll(8), blkdeactivate(8), lvmdump(8),

dmeventd(8), lvmpolld(8), lvmlockd(8), lvmlockctl(8), cmirrord(8), lvmdbusd(8), fsadm(8),

lvmsystemid(7), lvmreport(7), lvmcache(7), lvmraid(7), lvmthin(7), lvmvdo(7), lvmautoactivation(7)


lvm

title: lvm(8)

summary: LVM2 tools

text:
# lvm(8)

## NAME
lvm — LVM2 tools

## SYNOPSIS
lvm [command|file]

## DESCRIPTION
The Logical Volume Manager (LVM) provides tools to create virtual block devices from physical devices. Virtual devices may be easier to manage than physical devices, and can have capabilities beyond what the physical devices provide themselves. A Volume Group (VG) is a collection of one or more physical devices, each called a Physical Volume (PV). A Logical Volume (LV) is a virtual block device that can be used by the system or applications. Each block of data in an LV is stored on one or more PV in the VG, according to algorithms implemented by Device Mapper (DM) in the kernel.

The lvm command, and other commands listed below, are the command-line tools for LVM. A separate manual page describes each command in detail.

If lvm is invoked with no arguments it presents a readline prompt (assuming it was compiled with readline support). LVM commands may be entered interactively at this prompt with readline facilities including history and command name and option completion. Refer to readline(3) for details.

If lvm is invoked with argv[0] set to the name of a specific LVM command (for example by using a hard or soft link) it acts as that command.

On invocation, lvm requires that only the standard file descriptors stdin, stdout and stderr are available. If others are found, they get closed and messages are issued warning about the leak. This warning can be suppressed by setting the environment variable LVM_SUPPRESS_FD_WARNINGS.

Where commands take VG or LV names as arguments, the full path name is optional. An LV called "lvol0" in a VG called "vg0" can be specified as "vg0/lvol0". Where a list of VGs is required but is left empty, a list of all VGs will be substituted. Where a list of LVs is required but a VG is given, a list of all the LVs in that VG will be substituted. So lvdisplay vg0 will display all the LVs in "vg0". Tags can also be used - see --addtag below.

One advantage of using the built-in shell is that configuration information gets cached internally between commands.

A file containing a simple script with one command per line can also be given on the command line. The script can also be executed directly if the first line is #! followed by the absolute path of lvm.

Additional hyphens within option names are ignored. For example, --readonly and --read-only are both accepted.

## BUILT-IN COMMANDS
The following commands are built into lvm without links normally being created in the filesystem for them.

config

The same as lvmconfig(8) below.

devtypes

Display the recognised built-in block device types.

dumpconfig

The same as lvmconfig(8) below.

formats

Display recognised metadata formats.

fullreport

Report information about PVs, PV segments, VGs, LVs and LV segments, all at once.

help

Display the help text.

lastlog

Display log report of last command run in LVM shell if command log reporting is enabled.

lvpoll

Complete lvmpolld operations (Internal command).

segtypes

Display recognised Logical Volume segment types.

systemid

Display any system ID currently set on this host.

tags

Display any tags defined on this host.

version

Display version information.

## COMMANDS
The following commands implement the core LVM functionality.

pvchange

Change attributes of a Physical Volume.

pvck

Check Physical Volume metadata.

pvcreate

Initialize a disk or partition for use by LVM.

pvdisplay

Display attributes of a Physical Volume.

pvmove

Move Physical Extents.

pvremove

Remove a Physical Volume.

pvresize

Resize a disk or partition in use by LVM2.

pvs

Report information about Physical Volumes.

pvscan

Scan all disks for Physical Volumes.

vgcfgbackup

Backup Volume Group descriptor area.

vgcfgrestore

Restore Volume Group descriptor area.

vgchange

Change attributes of a Volume Group.

vgck

Check Volume Group metadata.

vgconvert

Convert Volume Group metadata format.

vgcreate

Create a Volume Group.

vgdisplay

Display attributes of Volume Groups.

vgexport

Make volume Groups unknown to the system.

vgextend

Add Physical Volumes to a Volume Group.

vgimport

Make exported Volume Groups known to the system.

vgimportclone

Import and rename duplicated Volume Group (e.g. a hardware snapshot).

vgimportdevices

Add PVs from a VG to the devices file.

vgmerge

Merge two Volume Groups.

vgmknodes

Recreate Volume Group directory and Logical Volume special files

vgreduce

Reduce a Volume Group by removing one or more Physical Volumes.

vgremove

Remove a Volume Group.

vgrename

Rename a Volume Group.

vgs

Report information about Volume Groups.

vgscan

Scan all disks for Volume Groups.

vgsplit

Split a Volume Group into two, moving any logical volumes from one Volume Group to another by moving entire Physical Volumes.

lvchange

Change attributes of a Logical Volume.

lvconvert

Convert a Logical Volume from linear to mirror or snapshot.

lvcreate

Create a Logical Volume in an existing Volume Group.

lvdisplay

Display attributes of a Logical Volume.

lvextend

Extend the size of a Logical Volume.

lvmconfig

Display the configuration information after loading lvm.conf(5) and any other configuration files.

lvmdevices

Manage the devices file.

lvmdiskscan

Scan for all devices visible to LVM2.

lvmdump

Create lvm2 information dumps for diagnostic purposes.

lvreduce

Reduce the size of a Logical Volume.

lvremove

Remove a Logical Volume.

lvrename

Rename a Logical Volume.

lvresize

Resize a Logical Volume.

lvs

Report information about Logical Volumes.

lvscan

Scan (all disks) for Logical Volumes.

The following LVM1 commands are not implemented in LVM2: lvmchange, lvmsadc, lvmsar, pvdata. For performance metrics, use dmstats(8) or to manipulate the kernel device-mapper driver used by LVM2 directly, use dmsetup(8).

## VALID NAMES
The valid characters for VG and LV names are: a-z A-Z 0-9 + _ . -

VG names cannot begin with a hyphen. The name of a new LV also cannot begin with a hyphen. However, if the configuration setting metadata/record_lvs_history is enabled then an LV name with a hyphen as a prefix indicates that, although the LV was removed, it is still being tracked because it forms part of the history of at least one LV that is still present. This helps to record the ancestry of thin snapshots even after some links in the chain have been removed. A reference to the historical LV 'lvol1' in VG 'vg00' would be 'vg00/-lvol1' or just '-lvol1' if the VG is already set. (The latter form must be preceded by '--' to terminate command line option processing before reaching this argument.)

There are also various reserved names that are used internally by lvm that can not be used as LV or VG names. A VG cannot be called anything that exists in /dev/ at the time of creation, nor can it be called '.' or '..'. An LV cannot be called '.', '..', 'snapshot' or 'pvmove'. The LV name may also not contain any of the following strings: '_cdata', '_cmeta', '_corig', '_iorig', '_mimage', '_mlog', '_pmspare', '_rimage', '_rmeta', '_tdata', '_tmeta', '_vdata', '_vorigin' or '_wcorig'. A directory bearing the name of each Volume Group is created under /dev when any of its Logical Volumes are activated. Each active Logical Volume is accessible from this directory as a symbolic link leading to a device node. Links or nodes in /dev/mapper are intended only for internal use and the precise format and escaping might change between releases and distributions. Other software and scripts should use the /dev/VolumeGroupName/LogicalVolumeName format to reduce the chance of needing amendment when the software is updated. Should you need to process the node names in /dev/mapper, you may use dmsetup splitname to separate out the original VG, LV and internal layer names.

## UNIQUE NAMES
VG names should be unique. vgcreate will produce an error if the specified VG name matches an existing VG name. However, there are cases where different VGs with the same name can appear to LVM, e.g. after moving disks or changing filters.

When VGs with the same name exist, commands operating on all VGs will include all of the VGs with the same name. If the ambiguous VG name is specified on the command line, the command will produce an error. The error states that multiple VGs exist with the specified name. To process one of the VGs specifically, the --select option should be used with the UUID of the intended VG: --select vg_uuid=<uuid>

An exception is if all but one of the VGs with the shared name is foreign (see lvmsystemid(7)). In this case, the one VG that is not foreign is assumed to be the intended VG and is processed.

LV names are unique within a VG. The name of an historical LV cannot be reused until the historical LV has itself been removed or renamed.

## ALLOCATION
When an operation needs to allocate Physical Extents for one or more Logical Volumes, the tools proceed as follows:

First of all, they generate the complete set of unallocated Physical Extents in the Volume Group. If any ranges of Physical Extents are supplied at the end of the command line, only unallocated Physical Extents within those ranges on the specified Physical Volumes are considered.

Then they try each allocation policy in turn, starting with the strictest policy (contiguous) and ending with the allocation policy specified using --alloc or set as the default for the particular Logical Volume or Volume Group concerned. For each policy, working from the lowest-numbered Logical Extent of the empty Logical Volume space that needs to be filled, they allocate as much space as possible according to the restrictions imposed by the policy. If more space is needed, they move on to the next policy.

The restrictions are as follows:

Contiguous requires that the physical location of any Logical Extent that is not the first Logical Extent of a Logical Volume is adjacent to the physical location of the Logical Extent immediately preceding it.

Cling requires that the Physical Volume used for any Logical Extent to be added to an existing Logical Volume is already in use by at least one Logical Extent earlier in that Logical Volume. If the configuration parameter allocation/cling_tag_list is defined, then two Physical Volumes are considered to match if any of the listed tags is present on both Physical Volumes. This allows groups of Physical Volumes with similar properties (such as their physical location) to be tagged and treated as equivalent for allocation purposes.

When a Logical Volume is striped or mirrored, the above restrictions are applied independently to each stripe or mirror image (leg) that needs space.

Normal will not choose a Physical Extent that shares the same Physical Volume as a Logical Extent already allocated to a parallel Logical Volume (i.e. a different stripe or mirror image/leg) at the same offset within that parallel Logical Volume.

When allocating a mirror log at the same time as Logical Volumes to hold the mirror data, Normal will first try to select different Physical Volumes for the log and the data. If that's not possible and the allocation/mirror_logs_require_separate_pvs configuration parameter is set to 0, it will then allow the log to share Physical Volume(s) with part of the data.

When allocating thin pool metadata, similar considerations to those of a mirror log in the last paragraph apply based on the value of the allocation/thin_pool_metadata_require_separate_pvs configuration parameter.

If you rely upon any layout behaviour beyond that documented here, be aware that it might change in future versions of the code.

For example, if you supply on the command line two empty Physical Volumes that have an identical number of free Physical Extents available for allocation, the current code considers using each of them in the order they are listed, but there is no guarantee that future releases will maintain that property. If it is important to obtain a specific layout for a particular Logical Volume, then you should build it up through a sequence of lvcreate(8) and lvconvert(8) steps such that the restrictions described above applied to each step leave the tools no discretion over the layout.

To view the way the allocation process currently works in any specific case, read the debug logging output, for example by adding -vvvv to a command.

## LOGICAL VOLUME TYPES
Some logical volume types are simple to create and can be done with a single lvcreate(8) command. The linear and striped logical volume types are an example of this. Other logical volume types may require more than one command to create. The cache (lvmcache(7)) and thin provisioning (lvmthin(7)) types are examples of this.

## DIAGNOSTICS
All tools return a status code of zero on success or non-zero on failure. The non-zero codes distinguish only between the broad categories of unrecognised commands, problems processing the command line arguments and any other failures. As LVM remains under active development, the code used in a specific case occasionally changes between releases. Message text may also change.

## ENVIRONMENT VARIABLES
HOME

Directory containing .lvm_history if the internal readline shell is invoked.

LVM_OUT_FD

File descriptor to use for common output from LVM commands.

LVM_ERR_FD

File descriptor to use for error output from LVM commands.

LVM_REPORT_FD

File descriptor to use for report output from LVM commands.

LVM_COMMAND_PROFILE

Name of default command profile to use for LVM commands. This profile is overridden by direct use of --commandprofile command line option.

LVM_RUN_BY_DMEVENTD

This variable is normally set by dmeventd plugin to inform lvm2 command it is running from dmeventd plugin so lvm2 takes some extra action to avoid communication and deadlocks with dmeventd.

LVM_SYSTEM_DIR

Directory containing lvm.conf(5) and other LVM system files. Defaults to "/etc/lvm".

LVM_SUPPRESS_FD_WARNINGS

Suppress warnings about unexpected file descriptors passed into LVM.

LVM_SUPPRESS_SYSLOG

Suppress contacting syslog.

LVM_VG_NAME

The Volume Group name that is assumed for any reference to a Logical Volume that doesn't specify a path. Not set by default.

LVM_LVMPOLLD_PIDFILE

Path to the file that stores the lvmpolld process ID.

LVM_LVMPOLLD_SOCKET

Path to the socket used to communicate with lvmpolld..

LVM_LOG_FILE_EPOCH

A string of up to 32 letters appended to the log filename and followed by the process ID and a startup timestamp using this format string "_%s_%d_%llu". When set, each process logs to a separate file.

LVM_LOG_FILE_MAX_LINES

If more than this number of lines are sent to the log file, the command gets aborted. Automated tests use this to terminate looping commands.

LVM_EXPECTED_EXIT_STATUS

The status anticipated when the process exits. Use ">N" to match any status greater than N. If the actual exit status matches and a log file got produced, it is deleted. LVM_LOG_FILE_EPOCH and LVM_EXPECTED_EXIT_STATUS together allow automated test scripts to discard uninteresting log data.

LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES

Used to suppress warning messages when the configured locking is known to be unavailable.

DM_ABORT_ON_INTERNAL_ERRORS

Abort processing if the code detects a non-fatal internal error.

DM_DISABLE_UDEV

Avoid interaction with udev. LVM will manage the relevant nodes in /dev directly.

DM_DEBUG_WITH_LINE_NUMBERS

Prepends source file name and code line number with libdm debugging.

## FILES
/etc/lvm/lvm.conf

$HOME/.lvm_history

## SEE ALSO
lvm(8), lvm.conf(5), lvmconfig(8), lvmdevices(8),

pvchange(8), pvck(8), pvcreate(8), pvdisplay(8), pvmove(8), pvremove(8), pvresize(8), pvs(8), pvscan(8),

vgcfgbackup(8), vgcfgrestore(8), vgchange(8), vgck(8), vgcreate(8), vgconvert(8), vgdisplay(8), vgexport(8), vgextend(8), vgimport(8), vgimportclone(8), vgimportdevices(8), vgmerge(8), vgmknodes(8), vgreduce(8), vgremove(8), vgrename(8), vgs(8), vgscan(8), vgsplit(8),

lvcreate(8), lvchange(8), lvconvert(8), lvdisplay(8), lvextend(8), lvreduce(8), lvremove(8), lvrename(8), lvresize(8), lvs(8), lvscan(8),

lvm-fullreport(8), lvm-lvpoll(8), blkdeactivate(8), lvmdump(8),

dmeventd(8), lvmpolld(8), lvmlockd(8), lvmlockctl(8), cmirrord(8), lvmdbusd(8), fsadm(8),

lvmsystemid(7), lvmreport(7), lvmcache(7), lvmraid(7), lvmthin(7), lvmvdo(7), lvmautoactivation(7),

dmsetup(8), dmstats(8), readline(3)


lvm-fullreport

title: lvm-fullreport(8)

summary: Display full report

text:
# lvm-fullreport(8)

## NAME
lvm fullreport — Display full report

## SYNOPSIS
lvm fullreport

[ option_args ]

[ position_args ]

## DESCRIPTION
lvm fullreport produces formatted output about PVs, PV segments, VGs, LVs and LV segments. The information is all gathered together for each VG (under a per-VG lock) so it is consistent. Information gathered from separate calls to vgs, pvs, and lvs can be inconsistent if information changes between commands.

## USAGE
lvm fullreport

[ -S|--select String ]

[ -a|--all ]

[ -o|--options String ]

[ -O|--sort String ]

[ --configreport log|vg|lv|pv|pvseg|seg ]

[ --foreign ]

[ --ignorelockingfailure ]

[ --logonly ]

[ --readonly ]

[ --reportformat basic|json|json_std ]

[ --shared ]

[ --units [Number]r|R|h|H|b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E ]

[ --aligned ]

[ --binary ]

[ --headings none|abbrev|full|0|1|2 ]

[ --nameprefixes ]

[ --noheadings ]

[ --nosuffix ]

[ --rows ]

[ --separator String ]

[ --unbuffered ]

[ --unquoted ]

[ COMMON_OPTIONS ]

[ VG ... ]

Common options for lvm:

[ -d|--debug ]

[ -h|--help ]

[ -q|--quiet ]

[ -t|--test ]

[ -v|--verbose ]

[ -y|--yes ]

[ --commandprofile String ]

[ --config String ]

[ --devices PV ]

[ --devicesfile String ]

[ --driverloaded y|n ]

[ --journal String ]

[ --lockopt String ]

[ --longhelp ]

[ --nohints ]

[ --nolocking ]

[ --profile String ]

[ --version ]

## OPTIONS
--aligned

Use with --separator to align the output columns

-a|--all

--binary

Use binary values "0" or "1" instead of descriptive literal values for columns that have exactly two valid values to report (not counting the "unknown" value which denotes that the value could not be determined).

--commandprofile String

The command profile to use for command configuration. See lvm.conf(5) for more information about profiles.

--config String

Config settings for the command. These override lvm.conf(5) settings. The String arg uses the same format as lvm.conf(5), or may use section/field syntax. See lvm.conf(5) for more information about config.

--configreport log|vg|lv|pv|pvseg|seg

See lvmreport(7).

-d|--debug ...

Set debug level. Repeat from 1 to 6 times to increase the detail of messages sent to the log file and/or syslog (if configured).

--devices PV

Restricts the devices that are visible and accessible to the command. Devices not listed will appear to be missing. This option can be repeated, or accepts a comma separated list of devices. This overrides the devices file.

--devicesfile String

A file listing devices that LVM should use. The file must exist in /etc/lvm/devices/ and is managed with the lvmdevices(8) command. This overrides the lvm.conf(5) devices/devicesfile and devices/use_devicesfile settings.

--driverloaded y|n

If set to no, the command will not attempt to use device-mapper. For testing and debugging.

--foreign

Report/display foreign VGs that would otherwise be skipped. See lvmsystemid(7) for more information about foreign VGs.

--headings none|abbrev|full|0|1|2

Type of headings to use in report output. none or 0: No headings. abbrev or 1: Column name abbreviations. full or 2: Full column names.

-h|--help

Display help text.

--ignorelockingfailure

Allows a command to continue with read-only metadata operations after locking failures.

--journal String

Record information in the systemd journal. This information is in addition to information enabled by the lvm.conf log/journal setting. command: record information about the command. output: record the default command output. debug: record full command debugging.

--lockopt String

Used to pass options for special cases to lvmlockd. See lvmlockd(8) for more information.

--logonly

Suppress command report and display only log report.

--longhelp

Display long help text.

--nameprefixes

Add an "LVM2_" prefix plus the field name to the output. Useful with --noheadings to produce a list of field=value pairs that can be used to set environment variables (for example, in udev rules).

--noheadings

Suppress the headings line that is normally the first line of output. Useful if grepping the output.

--nohints

Do not use the hints file to locate devices for PVs. A command may read more devices to find PVs when hints are not used. The command will still perform standard hint file invalidation where appropriate.

--nolocking

Disable locking. Use with caution, concurrent commands may produce incorrect results.

--nosuffix

Suppress the suffix on output sizes. Use with --units (except h and H) if processing the output.

-o|--options String

Comma-separated, ordered list of fields to display in columns. String arg syntax is: [+|-|#]Field1[,Field2 ...] The prefix + will append the specified fields to the default fields, - will remove the specified fields from the default fields, and # will compact specified fields (removing them when empty for all rows.) Use -o help to view the list of all available fields. Use separate lists of fields to add, remove or compact by repeating the -o option: -o+field1,field2 -o-field3,field4 -o#field5. These lists are evaluated from left to right. Use field name lv_all to view all LV fields, vg_all all VG fields, pv_all all PV fields, pvseg_all all PV segment fields, seg_all all LV segment fields, and pvseg_all all PV segment columns. See the lvm.conf(5) report section for more config options. See lvmreport(7) for more information about reporting.

--profile String

An alias for --commandprofile or --metadataprofile, depending on the command.

-q|--quiet ...

Suppress output and log messages. Overrides --debug and --verbose. Repeat once to also suppress any prompts with answer 'no'.

--readonly

Prevent the command from making changes, including activation and metadata updates. (See --permission r for read only LVs.)

--reportformat basic|json|json_std

Overrides current output format for reports which is defined globally by the report/output_format setting in lvm.conf(5). basic is the original format with columns and rows. If there is more than one report per command, each report is prefixed with the report name for identification. json produces report output in JSON format. json_std produces report output in JSON format which is more compliant with JSON standard. See lvmreport(7) for more information.

--rows

Output columns as rows.

-S|--select String

Select objects for processing and reporting based on specified criteria. The criteria syntax is described by --select help and lvmreport(7). For reporting commands, one row is displayed for each object matching the criteria. See --options help for selectable object fields. Rows can be displayed with an additional "selected" field (-o selected) showing 1 if the row matches the selection and 0 otherwise. For non-reporting commands which process LVM entities, the selection is used to choose items to process.

--separator String

String to use to separate each column. Useful if grepping the output.

--shared

Report/display shared VGs that would otherwise be skipped when lvmlockd is not being used on the host. See lvmlockd(8) for more information about shared VGs.

-O|--sort String

Comma-separated ordered list of columns to sort by. Replaces the default selection. Precede any column with - for a reverse sort on that column.

-t|--test

Run in test mode. Commands will not update metadata. This is implemented by disabling all metadata writing but nevertheless returning success to the calling function. This may lead to unusual error messages in multi-stage operations if a tool relies on reading back metadata it believes has changed but hasn't.

--unbuffered

Produce output immediately without sorting or aligning the columns properly.

--units [Number]r|R|h|H|b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E

All sizes are output in these units: human-(r)eadable with '<' rounding indicator, (h)uman-readable, (b)ytes, (s)ectors, (k)ilobytes, (m)egabytes, (g)igabytes, (t)erabytes, (p)etabytes, (e)xabytes. Capitalise to use multiples of 1000 (S.I.) instead of 1024. Custom units can be specified, e.g. --units 3M.

--unquoted

When used with --nameprefixes, output values in the field=value pairs are not quoted.

-v|--verbose ...

Set verbose level. Repeat from 1 to 4 times to increase the detail of messages sent to stdout and stderr.

--version

Display version information.

-y|--yes

Do not prompt for confirmation interactively but always assume the answer yes. Use with extreme caution. (For automatic no, see -qq.)

## VARIABLES
VG

Volume Group name. See lvm(8) for valid names.

String

See 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 values, regardless of capitalization, e.g. 'k' and 'K' both refer to 1024. The default input unit is specified by letter, followed by |UNIT. UNIT represents other possible input units: b|B is bytes, s|S is sectors of 512 bytes, k|K is KiB, m|M is MiB, g|G is GiB, t|T is TiB, p|P is PiB, e|E is EiB. (This should not be confused with the output control --units, where capital letters mean multiple of 1000.)

## ENVIRONMENT VARIABLES
See lvm(8) for information about environment variables used by lvm. For example, LVM_VG_NAME can generally be substituted for a required VG parameter.

## SEE ALSO
lvm(8), lvm.conf(5), lvmconfig(8), lvmdevices(8),

pvchange(8), pvck(8), pvcreate(8), pvdisplay(8), pvmove(8), pvremove(8), pvresize(8), pvs(8), pvscan(8),

vgcfgbackup(8), vgcfgrestore(8), vgchange(8), vgck(8), vgcreate(8), vgconvert(8), vgdisplay(8), vgexport(8), vgextend(8), vgimport(8), vgimportclone(8), vgimportdevices(8), vgmerge(8), vgmknodes(8), vgreduce(8), vgremove(8), vgrename(8), vgs(8), vgscan(8), vgsplit(8),

lvcreate(8), lvchange(8), lvconvert(8), lvdisplay(8), lvextend(8), lvreduce(8), lvremove(8), lvrename(8), lvresize(8), lvs(8), lvscan(8),

lvm-fullreport(8), lvm-lvpoll(8), blkdeactivate(8), lvmdump(8),

dmeventd(8), lvmpolld(8), lvmlockd(8), lvmlockctl(8), cmirrord(8), lvmdbusd(8), fsadm(8),

lvmsystemid(7), lvmreport(7), lvmcache(7), lvmraid(7), lvmthin(7), lvmvdo(7), lvmautoactivation(7)


lvm-lvpoll

title: lvm-lvpoll(8)

text:
# lvm-lvpoll(8)

## NAME
lvm lvpoll — Continue already initiated poll operation on a logical volume

## SYNOPSIS
lvm lvpoll option_args position_args

[ option_args ]

## DESCRIPTION
lvm lvpoll is an internal command used by lvmpolld(8) to monitor and complete lvconvert(8) and pvmove(8) operations. lvpoll itself does not initiate these operations and should not normally need to be run directly.

## USAGE
lvm lvpoll --polloperation pvmove|convert|merge|merge_thin LV ...

[ -A|--autobackup y|n ]

[ -i|--interval Number ]

[ --abort ]

[ --handlemissingpvs ]

[ COMMON_OPTIONS ]

Common options for lvm:

[ -d|--debug ]

[ -h|--help ]

[ -q|--quiet ]

[ -t|--test ]

[ -v|--verbose ]

[ -y|--yes ]

[ --commandprofile String ]

[ --config String ]

[ --devices PV ]

[ --devicesfile String ]

[ --driverloaded y|n ]

[ --journal String ]

[ --lockopt String ]

[ --longhelp ]

[ --nohints ]

[ --nolocking ]

[ --profile String ]

[ --version ]

## OPTIONS
--abort

Stop processing a poll operation in lvmpolld.

-A|--autobackup y|n

Specifies if metadata should be backed up automatically after a change. Enabling this is strongly advised! See vgcfgbackup(8) for more information.

--commandprofile String

The command profile to use for command configuration. See lvm.conf(5) for more information about profiles.

--config String

Config settings for the command. These override lvm.conf(5) settings. The String arg uses the same format as lvm.conf(5), or may use section/field syntax. See lvm.conf(5) for more information about config.

-d|--debug ...

Set debug level. Repeat from 1 to 6 times to increase the detail of messages sent to the log file and/or syslog (if configured).

--devices PV

Restricts the devices that are visible and accessible to the command. Devices not listed will appear to be missing. This option can be repeated, or accepts a comma separated list of devices. This overrides the devices file.

--devicesfile String

A file listing devices that LVM should use. The file must exist in /etc/lvm/devices/ and is managed with the lvmdevices(8) command. This overrides the lvm.conf(5) devices/devicesfile and devices/use_devicesfile settings.

--driverloaded y|n

If set to no, the command will not attempt to use device-mapper. For testing and debugging.

--handlemissingpvs

Allows a polling operation to continue when PVs are missing, e.g. for repairs due to faulty devices.

-h|--help

Display help text.

-i|--interval Number

Report progress at regular intervals.

--journal String

Record information in the systemd journal. This information is in addition to information enabled by the lvm.conf log/journal setting. command: record information about the command. output: record the default command output. debug: record full command debugging.

--lockopt String

Used to pass options for special cases to lvmlockd. See lvmlockd(8) for more information.

--longhelp

Display long help text.

--nohints

Do not use the hints file to locate devices for PVs. A command may read more devices to find PVs when hints are not used. The command will still perform standard hint file invalidation where appropriate.

--nolocking

Disable locking. Use with caution, concurrent commands may produce incorrect results.

--polloperation pvmove|convert|merge|merge_thin

The command to perform from lvmpolld.

--profile String

An alias for --commandprofile or --metadataprofile, depending on the command.

-q|--quiet ...

Suppress output and log messages. Overrides --debug and --verbose. Repeat once to also suppress any prompts with answer 'no'.

-t|--test

Run in test mode. Commands will not update metadata. This is implemented by disabling all metadata writing but nevertheless returning success to the calling function. This may lead to unusual error messages in multi-stage operations if a tool relies on reading back metadata it believes has changed but hasn't.

-v|--verbose ...

Set verbose level. Repeat from 1 to 4 times to increase the detail of messages sent to stdout and stderr.

--version

Display version information.

-y|--yes

Do not prompt for confirmation interactively but always assume the answer yes. Use with extreme caution. (For automatic no, see -qq.)

## VARIABLES
LV

Logical Volume name. See lvm(8) for valid names. An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.

String

See 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 values, regardless of capitalization, e.g. 'k' and 'K' both refer to 1024. The default input unit is specified by letter, followed by |UNIT. UNIT represents other possible input units: b|B is bytes, s|S is sectors of 512 bytes, k|K is KiB, m|M is MiB, g|G is GiB, t|T is TiB, p|P is PiB, e|E is EiB. (This should not be confused with the output control --units, where capital letters mean multiple of 1000.)

## ENVIRONMENT VARIABLES
See lvm(8) for information about environment variables used by lvm. For example, LVM_VG_NAME can generally be substituted for a required VG parameter.

## NOTES
To find the name of the pvmove LV that was created by an original pvmove /dev/name command, use the command:

lvs -a -S move_pv=/dev/name.

## EXAMPLES
Continue polling a pvmove operation.

lvm lvpoll --polloperation pvmove vg00/pvmove0

Abort a pvmove operation.

lvm lvpoll --polloperation pvmove --abort vg00/pvmove0

Continue polling a mirror conversion.

lvm lvpoll --polloperation convert vg00/lvmirror

Continue mirror repair.

lvm lvpoll --polloperation convert vg/damaged_mirror --handlemissingpvs

Continue snapshot merge.

lvm lvpoll --polloperation merge vg/snapshot_old

Continue thin snapshot merge.

lvm lvpoll --polloperation merge_thin vg/thin_snapshot

## SEE ALSO
lvm(8), lvm.conf(5), lvmconfig(8), lvmdevices(8),

pvchange(8), pvck(8), pvcreate(8), pvdisplay(8), pvmove(8), pvremove(8), pvresize(8), pvs(8), pvscan(8),

vgcfgbackup(8), vgcfgrestore(8), vgchange(8), vgck(8), vgcreate(8), vgconvert(8), vgdisplay(8), vgexport(8), vgextend(8), vgimport(8), vgimportclone(8), vgimportdevices(8), vgmerge(8), vgmknodes(8), vgreduce(8), vgremove(8), vgrename(8), vgs(8), vgscan(8), vgsplit(8),

lvcreate(8), lvchange(8), lvconvert(8), lvdisplay(8), lvextend(8), lvreduce(8), lvremove(8), lvrename(8), lvresize(8), lvs(8), lvscan(8),

lvm-fullreport(8), lvm-lvpoll(8), blkdeactivate(8), lvmdump(8),

dmeventd(8), lvmpolld(8), lvmlockd(8), lvmlockctl(8), cmirrord(8), lvmdbusd(8), fsadm(8),

lvmsystemid(7), lvmreport(7), lvmcache(7), lvmraid(7), lvmthin(7), lvmvdo(7), lvmautoactivation(7)


title: lvm_import_vdo(8)

text:
# lvm_import_vdo(8)

## NAME
lvm_import_vdo — utility to import VDO volumes into a new volume group.

## SYNOPSIS
lvm_import_vdo

[options] device

## DESCRIPTION
lvm_import_vdo utility imports VDO volumes created and managed by vdo(8) manager into lvm2(8) managed VDO LV. This is realized by moving VDO superblock by 2MiB and creating lvm2 metadata at the front of this device. The operation is not reversible, thus after conversion to lvm2 the access to VDO data is only possible with lvm2(8) commands, vdo(8) manager no longer control such volume.

## OPTIONS
-f|--force

Bypass some sanity checks.

-h|--help

Display the help text.

-n|--name

Specifies the name of converted VDO LV. When the name is not specified, some automatic name is selected. In case the converted VDO volume is already using LV a backend device, the name of this LV is used for VDO LV. In this case also the of volume group must stay same. Automatic name may change between releases and currently selects "vdolv" as LV name and VG name is selected from sequence "vdovg", "vdovg1", ...

-v|--verbose

Be more verbose.

-y|--yes

Answer "yes" at any prompts.

--dry-run

Print verbosely commands without running them.

--no-snapshot

With this option conversion tool will not use snapshot (COW storage) for conversion in your $TMPDIR filesystem and it will directly manipulate with VDO device in-place. Warning: the snapshot usage makes the whole conversion transactional and the snapshot can be just simply merged once the whole conversion has successfully proceeded. In the case of error the snapshot is just removed. Without the use of snapshot there is higher risk of problems with recoverability in case some unexpected error occurs.

--vdo-config

Configuration file for VDO manager. Can be used to specify configuration for vdo manager.

## DIAGNOSTICS
On successful completion, the status code is 0. A status code of 1 is used for failure.

## EXAMPLES
Convert VDO volume created by vdo manager into logical volume LV1 with within volume group VG1.

\# lvm_import_vdo --name VG1/LV1 /dev/mapper/vdo-volume

## ENVIRONMENT VARIABLES
TMPDIR

The temporary directory name for mount points. Defaults to "/tmp".

DM_DEV_DIR

The device directory name. Defaults to "/dev" and must be an absolute path.

DM_UUID_PREFIX

Specify uuid prefix for snapshot volume used during vdo conversion.

LVM_BINARY

Allow to override command called from lvm. Defaults to "lvm".

VDO_BINARY

Allow to override command called from vdo. Defaults to "vdo".

## SEE ALSO
lvm(8), lvm.conf(5),

vdo(8),


lvmconfig

title: lvmconfig(8)

text:
# lvmconfig(8)

## NAME
lvmconfig — Display and manipulate configuration information

## SYNOPSIS
lvmconfig

[ option_args ]

[ position_args ]

## DESCRIPTION
lvmconfig, lvm config, lvm dumpconfig (for compatibility reasons, to be phased out) produce formatted output from the LVM configuration tree. The sources of the configuration data include lvm.conf(5) and command line settings from --config.

## USAGE
lvmconfig

[ -f|--file String ]

[ -l|--list ]

[ --atversion String ]

[ --typeconfig current|default|diff|full|list|missing|new|profilable|profilable-command|profilable-metadata ]

[ --ignoreadvanced ]

[ --ignoreunsupported ]

[ --ignorelocal ]

[ --mergedconfig ]

[ --metadataprofile String ]

[ --sinceversion String ]

[ --showdeprecated ]

[ --showunsupported ]

[ --validate ]

[ --valuesonly ]

[ --withsummary ]

[ --withcomments ]

[ --withgeneralpreamble ]

[ --withlocalpreamble ]

[ --withspaces ]

[ --unconfigured ]

[ --withversions ]

[ COMMON_OPTIONS ]

[ String ... ]

Common options for lvm:

[ -d|--debug ]

[ -h|--help ]

[ -q|--quiet ]

[ -t|--test ]

[ -v|--verbose ]

[ -y|--yes ]

[ --commandprofile String ]

[ --config String ]

[ --devices PV ]

[ --devicesfile String ]

[ --driverloaded y|n ]

[ --journal String ]

[ --lockopt String ]

[ --longhelp ]

[ --nohints ]

[ --nolocking ]

[ --profile String ]

[ --version ]

## OPTIONS
--atversion String

Specify an LVM version in x.y.z format where x is the major version, the y is the minor version and z is the patchlevel (e.g. 2.2.106). When configuration is displayed, the configuration settings recognized at this LVM version will be considered only. This can be used to display a configuration that a certain LVM version understands and which does not contain any newer settings for which LVM would issue a warning message when checking the configuration.

--commandprofile String

The command profile to use for command configuration. See lvm.conf(5) for more information about profiles.

--config String

Config settings for the command. These override lvm.conf(5) settings. The String arg uses the same format as lvm.conf(5), or may use section/field syntax. See lvm.conf(5) for more information about config.

-d|--debug ...

Set debug level. Repeat from 1 to 6 times to increase the detail of messages sent to the log file and/or syslog (if configured).

--devices PV

Restricts the devices that are visible and accessible to the command. Devices not listed will appear to be missing. This option can be repeated, or accepts a comma separated list of devices. This overrides the devices file.

--devicesfile String

A file listing devices that LVM should use. The file must exist in /etc/lvm/devices/ and is managed with the lvmdevices(8) command. This overrides the lvm.conf(5) devices/devicesfile and devices/use_devicesfile settings.

--driverloaded y|n

If set to no, the command will not attempt to use device-mapper. For testing and debugging.

-f|--file String

Write output to the named file.

-h|--help

Display help text.

--ignoreadvanced

Exclude advanced configuration settings from the output.

--ignorelocal

Ignore the local section. The local section should be defined in the lvmlocal.conf file, and should contain config settings specific to the local host which should not be copied to other hosts.

--ignoreunsupported

Exclude unsupported configuration settings from the output. These settings are either used for debugging and development purposes only or their support is not yet complete and they are not meant to be used in production. The current and diff types include unsupported settings in their output by default, all the other types ignore unsupported settings.

--journal String

Record information in the systemd journal. This information is in addition to information enabled by the lvm.conf log/journal setting. command: record information about the command. output: record the default command output. debug: record full command debugging.

-l|--list

List config settings with summarizing comment. This is the same as using options --typeconfig list --withsummary.

--lockopt String

Used to pass options for special cases to lvmlockd. See lvmlockd(8) for more information.

--longhelp

Display long help text.

--mergedconfig

When the command is run with --config and/or --commandprofile (or using LVM_COMMAND_PROFILE environment variable), --profile, or --metadataprofile, merge all the contents of the "config cascade" before displaying it. Without merging, only the configuration at the front of the cascade is displayed. See lvm.conf(5) for more information about config.

--metadataprofile String

The metadata profile to use for command configuration. See lvm.conf(5) for more information about profiles.

--nohints

Do not use the hints file to locate devices for PVs. A command may read more devices to find PVs when hints are not used. The command will still perform standard hint file invalidation where appropriate.

--nolocking

Disable locking. Use with caution, concurrent commands may produce incorrect results.

--profile String

An alias for --commandprofile or --metadataprofile, depending on the command.

-q|--quiet ...

Suppress output and log messages. Overrides --debug and --verbose. Repeat once to also suppress any prompts with answer 'no'.

--showdeprecated

Include deprecated configuration settings in the output. These settings are deprecated after a certain version. If a concrete version is specified with --atversion, deprecated settings are automatically included if the specified version is lower than the version in which the settings were deprecated. The current and diff types include deprecated settings in their output by default, all the other types ignore deprecated settings.

--showunsupported

Include unsupported configuration settings in the output. These settings are either used for debugging or development purposes only, or their support is not yet complete and they are not meant to be used in production. The current and diff types include unsupported settings in their output by default, all the other types ignore unsupported settings.

--sinceversion String

Specify an LVM version in x.y.z format where x is the major version, the y is the minor version and z is the patchlevel (e.g. 2.2.106). This option is currently applicable only with --typeconfig new to display all configuration settings introduced since given version.

-t|--test

Run in test mode. Commands will not update metadata. This is implemented by disabling all metadata writing but nevertheless returning success to the calling function. This may lead to unusual error messages in multi-stage operations if a tool relies on reading back metadata it believes has changed but hasn't.

--typeconfig current|default|diff|full|list|missing|new|profilable|profilable-command|profilable-metadata

current prints the config settings that would be applied to an lvm command (assuming the command does not override them on the command line.) This includes: settings that have been modified in lvm config files, settings that get their default values from config files, and default settings that have been uncommented in config files. default prints all settings with their default values. Changes made in lvm config files are not reflected in the output. Some settings get their default values internally, and these settings are printed as comments. Other settings get their default values from config files, and these settings are not printed as comments. diff prints only config settings that have been modified from their default values in config files (the difference between current and default.) full prints every setting uncommented and set to the current value, i.e. how it would be used by an lvm command. This includes settings modified in config files, settings that usually get defaults internally, and settings that get defaults from config files. list prints all config names without values. missing prints settings that are missing from the lvm config files. A missing setting that usually gets its default from config files is printed uncommented and set to the internal default. Settings that get their default internally and are not set in config files are printed commented with the internal default. new prints config settings that have been added since the lvm version specified by --sinceversion. They are printed with their default values. profilable prints settings with their default values that can be set from a profile. profilable-command prints settings with their default values that can be set from a command profile. profilable-metadata prints settings with their default values that can be set from a metadata profile. Also see lvm.conf(5).

--unconfigured

Internal option used for generating config file during build.

--validate

Validate current configuration used and exit with appropriate return code. The validation is done only for the configuration at the front of the "config cascade". To validate the whole merged configuration tree, also use --mergedconfig. The validation is done even if lvm.conf(5) config/checks is disabled.

--valuesonly

When printing config settings, print only values without keys.

-v|--verbose ...

Set verbose level. Repeat from 1 to 4 times to increase the detail of messages sent to stdout and stderr.

--version

Display version information.

--withcomments

Display a full comment for each configuration node. For deprecated settings, also display comments about deprecation.

--withgeneralpreamble

Include general config file preamble.

--withlocalpreamble

Include local config file preamble.

--withspaces

Where appropriate, add more spaces in output for better readability.

--withsummary

Display a one line comment for each configuration node.

--withversions

Also display a comment containing the version of introduction for each configuration node. If the setting is deprecated, also display the version since which it is deprecated.

-y|--yes

Do not prompt for confirmation interactively but always assume the answer yes. Use with extreme caution. (For automatic no, see -qq.)

## VARIABLES
String

See 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 values, regardless of capitalization, e.g. 'k' and 'K' both refer to 1024. The default input unit is specified by letter, followed by |UNIT. UNIT represents other possible input units: b|B is bytes, s|S is sectors of 512 bytes, k|K is KiB, m|M is MiB, g|G is GiB, t|T is TiB, p|P is PiB, e|E is EiB. (This should not be confused with the output control --units, where capital letters mean multiple of 1000.)

## ENVIRONMENT VARIABLES
See lvm(8) for information about environment variables used by lvm. For example, LVM_VG_NAME can generally be substituted for a required VG parameter.

## SEE ALSO
lvm(8), lvm.conf(5), lvmconfig(8), lvmdevices(8),

pvchange(8), pvck(8), pvcreate(8), pvdisplay(8), pvmove(8), pvremove(8), pvresize(8), pvs(8), pvscan(8),

vgcfgbackup(8), vgcfgrestore(8), vgchange(8), vgck(8), vgcreate(8), vgconvert(8), vgdisplay(8), vgexport(8), vgextend(8), vgimport(8), vgimportclone(8), vgimportdevices(8), vgmerge(8), vgmknodes(8), vgreduce(8), vgremove(8), vgrename(8), vgs(8), vgscan(8), vgsplit(8),

lvcreate(8), lvchange(8), lvconvert(8), lvdisplay(8), lvextend(8), lvreduce(8), lvremove(8), lvrename(8), lvresize(8), lvs(8), lvscan(8),

lvm-fullreport(8), lvm-lvpoll(8), blkdeactivate(8), lvmdump(8),

dmeventd(8), lvmpolld(8), lvmlockd(8), lvmlockctl(8), cmirrord(8), lvmdbusd(8), fsadm(8),

lvmsystemid(7), lvmreport(7), lvmcache(7), lvmraid(7), lvmthin(7), lvmvdo(7), lvmautoactivation(7)


lvmdevices

title: lvmdevices(8)

summary: Manage the devices file

text:
# lvmdevices(8)

## NAME
lvmdevices — Manage the devices file

## SYNOPSIS
lvmdevices option_args

[ option_args ]

--adddev PV

--addpvid String

--check

--commandprofile String

--config String

-d|--debug

--deldev String

--delnotfound

--delpvid String

--deviceidtype String

--devices PV

--devicesfile String

--driverloaded y|n

-h|--help

--journal String

--lockopt String

--longhelp

--nohints

--nolocking

--profile String

-q|--quiet

--refresh

-t|--test

--update

-v|--verbose

--version

-y|--yes

## DESCRIPTION
The LVM devices file lists devices that lvm can use. The default file is /etc/lvm/devices/system.devices, and the lvmdevices(8) command is used to add or remove device entries. If the file does not exist, or if lvm.conf includes use_devicesfile=0, then lvm will not use a devices file.

To use a device with lvm, add it to the devices file with the command lvmdevices --adddev, and to prevent lvm from seeing or using a device, remove it from the devices file with lvmdevices --deldev. The vgimportdevices(8) command adds all PVs from a VG to the devices file, and updates the VG metadata to include device IDs of the PVs.

Commands that add new devices to the devices file necessarily look outside the existing devices file to find the devices being added. pvcreate, vgcreate, and vgextend also look outside the devices file to create new PVs and add those PVs to the devices file.

LVM records devices in the devices file using hardware-specific IDs, such as the WWID, and attempts to use subsystem-specific IDs for virtual device types (which also aim to be as unique and stable as possible.) These device IDs are also written in the VG metadata. When no hardware or virtual ID is available, lvm falls back using the unstable device name as the device ID. When devnames are used as IDs, lvm performs extra scanning to find devices if their devname changes, e.g. after reboot.

When proper device IDs are used, an lvm command will not look at devices outside the devices file, but when devnames are used as a fallback, lvm will scan devices outside the devices file to locate PVs on renamed devices. A config setting search_for_devnames can be used to control the scanning for renamed devname entries.

Related to the devices file, the command option --devices <devnames> allows a list of devices to be specified for the command to use, overriding the devices file. The listed devices act as a sort of devices file in terms of limiting which devices lvm will see and use. Devices that are not listed will appear to be missing to the lvm command.

Multiple devices files can be kept in /etc/lvm/devices, which allows lvm to be used with different sets of devices. For example, system devices do not need to be exposed to a specific application, and the application can use lvm on its own devices that are not exposed to the system. The option --devicesfile <filename> is used to select the devices file to use with the command. Without the option set, the default system devices file is used.

Setting --devicesfile "" causes lvm to not use a devices file.

With no devices file, lvm will use any device on the system, and applies the filter to limit the full set of system devices. With a devices file, the regex filter is not used, and the filter settings in lvm.conf or the command line are ignored. The vgimportdevices command is one exception which does apply the regex filter when looking for a VG to import.

If a devices file exists, lvm will use it, even if it's empty. An empty devices file means lvm will see no devices.

If the system devices file does not yet exist, the pvcreate or vgcreate commands will create it if they see no existing VGs on the system. lvmdevices --addev and vgimportdevices will always create a new devices file if it does not yet exist.

It is recommended to use lvm commands to make changes to the devices file to ensure proper updates.

The device ID and device ID type are included in the VG metadata and can be reported with pvs -o deviceid,deviceidtype. (Note that the lvmdevices command does not update VG metadata, but subsequent lvm commands modifying the metadata will include the device ID.)

Possible device ID types are:

•

sys_wwid uses the wwid reported by the wwid sysfs file. This is the first choice.

•

wwid_naa uses the naa wwid decoded from the vpd_pg83 sysfs file.

•

wwid_eui uses the eui wwid decoded from the vpd_pg83 sysfs file.

•

wwid_t10 uses the t10 wwid decoded from the vpd_pg83 sysfs file.

•

sys_serial uses the serial number reported by the serial sysfs file or the vpd_pg80 file. A serial number is used if no wwid is available.

•

mpath_uuid is used for dm multipath devices, reported by sysfs.

•

crypt_uuid is used for dm crypt devices, reported by sysfs.

•

md_uuid is used for md devices, reported by sysfs.

•

lvmlv_uuid is used if a PV is placed on top of an lvm LV, reported by sysfs.

•

loop_file is used for loop devices, the backing file name reported by sysfs.

•

devname the device name is used if no other type applies.

The default choice for device ID type can be overridden using lvmdevices --addev --deviceidtype <type>. If the specified type is available for the device it will be used, otherwise the device will be added using the type that would otherwise be chosen.

LVM commands run by dmeventd will use the devices file /etc/lvm/devices/dmeventd.devices if it exists, otherwise system.devices is used. VGs that require the dmeventd service should be included in system.devices, even if they are included in dmeventd.devices.

### Device ID refresh
A machine identifier is saved in the devices file, and is used to detect when the devices file has been created by a different machine. If the devices file was created by a different machine, it indicates that PVs may have been copied or restored onto new devices on a new machine. In this case, lvm will search for the PVs listed in system.devices on new devices. If found, the device IDs will be updated in system.devices for the existing PVIDs (assuming the original device IDs are also no longer found.)

The machine identifier used in system.devices will be either the DMI product_uuid from /sys/devices/virtual/dmi/id/product_uuid, or the hostname from uname(2). See lvm.conf device_ids_refresh_checks to configure this.

## USAGE
Print devices in the devices file.

lvmdevices

[ COMMON_OPTIONS ]

—

Check the devices file and report incorrect values.

lvmdevices --check

[ --refresh ]

[ COMMON_OPTIONS ]

—

Update the devices file to fix incorrect values.

lvmdevices --update

[ --delnotfound ]

[ --refresh ]

[ COMMON_OPTIONS ]

—

Add a device to the devices file.

lvmdevices --adddev PV

[ --deviceidtype String ]

[ COMMON_OPTIONS ]

—

Remove a device from the devices file.

lvmdevices --deldev String|PV

[ --deviceidtype String ]

[ COMMON_OPTIONS ]

—

Find the device with the given PVID and add it to the devices file.

lvmdevices --addpvid String

[ --deviceidtype String ]

[ COMMON_OPTIONS ]

—

Remove the devices file entry for the given PVID.

lvmdevices --delpvid String

[ COMMON_OPTIONS ]

—

Common options for lvm:

[ -d|--debug ]

[ -h|--help ]

[ -q|--quiet ]

[ -t|--test ]

[ -v|--verbose ]

[ -y|--yes ]

[ --commandprofile String ]

[ --config String ]

[ --devices PV ]

[ --devicesfile String ]

[ --driverloaded y|n ]

[ --journal String ]

[ --lockopt String ]

[ --longhelp ]

[ --nohints ]

[ --nolocking ]

[ --profile String ]

[ --version ]

## OPTIONS
--adddev PV

Add a device to the devices file.

--addpvid String

Find a device with the PVID and add the device to the devices file.

--check

Checks the content of the devices file. Reports incorrect device names or PVIDs for entries.

--commandprofile String

The command profile to use for command configuration. See lvm.conf(5) for more information about profiles.

--config String

Config settings for the command. These override lvm.conf(5) settings. The String arg uses the same format as lvm.conf(5), or may use section/field syntax. See lvm.conf(5) for more information about config.

-d|--debug ...

Set debug level. Repeat from 1 to 6 times to increase the detail of messages sent to the log file and/or syslog (if configured).

--deldev String

Remove a device from the devices file. When used alone, --deldev specifies a device name. When used with --deviceidtype, --deldev specifies a device id.

--delnotfound

Remove devices file entries with no matching device.

--delpvid String

Remove a device with the PVID from the devices file.

--deviceidtype String

The type of device ID to use for the device. If the specified type is available for the device, then it will override the default type that lvm would use.

--devices PV

Restricts the devices that are visible and accessible to the command. Devices not listed will appear to be missing. This option can be repeated, or accepts a comma separated list of devices. This overrides the devices file.

--devicesfile String

A file listing devices that LVM should use. The file must exist in /etc/lvm/devices/ and is managed with the lvmdevices(8) command. This overrides the lvm.conf(5) devices/devicesfile and devices/use_devicesfile settings.

--driverloaded y|n

If set to no, the command will not attempt to use device-mapper. For testing and debugging.

-h|--help

Display help text.

--journal String

Record information in the systemd journal. This information is in addition to information enabled by the lvm.conf log/journal setting. command: record information about the command. output: record the default command output. debug: record full command debugging.

--lockopt String

Used to pass options for special cases to lvmlockd. See lvmlockd(8) for more information.

--longhelp

Display long help text.

--nohints

Do not use the hints file to locate devices for PVs. A command may read more devices to find PVs when hints are not used. The command will still perform standard hint file invalidation where appropriate.

--nolocking

Disable locking. Use with caution, concurrent commands may produce incorrect results.

--profile String

An alias for --commandprofile or --metadataprofile, depending on the command.

-q|--quiet ...

Suppress output and log messages. Overrides --debug and --verbose. Repeat once to also suppress any prompts with answer 'no'.

--refresh

Search for missing PVs on new devices, and update the devices file with new device IDs for the PVs if they are found on new devices. This is useful if PVs have been moved to new devices with new WWIDs, for example. The device ID type and name may both change for a PV. WARNING: if a PV is detached from the system, but a device containing a clone or snapshot of that PV is present, then refresh would replace the correct device ID with the clone/snapshot device ID, and lvm would begin using the wrong device for the PV. Use deldev/adddev to safely change a PV device ID in this scenario.

-t|--test

Run in test mode. Commands will not update metadata. This is implemented by disabling all metadata writing but nevertheless returning success to the calling function. This may lead to unusual error messages in multi-stage operations if a tool relies on reading back metadata it believes has changed but hasn't.

--update

Update the content of the devices file.

-v|--verbose ...

Set verbose level. Repeat from 1 to 4 times to increase the detail of messages sent to stdout and stderr.

--version

Display version information.

-y|--yes

Do not prompt for confirmation interactively but always assume the answer yes. Use with extreme caution. (For automatic no, see -qq.)

## VARIABLES
String

See 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 values, regardless of capitalization, e.g. 'k' and 'K' both refer to 1024. The default input unit is specified by letter, followed by |UNIT. UNIT represents other possible input units: b|B is bytes, s|S is sectors of 512 bytes, k|K is KiB, m|M is MiB, g|G is GiB, t|T is TiB, p|P is PiB, e|E is EiB. (This should not be confused with the output control --units, where capital letters mean multiple of 1000.)

## ENVIRONMENT VARIABLES
See lvm(8) for information about environment variables used by lvm. For example, LVM_VG_NAME can generally be substituted for a required VG parameter.

## SEE ALSO
lvm(8), lvm.conf(5), lvmconfig(8), lvmdevices(8),

pvchange(8), pvck(8), pvcreate(8), pvdisplay(8), pvmove(8), pvremove(8), pvresize(8), pvs(8), pvscan(8),

vgcfgbackup(8), vgcfgrestore(8), vgchange(8), vgck(8), vgcreate(8), vgconvert(8), vgdisplay(8), vgexport(8), vgextend(8), vgimport(8), vgimportclone(8), vgimportdevices(8), vgmerge(8), vgmknodes(8), vgreduce(8), vgremove(8), vgrename(8), vgs(8), vgscan(8), vgsplit(8),

lvcreate(8), lvchange(8), lvconvert(8), lvdisplay(8), lvextend(8), lvreduce(8), lvremove(8), lvrename(8), lvresize(8), lvs(8), lvscan(8),

lvm-fullreport(8), lvm-lvpoll(8), blkdeactivate(8), lvmdump(8),

dmeventd(8), lvmpolld(8), lvmlockd(8), lvmlockctl(8), cmirrord(8), lvmdbusd(8), fsadm(8),

lvmsystemid(7), lvmreport(7), lvmcache(7), lvmraid(7), lvmthin(7), lvmvdo(7), lvmautoactivation(7)


lvmdiskscan

title: lvmdiskscan(8)

text:
# lvmdiskscan(8)

## NAME
lvmdiskscan — List devices that may be used as physical volumes

## SYNOPSIS
lvmdiskscan

[ option_args ]

## DESCRIPTION
lvmdiskscan scans all SCSI, (E)IDE disks, multiple devices and a bunch of other block devices in the system looking for LVM PVs. The size reported is the real device size. Define a filter in lvm.conf(5) to restrict the scan to avoid a CD ROM, for example.

This command is deprecated, use pvs instead.

## USAGE
lvmdiskscan

[ -l|--lvmpartition ]

[ --readonly ]

[ COMMON_OPTIONS ]

Common options for lvm:

[ -d|--debug ]

[ -h|--help ]

[ -q|--quiet ]

[ -t|--test ]

[ -v|--verbose ]

[ -y|--yes ]

[ --commandprofile String ]

[ --config String ]

[ --devices PV ]

[ --devicesfile String ]

[ --driverloaded y|n ]

[ --journal String ]

[ --lockopt String ]

[ --longhelp ]

[ --nohints ]

[ --nolocking ]

[ --profile String ]

[ --version ]

## OPTIONS
--commandprofile String

The command profile to use for command configuration. See lvm.conf(5) for more information about profiles.

--config String

Config settings for the command. These override lvm.conf(5) settings. The String arg uses the same format as lvm.conf(5), or may use section/field syntax. See lvm.conf(5) for more information about config.

-d|--debug ...

Set debug level. Repeat from 1 to 6 times to increase the detail of messages sent to the log file and/or syslog (if configured).

--devices PV

Restricts the devices that are visible and accessible to the command. Devices not listed will appear to be missing. This option can be repeated, or accepts a comma separated list of devices. This overrides the devices file.

--devicesfile String

A file listing devices that LVM should use. The file must exist in /etc/lvm/devices/ and is managed with the lvmdevices(8) command. This overrides the lvm.conf(5) devices/devicesfile and devices/use_devicesfile settings.

--driverloaded y|n

If set to no, the command will not attempt to use device-mapper. For testing and debugging.

-h|--help

Display help text.

--journal String

Record information in the systemd journal. This information is in addition to information enabled by the lvm.conf log/journal setting. command: record information about the command. output: record the default command output. debug: record full command debugging.

--lockopt String

Used to pass options for special cases to lvmlockd. See lvmlockd(8) for more information.

--longhelp

Display long help text.

-l|--lvmpartition

Only report PVs.

--nohints

Do not use the hints file to locate devices for PVs. A command may read more devices to find PVs when hints are not used. The command will still perform standard hint file invalidation where appropriate.

--nolocking

Disable locking. Use with caution, concurrent commands may produce incorrect results.

--profile String

An alias for --commandprofile or --metadataprofile, depending on the command.

-q|--quiet ...

Suppress output and log messages. Overrides --debug and --verbose. Repeat once to also suppress any prompts with answer 'no'.

--readonly

Prevent the command from making changes, including activation and metadata updates. (See --permission r for read only LVs.)

-t|--test

Run in test mode. Commands will not update metadata. This is implemented by disabling all metadata writing but nevertheless returning success to the calling function. This may lead to unusual error messages in multi-stage operations if a tool relies on reading back metadata it believes has changed but hasn't.

-v|--verbose ...

Set verbose level. Repeat from 1 to 4 times to increase the detail of messages sent to stdout and stderr.

--version

Display version information.

-y|--yes

Do not prompt for confirmation interactively but always assume the answer yes. Use with extreme caution. (For automatic no, see -qq.)

## VARIABLES
String

See 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 values, regardless of capitalization, e.g. 'k' and 'K' both refer to 1024. The default input unit is specified by letter, followed by |UNIT. UNIT represents other possible input units: b|B is bytes, s|S is sectors of 512 bytes, k|K is KiB, m|M is MiB, g|G is GiB, t|T is TiB, p|P is PiB, e|E is EiB. (This should not be confused with the output control --units, where capital letters mean multiple of 1000.)

## ENVIRONMENT VARIABLES
See lvm(8) for information about environment variables used by lvm. For example, LVM_VG_NAME can generally be substituted for a required VG parameter.

## SEE ALSO
lvm(8), lvm.conf(5), lvmconfig(8), lvmdevices(8),

pvchange(8), pvck(8), pvcreate(8), pvdisplay(8), pvmove(8), pvremove(8), pvresize(8), pvs(8), pvscan(8),

vgcfgbackup(8), vgcfgrestore(8), vgchange(8), vgck(8), vgcreate(8), vgconvert(8), vgdisplay(8), vgexport(8), vgextend(8), vgimport(8), vgimportclone(8), vgimportdevices(8), vgmerge(8), vgmknodes(8), vgreduce(8), vgremove(8), vgrename(8), vgs(8), vgscan(8), vgsplit(8),

lvcreate(8), lvchange(8), lvconvert(8), lvdisplay(8), lvextend(8), lvreduce(8), lvremove(8), lvrename(8), lvresize(8), lvs(8), lvscan(8),

lvm-fullreport(8), lvm-lvpoll(8), blkdeactivate(8), lvmdump(8),

dmeventd(8), lvmpolld(8), lvmlockd(8), lvmlockctl(8), cmirrord(8), lvmdbusd(8), fsadm(8),

lvmsystemid(7), lvmreport(7), lvmcache(7), lvmraid(7), lvmthin(7), lvmvdo(7), lvmautoactivation(7)


lvmdump

title: lvmdump(8)

text:
# lvmdump(8)

## NAME
lvmdump — create lvm2 information dumps for diagnostic purposes

## SYNOPSIS
lvmdump [-a] [-c] [-d directory] [-h] [-l] [-m] [-p] [-s] [-u]

## DESCRIPTION
lvmdump is a tool to dump various information concerning LVM2. By default, it creates a tarball suitable for submission along with a problem report.

The content of the tarball is as follows:

•

dmsetup info

•

table of currently running processes

•

recent entries from /var/log/messages (containing system messages)

•

complete lvm configuration and cache (content of /etc/lvm)

•

list of device nodes present under /dev

•

list of files present /sys/block

•

list of files present /sys/devices/virtual/block

•

if enabled with -m, metadata dump will be also included

•

if enabled with -a, debug output of vgscan, pvscan and list of all available volume groups, physical volumes and logical volumes will be included

•

if enabled with -l, lvmetad state if running

•

if enabled with -p, lvmpolld state if running

•

if enabled with -s, system info and context

•

if enabled with -u, udev info and context

## OPTIONS
-a

Advanced collection. WARNING: if lvm is already hung, then this script may hang as well if -a is used.

-d directory

Dump into a directory instead of tarball By default, lvmdump will produce a single compressed tarball containing all the information. Using this option, it can be instructed to only produce the raw dump tree, rooted in directory.

-h

Print help message

-l

Include lvmetad(8) daemon dump if it is running. The dump contains cached information that is currently stored in lvmetad: VG metadata, PV metadata and various mappings in between these metadata for quick access.

-m

Gather LVM metadata from the PVs This option generates a 1:1 dump of the metadata area from all PVs visible to the system, which can cause the dump to increase in size considerably. However, the metadata dump may represent a valuable diagnostic resource.

-p

Include lvmpolld(8) daemon dump if it is running. The dump contains all in-progress operation currently monitored by the daemon and partial history for all yet uncollected results of polling operations already finished including reason.

-s

Gather system info and context. Currently, this encompasses info gathered by calling lsblk command and various systemd info and context: overall state of systemd units present in the system, more detailed status of units controlling LVM functionality and the content of systemd journal for current boot.

-u

Gather udev info and context: /etc/udev/udev.conf file, udev daemon version (output of 'udevadm info --version' command), udev rules currently used in the system (content of /lib/udev/rules.d and /etc/udev/rules.d directory), list of files in /lib/udev directory and dump of current udev database content (the output of 'udevadm info --export-db' command).

## ENVIRONMENT VARIABLES
LVM_BINARY

The LVM2 binary to use. Defaults to "lvm". Sometimes you might need to set this to "/usr/bin/lvm.static", for example.

DMSETUP_BINARY

The dmsetup binary to use. Defaults to "dmsetup".

## SEE ALSO
lvm(8), lvmpolld(8),

udev(8), udevadm(8)