PVS(8)

๐Ÿ’– pvs โ€” the pvs(8) page, but make it make sense ๐Ÿ’–

okay bestie, gather round, because today we're learning about pvs from the System Manager's Manual, and honestly? it's giving "underrated icon." let's get into it. ๐ŸŽ€


โœจ NAME โœจ

pvs โ€” display information about physical volumes ๐Ÿฆ‹

โœจ SYNOPSIS โœจ

pvs    [ option_args ]
       [ position_args ]

โœจ DESCRIPTION โœจ

so like, what does it actually do? pvs produces formatted output about PVs. that's the whole vibe. short, sweet, iconic. ๐Ÿ’…

โœจ USAGE โœจ

here's the full rundown of how you can run it, no cap:

pvs
       [ -a|--all ]
       [ -A|--allpvs ]
       [ -o|--options String ]
       [ -O|--sort String ]
       [ -S|--select String ]
       [ --aligned ]
       [ --binary ]
       [ --configreport log|vg|lv|pv|pvseg|seg ]
       [ --foreign ]
       [ --headings none|abbrev|full|0|1|2 ]
       [ --ignorelockingfailure ]
       [ --logonly ]
       [ --nameprefixes ]
       [ --noheadings ]
       [ --nosuffix ]
       [ --readonly ]
       [ --reportformat basic|json|json_std ]
       [ --rows ]
       [ --segments ]
       [ --separator String ]
       [ --shared ]
       [ --unbuffered ]
       [ --units [Number]r|R|h|H|b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E ]
       [ --unquoted ]
       [ COMMON_OPTIONS ]
       [ PV|Tag ... ]

โ€”

and then the common options that basically every lvm command shares:

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 ๐ŸŒธ

buckle up bestie, this is the long part. every single one, right here, no skips, fr fr.

  • --aligned โ€” use this with --separator to align the output columns. aesthetics matter. โœจ
  • -a, --all โ€” show info about devices that have not been initialized by LVM, i.e. they are not PVs. like, yes we're peeking at the non-PVs too, mind your business. ๐Ÿ™ˆ
  • -A, --allpvs โ€” show info about PVs outside the devices file. combine it with -a|--all if you also wanna include the devices that are not PVs. the more the merrier honestly.
  • --binary โ€” use binary values "0" or "1" instead of those descriptive literal values, but only for columns that have exactly two valid values to report. (note: this does NOT count the "unknown" value, which means the value could not be determined.) it's giving minimalism.
  • --commandprofile String โ€” the command profile to use for command configuration. see lvm.conf(5) for more info about profiles. ๐Ÿซถ
  • --config String โ€” config settings for the command. these override the lvm.conf(5) settings. the String arg uses the same format as lvm.conf(5), or it may use section/field syntax. see lvm.conf(5) for more info about config.
  • --configreport log|vg|lv|pv|pvseg|seg โ€” see lvmreport(7). that's it, that's the note. ๐Ÿ‘‘
  • -d, --debug ... โ€” set the debug level. repeat it from 1 to 6 times to increase how detailed the messages sent to the log file and/or syslog (if configured) are. go off.
  • --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 it 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. lowkey a lab experiment.
  • --foreign โ€” report/display foreign VGs that would otherwise be skipped. see lvmsystemid(7) for more info about foreign VGs. not us gatekeeping the foreign VGs. ๐ŸŒˆ
  • --headings none|abbrev|full|0|1|2 โ€” the 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. the classic. ๐Ÿซถ
  • --ignorelockingfailure โ€” allows a command to continue with read-only metadata operations after locking failures. resilience era.
  • --journal String โ€” record information in the systemd journal. this info is in addition to the info 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 the command report and display only the log report. quiet queen behavior.
  • --longhelp โ€” display long help text. the deluxe version. ๐Ÿ’…
  • --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). iykyk.
  • --noheadings โ€” suppress the headings line that is normally the first line of output. useful if you're grepping the output. trust.
  • --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. so it's not fully unhinged, just partially.
  • --nolocking โ€” disable locking. โš ๏ธ use with caution, because concurrent commands may produce incorrect results. bestie please be careful, this one is not a game.
  • --nosuffix โ€” suppress the suffix on output sizes. use with --units (except h and H) if you're processing the output.
  • -o, --options String โ€” comma-separated, ordered list of fields to display in columns. the 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, seg_all all LV segment fields, and pvseg_all all PV segment fields.
    • see the lvm.conf(5) report section for more config options.
    • see lvmreport(7) for more info about reporting.
  • --profile String โ€” an alias for --commandprofile or --metadataprofile, depending on the command. shapeshifter energy. ๐Ÿฆ‹
  • -q, --quiet ... โ€” suppress output and log messages. overrides --debug and --verbose. repeat once to also suppress any prompts with answer 'no'. shhh era. ๐Ÿคซ
  • --readonly โ€” prevent the command from making changes, including activation and metadata updates. (see --permission r for read only LVs.) hands off, look only.
  • --reportformat basic|json|json_std โ€” overrides the 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 the JSON standard.
    • see lvmreport(7) for more information. โœจ
  • --rows โ€” output columns as rows. chaotic but valid. ๐Ÿ‘‘
  • --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. the details are the moment.
  • -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 you're grepping the output. pick your fave.
  • --shared โ€” report/display shared VGs that would otherwise be skipped when lvmlockd is not being used on the host. see lvmlockd(8) for more info 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. so like, fake it till you make it, but the tool might get confused. ๐Ÿ’€
  • --unbuffered โ€” produce output immediately without sorting or aligning the columns properly. raw, unfiltered, no notes.
  • --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:
    • (r)eadable โ€” human-readable with a '<' 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. slay.

  • --unquoted โ€” when used with --nameprefixes, output values in the field=value pairs are not quoted. let it breathe.
  • -v, --verbose ... โ€” set the verbose level. repeat it from 1 to 4 times to increase the detail of messages sent to stdout and stderr. more words, more drama. ๐ŸŽ€
  • --version โ€” display version information. the receipt. ๐Ÿงพ
  • -y, --yes โ€” do not prompt for confirmation interactively but always assume the answer is yes. โš ๏ธ use with extreme caution. (for automatic no, see -qq.) bestie this is the "yes to everything" button, respect it. ๐Ÿซฃ

