Linux "pvs" Command Line Options and Examples
Display information about physical volumes

pvs produces formatted output about PVs.


Usage:

pvs
      [ option_args ]
      [ position_args ]






Command Line Options:

--aligned
Use with --separator to align the output columns
pvs --aligned ...
-a|--all
Show information about devices that have not been initialized by LVM, i.e. they are not PVs.
pvs -a|--all ...
--binary
Use binary values "0" or "1" instead of descriptive literal values for columns that have exactly twovalid values to report (not counting the "unknown" value which denotes that the value could not bedetermined).
pvs --binary ...
--commandprofile
The command profile to use for command configuration. See lvm.conf(5) for more information about pro‐files.
pvs --commandprofile ...
--config
Config settings for the command. These override lvm.conf settings. The String arg uses the same formatas lvm.conf, or may use section/field syntax. See lvm.conf(5) for more information about config.
pvs --config ...
--configreport
See lvmreport(7).
pvs --configreport ...
-d|--debug
Set debug level. Repeat from 1 to 6 times to increase the detail of messages sent to the log fileand/or syslog (if configured).
pvs -d|--debug ...
--driverloaded
If set to no, the command will not attempt to use device-mapper. For testing and debugging.
pvs --driverloaded ...
--foreign
Report/display foreign VGs that would otherwise be skipped. See lvmsystemid(7) for more informationabout foreign VGs.
pvs --foreign ...
-h|--help
Display help text.
pvs -h|--help ...
--ignorelockingfailure
Allows a command to continue with read-only metadata operations after locking failures.
pvs --ignorelockingfailure ...
--ignoreskippedcluster
Use to avoid exiting with an non-zero status code if the command is run without clustered locking andclustered VGs are skipped.
pvs --ignoreskippedcluster ...
--logonly
Suppress command report and display only log report.
pvs --logonly ...
--longhelp
Display long help text.
pvs --longhelp ...
--nameprefixes
Add an "LVM2_" prefix plus the field name to the output. Useful with --noheadings to produce a list offield=value pairs that can be used to set environment variables (for example, in udev rules).
pvs --nameprefixes ...
--noheadings
Suppress the headings line that is normally the first line of output. Useful if grepping the output.
pvs --noheadings ...
--nolocking
Disable locking.
pvs --nolocking ...
--nosuffix
Suppress the suffix on output sizes. Use with --units (except h and H) if processing the output.
pvs --nosuffix ...
-o|--options
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, - willremove the specified fields from the default fields, and # will compact specified fields (removing themwhen empty for all rows.) Use -o help to view the list of all available fields. Use separate lists offields to add, remove or compact by repeating the -o option: -o+field1,field2 -o-field3,field4
pvs -o|--options ...
--profile
An alias for --commandprofile or --metadataprofile, depending on the command.
pvs --profile ...
-q|--quiet
Suppress output and log messages. Overrides --debug and --verbose. Repeat once to also suppress anyprompts with answer 'no'.
pvs -q|--quiet ...
--readonly
Run the command in a special read-only mode which will read on-disk metadata without needing to takeany locks. This can be used to peek inside metadata used by a virtual machine image while the virtualmachine is running. It can also be used to peek inside the metadata of clustered VGs when clusteredlocking is not configured or running. No attempt will be made to communicate with the device-mapperkernel driver, so this option is unable to report whether or not LVs are actually in use.
pvs --readonly ...
--reportformat
Overrides current output format for reports which is defined globally by the report/output_format set‐ting in lvm.conf. basic is the original format with columns and rows. If there is more than onereport per command, each report is prefixed with the report name for identification. json producesreport output in JSON format. See lvmreport(7) for more information.
pvs --reportformat ...
--rows
Output columns as rows.
pvs --rows ...
--segments
Produces one line of output for each contiguous allocation of space on each PV, showing the start(pvseg_start) and length (pvseg_size) in units of physical extents.
pvs --segments ...
-S|--select
Select objects for processing and reporting based on specified criteria. The criteria syntax isdescribed by --select help and lvmreport(7). For reporting commands, one row is displayed for eachobject matching the criteria. See --options help for selectable object fields. Rows can be displayedwith an additional "selected" field (-o selected) showing 1 if the row matches the selection and 0 oth‐erwise. For non-reporting commands which process LVM entities, the selection is used to choose itemsto process.
pvs -S|--select ...
--separator
String to use to separate each column. Useful if grepping the output.
pvs --separator ...
--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.
pvs --shared ...
-O|--sort
Comma-separated ordered list of columns to sort by. Replaces the default selection. Precede any columnwith - for a reverse sort on that column.
pvs -O|--sort ...
-t|--test
Run in test mode. Commands will not update metadata. This is implemented by disabling all metadatawriting but nevertheless returning success to the calling function. This may lead to unusual error mes‐sages in multi-stage operations if a tool relies on reading back metadata it believes has changed buthasn't.
pvs -t|--test ...
--trustcache
Avoids certain device scanning during command processing. Do not use.
pvs --trustcache ...
--unbuffered
Produce output immediately without sorting or aligning the columns properly.
pvs --unbuffered ...
--units
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. Capi‐talise to use multiples of 1000 (S.I.) instead of 1024. Custom units can be specified, e.g. --units3M.
pvs --units ...
--unquoted
When used with --nameprefixes, output values in the field=value pairs are not quoted.
pvs --unquoted ...
-v|--verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail of messages sent to stdout andstderr.
pvs -v|--verbose ...
--version
Display version information.
pvs --version ...
-y|--yes
Do not prompt for confirmation interactively but always assume the answer yes. Use with extreme cau‐tion. (For automatic no, see -qq.)VARIABLESPVPhysical Volume name, a device path under /dev. For commands managing physical extents, a PV posi‐tional arg generally accepts a suffix indicating a range (or multiple ranges) of physical extents(PEs). When the first PE is omitted, it defaults to the start of the device, and when the last PE isomitted it defaults to end. Start and end range (inclusive): PV[:PE-PE]... Start and length range(counting from 0): PV[:PE+PE]...TagTag name. See lvm(8) for information about tag names and using tags in place of a VG, LV or PV.StringSee the option description for information about the string content.Size[UNIT]Size is an input number that accepts an optional unit. Input units are always treated as base two val‐ues, regardless of capitalization, e.g. 'k' and 'K' both refer to 1024. The default input unit isspecified by letter, followed by |UNIT. UNIT represents other possible input units: bBsSkKmMgGtTpPeE.b|B is bytes, s|S is sectors of 512 bytes, k|K is kilobytes, m|M is megabytes, g|G is gigabytes, t|T isterabytes, p|P is petabytes, e|E is exabytes. (This should not be confused with the output control
pvs -y|--yes ...
--units,
ENVIRONMENT VARIABLESSee lvm(8) for information about environment variables used by lvm. For example, LVM_VG_NAME can generally besubstituted for a required VG parameter.NOTESThe pv_attr bits are:1 (d)uplicate, (a)llocatable, (u)sed2 e(x)ported3 (m)issing
pvs --units, ...