LVS(8)

โœจ NAME โœจ

lvs โ€” show you all the tea about your logical volumes ๐Ÿ’– (this is the LVS(8) page from the System Manager's Manual, bestie, and we are getting into it)


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

lvs    [ option_args ]
       [ position_args ]

๐Ÿ’ซ DESCRIPTION ๐Ÿ’ซ

lvs produces formatted output about LVs. That's it, that's the whole vibe โ€” it's your little window into what your logical volumes are up to. โœจ


๐ŸŒธ USAGE ๐ŸŒธ

okay so here's how you actually call it:

lvs
       [ -a|--all ]
       [ -H|--history ]
       [ -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 ]
       [ VG|LV|Tag ... ]

and then the shared-options-for-everyone era begins ๐Ÿซถ

๐ŸŽ€ 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 โ€” pair this with --separator and it lines your output columns up all neat and pretty. the glow-up is real. ๐Ÿ’…
  • -a, --all โ€” shows you the internal LVs too. heads up bestie: these are the components of normal LVs โ€” think mirrors โ€” and they're not independently accessible, like, you can't mount them. they're backstage, not on stage. ๐ŸŽญ
  • --binary โ€” instead of the cute descriptive literal values, you get straight "0" or "1" for any column that has exactly two valid values to report. (and no, this doesn't count the "unknown" value, which is the one that means we literally could not determine the thing. ๐Ÿ˜ญ)
  • --commandprofile String โ€” the command profile to use for command configuration. peek at lvm.conf(5) for the whole lore on profiles. ๐Ÿ““
  • --config String โ€” config settings just for this command. these override whatever lvm.conf(5) says. the String arg uses the same format as lvm.conf(5), or you can use the section/field syntax. again, lvm.conf(5) has the details. โœจ
  • --configreport log|vg|lv|pv|pvseg|seg โ€” see lvmreport(7). ๐Ÿซก
  • -d, --debug ... โ€” sets the debug level. repeat it 1 to 6 times to crank up how much detail gets sent to the log file and/or syslog (if configured). the more repeats, the more you see. ๐Ÿ”
  • --devices PV โ€” restricts which devices are visible and accessible to the command. anything you don't list will look like it's just... missing. ๐Ÿ˜ถโ€๐ŸŒซ๏ธ you can repeat this option, or hand it a comma-separated list of devices. this overrides the devices file.
  • --devicesfile String โ€” a file that lists the devices LVM should use. it must exist in /etc/lvm/devices/ and it's managed with the lvmdevices(8) command. this overrides the lvm.conf(5) devices/devicesfile and devices/use_devicesfile settings.
  • --driverloaded y|n โ€” set it to no and the command won't even try to use device-mapper. it's for testing and debugging, not for your everyday slay. ๐Ÿงช
  • --foreign โ€” reports/displays foreign VGs that would otherwise be skipped. lvmsystemid(7) has the whole story about foreign VGs. ๐ŸŒ
  • --headings none|abbrev|full|0|1|2 โ€” the type of headings used in report output. none or 0: no headings at all. abbrev or 1: column name abbreviations. full or 2: the full column names, no shrinking. ๐Ÿ‘‘
  • -h, --help โ€” displays the help text. the classic. ๐Ÿ†˜
  • -H, --history โ€” includes historical LVs in the output. real talk though: this does nothing unless LVs were removed while lvm.conf(5) metadata/record_lvs_history was enabled. so if you turned that on too late... it's giving nothing. ๐Ÿ’€
  • --ignorelockingfailure โ€” lets a command carry on with read-only metadata operations even after locking failures. ๐Ÿฉน
  • --journal String โ€” records information in the systemd journal. this is in addition to whatever the lvm.conf log/journal setting already enables. the values: command: record information about the command. output: record the default command output. debug: record full command debugging. ๐Ÿ“
  • --lockopt String โ€” passes options for special cases over to lvmlockd. see lvmlockd(8) for more. ๐Ÿ”
  • --logonly โ€” suppresses the command report and shows you only the log report. just the logs, nothing else. ๐Ÿ“‹
  • --longhelp โ€” displays the long help text. the deluxe edition. ๐Ÿ“š
  • --nameprefixes โ€” adds an "LVM2_" prefix plus the field name onto the output. super useful with --noheadings to spit out a list of field=value pairs that you can use to set environment variables (think: in udev rules). ๐Ÿท๏ธ
  • --noheadings โ€” suppresses that headings line that's normally the first line of output. perfect if you're grepping the output. ๐Ÿ”Ž
  • --nohints โ€” don't use the hints file to locate devices for PVs. when hints aren't used, a command may read more devices to find PVs. it'll still do the standard hint file invalidation where appropriate though. ๐Ÿ•ต๏ธ
  • --nolocking โ€” disables locking. โš ๏ธ use with caution โ€” concurrent commands may produce incorrect results. you've been warned, bestie.
  • --nosuffix โ€” suppresses the suffix on output sizes. use it with --units (except h and H) if you're processing the output. ๐Ÿ”ข
  • -o, --options String โ€” a comma-separated, ordered list of fields to display in columns. the String arg syntax is: [+|-|#]Field1[,Field2 ...]. here's the breakdown: the prefix + appends the specified fields to the default fields, - removes the specified fields from the default fields, and # compacts specified fields (removing them when empty for all rows). use -o help to see the list of all available fields. ๐Ÿ—‚๏ธ you can 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 the field name lv_all to view all LV fields, vg_all for all VG fields, pv_all for all PV fields, seg_all for all LV segment fields, and pvseg_all for all PV segment fields. see the lvm.conf(5) report section for more config options, and lvmreport(7) for the full reporting lore. โœจ
  • --profile String โ€” an alias for --commandprofile or --metadataprofile, depending on the command. whichever one fits, it becomes that. ๐Ÿช„
  • -q, --quiet ... โ€” suppresses output and log messages. it overrides --debug and --verbose. repeat it once and it also suppresses any prompts with the answer 'no'. shhh era. ๐Ÿคซ
  • --readonly โ€” stops the command from making changes, including activation and metadata updates. (if you want read-only LVs, that's --permission r.) ๐Ÿšซ
  • --reportformat basic|json|json_std โ€” overrides the current output format for reports, which is normally set globally by the report/output_format setting in lvm.conf(5). basic is the original format, with columns and rows. if there's more than one report per command, each report gets prefixed with the report name so you can tell them apart. json produces report output in JSON format. json_std also produces JSON, but it's more compliant with the JSON standard. see lvmreport(7) for more. ๐Ÿงพ
  • --rows โ€” output columns as rows. yes, really, it just flips the whole thing. ๐Ÿ”„
  • --segments โ€” uses default columns that emphasize segment information. segments get the spotlight. ๐ŸŒŸ
  • -S, --select String โ€” selects objects for processing and reporting based on the criteria you give it. 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 the 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 that process LVM entities, the selection is what's used to choose the items to process. ๐ŸŽฏ
  • --separator String โ€” the string used to separate each column. useful if you're grepping the output. โž–
  • --shared โ€” reports/displays shared VGs that would otherwise be skipped when lvmlockd isn't being used on the host. see lvmlockd(8) for more about shared VGs. ๐Ÿค
  • -O, --sort String โ€” a comma-separated ordered list of columns to sort by. it replaces the default selection. put a - in front of any column for a reverse sort on that column. โ†•๏ธ
  • -t, --test โ€” runs in test mode. commands will not update metadata. this is implemented by disabling all metadata writing but nevertheless returning success to the calling function. โš ๏ธ heads up: 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 โ€” produces output immediately, without sorting or aligning the columns properly. chaos mode, but make it fast. โšก
  • --units [Number]r|R|h|H|b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E โ€” all sizes get output in these units: human-(r)eadable 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. you can also specify custom units, e.g. --units 3M. ๐Ÿ“
  • --unquoted โ€” when used with --nameprefixes, the output values in the field=value pairs are not quoted. free the values! ๐Ÿ•Š๏ธ
  • -v, --verbose ... โ€” sets the verbose level. repeat it 1 to 4 times to increase the detail of messages sent to stdout and stderr. chatty era. ๐Ÿ’ฌ
  • --version โ€” displays version information. ๐Ÿท๏ธ
  • -y, --yes โ€” don't prompt for confirmation interactively, just always assume the answer is yes. โš ๏ธ use with extreme caution. (and if you want an automatic no, that's -qq.)

๐ŸŒธ VARIABLES ๐ŸŒธ

ok so before we get into the bits, here's the little vocabulary list, bestie โ€” these are the words the man page is gonna keep throwing at you, so let's lock them in ๐Ÿ’…

  • VG โ€” Volume Group name. Wanna know what counts as a valid name? Go peek at lvm(8), it's all there โœจ
  • LV โ€” Logical Volume name. Same deal, lvm(8) has the valid-name tea. And heads up: an LV positional arg usually has the VG name and the LV name glued together, like VG/LV ๐Ÿซถ
  • Tag โ€” Tag name. lvm(8) explains tag names and also how you can use a tag in place of a VG, LV or PV โ€” iconic behaviour honestly ๐Ÿ‘‘
  • String โ€” it's just a string, ok ๐Ÿ˜ญ the actual option description will tell you what kind of content goes in it
  • Size[UNIT] โ€” okay this one's the main character, pay attention ๐ŸŽ€

๐Ÿ’– Size[UNIT] and its whole situation

So Size is an input number, and it can carry an optional unit with it. Here's the part that trips people up lowkey: input units are ALWAYS base two values, no matter how you capitalise them. Like, 'k' and 'K' both mean 1024. Capitalisation does not matter here. none. zero. nada ๐Ÿ™ˆ

The default input unit is specified by a letter, followed by |UNIT.

UNIT is where you get to pick your 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 a multiple of 1000. Different thing entirely, bestie, the capital letters switch teams depending on which one you're in ๐Ÿ’€

๐Ÿฆ‹ ENVIRONMENT VARIABLES ๐Ÿฆ‹

For the whole rundown on environment variables used by lvm, go read lvm(8) ๐Ÿ’œ

But here's one you'll be obsessed with: LVM_VG_NAME can generally be substituted for a required VG parameter. So yeah, set it and skip typing the VG name over and over โ€” it's giving convenience, periodt โœจ


โญ NOTES โญ

okay gorgeous, this next bit is the lv_attr bits โ€” the little letter positions in the attributes field that tell you, at a glance, what the heck is going on with your LV. Ten positions, ten vibes, let's go ๐Ÿงš

  1. Volume type: (C)ache, (m)irrored, (M)irrored without initial sync, (o)rigin, (O)rigin with merging snapshot, inte(g)rity, (r)aid, (R)aid without initial sync, (s)napshot, merging (S)napshot, (p)vmove, (v)irtual, mirror or raid (i)mage, mirror or raid (I)mage out-of-sync, mirror (l)og device, under (c)onversion, thin (V)olume, (t)hin pool, (T)hin pool data, v(d)o pool, v(D)o pool data, raid or pool m(e)tadata or pool metadata spare.
  2. Permissions: (w)ritable, (r)ead-only, (R)ead-only activation of non-read-only volume
  3. Allocation policy: (a)nywhere, (c)ontiguous, (i)nherited, c(l)ing, (n)ormal. This one gets capitalised if the volume is currently locked against allocation changes โ€” for example, during pvmove(8). ๐Ÿ”’
  4. fixed (m)inor
  5. State: (a)ctive, (h)istorical, (s)uspended, (I)nvalid snapshot, invalid (S)uspended snapshot, snapshot (m)erge failed, suspended snapshot (M)erge failed, mapped (d)evice present without tables, mapped device present with (i)nactive table, thin-pool (c)heck needed, suspended thin-pool (C)heck needed, (X) unknown
  6. device (o)pen, (X) unknown
  7. Target type: (C)ache, (m)irror, (r)aid, (s)napshot, (t)hin, (u)nknown, (v)irtual. What this does is group together all the logical volumes that belong to the same kernel target. So like, mirror images, mirror logs, and mirrors themselves all show up as (m) if they're using the original device-mapper mirror kernel driver. Meanwhile the raid equivalents using the md raid kernel driver all show up as (r). Snapshots using the original device-mapper driver show up as (s); but snapshots of thin volumes using the new thin provisioning driver show up as (t). see, grouping. slay ๐ŸŒˆ
  8. Newly-allocated data blocks are overwritten with blocks of (z)eroes before use.
  9. Volume Health โ€” and rn there are five groups of attributes identified in here, so buckle up:
    • Common ones for all Logical Volumes: (p)artial, (X) unknown. (p)artial signifies that one or more of the Physical Volumes this Logical Volume uses are missing from the system. (X) unknown signifies the status is unknown. ๐Ÿ˜ญ
    • Related to RAID Logical Volumes: (r)efresh or repair needed, (m)ismatches exist, (w)ritemostly. (r)efresh or repair signifies that one or more of the Physical Volumes this RAID Logical Volume uses have suffered a write error. That write error could be from a temporary failure of that Physical Volume, or it could be a sign that it's failing. Either way: the device should be refreshed or replaced. (m)ismatches signifies that the RAID logical volume has portions of the array that are not coherent โ€” those inconsistencies get detected by initiating a "check" on a RAID logical volume. (And psst, the scrubbing operations, "check" and "repair", can be performed on a RAID logical volume via the 'lvchange' command. ๐Ÿซถ) (w)ritemostly signifies the devices in a RAID 1 logical volume that have been marked write-mostly. Re(s)haping signifies a RAID Logical Volume is either undergoing a stripe addition/removal, a stripe size or RAID algorithm change. (R)emove after reshape signifies that freed striped raid images are still to be removed.
    • Related to Thin pool Logical Volumes: (F)ailed, out of (D)ata space, (M)etadata read only. (F)ailed is set if a thin pool encounters serious failures and hence no further I/O is permitted at all. Out of (D)ata space is set if a thin pool has run out of data space. (M)etadata read only signifies that a thin pool encounters certain types of failures, in which case reads are still possible but no metadata changes are allowed. ๐Ÿšซ
    • Related to Thin Logical Volumes: (F)ailed. (F)ailed is set when the related thin pool enters the Failed state and no further I/O is permitted at all.
    • Related to writecache logical volumes: (E)rror. (E)rror is set when dm-writecache reports an error. ๐Ÿ’€
  10. s(k)ip activation: this volume is flagged to be skipped during activation.

๐Ÿ’œ SEE ALSO ๐Ÿ’œ

go read these, bestie, they're all part of the family ๐Ÿซถ


and that's the whole page, bestie, you ate that ๐ŸŽ€ this one's LVM TOOLS 2.03.44(2), dated 2026-10-27, brought to you by the lovely people at Red Hat, Inc. โ€” take a bow, you read the entire lvs(8) man page and now your LVs have nowhere to hide ๐Ÿ’–โœจ๐Ÿ‘‘

๐Ÿ“ฆ where this page comes from