Linux "lvscan" Command Line Options and Examples
List all logical volumes in all volume groups

lvscan scans all VGs or all supported LVM block devices in the system for LVs. The output consists of one line for each LV indicating whether or not it is active, a snapshot or origin, the size of the device and its allocation policy. Use lvs(8) or lvdisplay(8) to obtain more comprehensive information about LVs.


Usage:

lvscan option_args
      [ option_args ]
      [ position_args ]






Command Line Options:

-a|--all
Show information about internal LVs. These are components of normal LVs, such as mirrors, which are not independently acces‐sible, e.g. not mountable.
lvscan -a|--all ...
--cache
Scan the devices used by an LV and send the metadata to lvmetad.
lvscan --cache ...
--commandprofile
The command profile to use for command configuration. See lvm.conf(5) for more information about profiles.
lvscan --commandprofile ...
--config
Config settings for the command. These override lvm.conf settings. The String arg uses the same format as lvm.conf, or mayuse section/field syntax. See lvm.conf(5) for more information about config.
lvscan --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 config‐ured).
lvscan -d|--debug ...
--driverloaded
If set to no, the command will not attempt to use device-mapper. For testing and debugging.
lvscan --driverloaded ...
-h|--help
Display help text.
lvscan -h|--help ...
--ignorelockingfailure
Allows a command to continue with read-only metadata operations after locking failures.
lvscan --ignorelockingfailure ...
--longhelp
Display long help text.
lvscan --longhelp ...
--profile
An alias for --commandprofile or --metadataprofile, depending on the command.
lvscan --profile ...
-q|--quiet
Suppress output and log messages. Overrides --debug and --verbose. Repeat once to also suppress any prompts with answer 'no'.
lvscan -q|--quiet ...
--readonly
Run the command in a special read-only mode which will read on-disk metadata without needing to take any locks. This can beused to peek inside metadata used by a virtual machine image while the virtual machine is running. It can also be used topeek inside the metadata of clustered VGs when clustered locking is not configured or running. No attempt will be made to com‐municate with the device-mapper kernel driver, so this option is unable to report whether or not LVs are actually in use.
lvscan --readonly ...
--reportformat
Overrides current output format for reports which is defined globally by the report/output_format setting in lvm.conf. basicis the original format with columns and rows. If there is more than one report per command, each report is prefixed with thereport name for identification. json produces report output in JSON format. See lvmreport(7) for more information.
lvscan --reportformat ...
-t|--test
Run in test mode. Commands will not update metadata. This is implemented by disabling all metadata writing but neverthelessreturning success to the calling function. This may lead to unusual error messages in multi-stage operations if a tool relieson reading back metadata it believes has changed but hasn't.
lvscan -t|--test ...
-v|--verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail of messages sent to stdout and stderr.
lvscan -v|--verbose ...
--version
Display version information.
lvscan --version ...
-y|--yes
Do not prompt for confirmation interactively but always assume the answer yes. Use with extreme caution. (For automatic no,see -qq.)VARIABLESLVLogical Volume name. See lvm(8) for valid names. An LV positional arg generally includes the VG name and LV name, e.g.VG/LV.StringSee the option description for information about the string content.Size[UNIT]Size is an input number that accepts an optional unit. Input units are always treated as base two values, regardless of capi‐talization, e.g. 'k' and 'K' both refer to 1024. The default input unit is specified by letter, followed by |UNIT. UNIT rep‐resents other possible input units: bBsSkKmMgGtTpPeE. b|B is bytes, s|S is sectors of 512 bytes, k|K is kilobytes, m|M ismegabytes, g|G is gigabytes, t|T is terabytes, p|P is petabytes, e|E is exabytes. (This should not be confused with the out‐put control --units, where capital letters mean multiple of 1000.)ENVIRONMENT VARIABLESSee lvm(8) for information about environment variables used by lvm. For example, LVM_VG_NAME can generally be substituted for arequired VG parameter.
lvscan -y|--yes ...