(part 1 done, keep scrolling for part 2, we're not finished yet ๐Ÿ‘€)

โœจ VARIABLES โœจ

okay bestie so the options section was throwing around little placeholder words like PV and Size[UNIT] like you're just supposed to KNOW, and honestly? valid assumption, but let's give them all their own lil spotlight so nothing is mysterious ๐Ÿ’…

  • PV โ€” this is a Physical Volume name, and it's a device path under /dev. simple! ๐ŸŽ€

BUT here's the twist for any command that manages physical extents: a PV positional arg will generally accept a suffix that says which range (or ranges, plural, she's flexible ๐Ÿ‘‘) of physical extents (PEs, keep up) you're talking about. When the first PE is omitted, it defaults to the start of the device ๐ŸŒธ, and when the last PE is omitted it defaults to the end. no thoughts, just vibes, defaults handle it.

  • Start and end range (inclusive): PV[:PE-PE] ...
  • Start and length range (counting from 0): PV[:PE+PE] ...
  • Tag โ€” a tag name, periodt. See lvm(8) if you want the lore on tag names and how to use tags in place of a VG, LV or PV. iykyk ๐Ÿฆ‹
  • String โ€” genuinely just go look at the option description for whatever it is you're passing, bestie, that's where the string content tea lives ๐Ÿ”ฅ
  • Size[UNIT] โ€” okay so Size is an input number that accepts an optional unit. and here's the part people get wrong every single time ๐Ÿ˜ญ: input units are always treated as base two values, regardless of capitalization. so 'k' and 'K' both refer to 1024. yes really. no cap.

The default input unit is specified by letter, followed by |UNIT. And UNIT here represents the 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
โš ๏ธ do NOT confuse this with the output control --units, where capital letters mean multiple of 1000. two completely different girls, two completely different energies ๐Ÿ’€

๐ŸŒˆ ENVIRONMENT VARIABLES ๐ŸŒˆ

See lvm(8) for the full rundown on environment variables used by lvm, bestie, it's all documented over there ๐Ÿ’œ

For example: LVM_VG_NAME can generally be substituted for a required VG parameter. so like, if a command is begging you for a VG and you already set that env var? she'll take it โœจ iconic behaviour fr fr.


๐Ÿ“ NOTES ๐Ÿ“

The pv_attr bits are:

  • 1 โ€” (d)uplicate, (a)llocatable, (u)sed
  • 2 โ€” e(x)ported
  • 3 โ€” (m)issing

that's the whole bit squad, memorise her ๐Ÿซถ


๐Ÿ‘€ 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), lvmdbusd(8), fsadm(8),

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


and that's the whole page, bestie, you made it to the end ๐ŸŽ‰ this lil masterpiece was brought to you by Red Hat, Inc., running the LVM TOOLS 2.03.44(2) era, stamped with the date 2026-10-27 โ€” go forth and slay your physical volumes ๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from