1LVS(8)                      System Manager's Manual                     LVS(8)
2
3
4

NAME

6       lvs - Display information about logical volumes
7

SYNOPSIS

9       lvs
10           [ option_args ]
11           [ position_args ]
12

DESCRIPTION

14       lvs produces formatted output about LVs.
15

USAGE

17       lvs
18           [ -H|--history ]
19           [ -a|--all ]
20           [ -o|--options String ]
21           [ -S|--select String ]
22           [ -O|--sort String ]
23           [    --segments ]
24           [    --aligned ]
25           [    --binary ]
26           [    --configreport log|vg|lv|pv|pvseg|seg ]
27           [    --foreign ]
28           [    --ignorelockingfailure ]
29           [    --logonly ]
30           [    --nameprefixes ]
31           [    --noheadings ]
32           [    --nosuffix ]
33           [    --readonly ]
34           [    --reportformat basic|json ]
35           [    --rows ]
36           [    --separator String ]
37           [    --shared ]
38           [    --unbuffered ]
39           [    --units r|R|h|H|b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E ]
40           [    --unquoted ]
41           [ COMMON_OPTIONS ]
42           [ VG|LV|Tag ... ]
43
44       Common options for lvm:
45           [ -d|--debug ]
46           [ -h|--help ]
47           [ -q|--quiet ]
48           [ -t|--test ]
49           [ -v|--verbose ]
50           [ -y|--yes ]
51           [    --commandprofile String ]
52           [    --config String ]
53           [    --driverloaded y|n ]
54           [    --lockopt String ]
55           [    --longhelp ]
56           [    --nolocking ]
57           [    --profile String ]
58           [    --version ]
59

OPTIONS

61       --aligned
62              Use with --separator to align the output columns
63
64       -a|--all
65              Show information about internal LVs.  These are components of
66              normal LVs, such as mirrors, which are not independently acces‐
67              sible, e.g. not mountable.
68
69       --binary
70              Use binary values "0" or "1" instead of descriptive literal val‐
71              ues for columns that have exactly two valid values to report
72              (not counting the "unknown" value which denotes that the value
73              could not be determined).
74
75       --commandprofile String
76              The command profile to use for command configuration.  See
77              lvm.conf(5) for more information about profiles.
78
79       --config String
80              Config settings for the command. These override lvm.conf set‐
81              tings.  The String arg uses the same format as lvm.conf, or may
82              use section/field syntax.  See lvm.conf(5) for more information
83              about config.
84
85       --configreport log|vg|lv|pv|pvseg|seg
86              See lvmreport(7).
87
88       -d|--debug ...
89              Set debug level. Repeat from 1 to 6 times to increase the detail
90              of messages sent to the log file and/or syslog (if configured).
91
92       --driverloaded y|n
93              If set to no, the command will not attempt to use device-mapper.
94              For testing and debugging.
95
96       --foreign
97              Report/display foreign VGs that would otherwise be skipped.  See
98              lvmsystemid(7) for more information about foreign VGs.
99
100       -h|--help
101              Display help text.
102
103       -H|--history
104              Include historical LVs in the output.  (This has no effect un‐
105              less LVs were removed while lvm.conf metadata/record_lvs_history
106              was enabled.
107
108       --ignorelockingfailure
109              Allows a command to continue with read-only metadata operations
110              after locking failures.
111
112       --lockopt String
113              Used to pass options for special cases to lvmlockd.  See lvm‐
114              lockd(8) for more information.
115
116       --logonly
117              Suppress command report and display only log report.
118
119       --longhelp
120              Display long help text.
121
122       --nameprefixes
123              Add an "LVM2_" prefix plus the field name to the output. Useful
124              with --noheadings to produce a list of field=value pairs that
125              can be used to set environment variables (for example, in udev
126              rules).
127
128       --noheadings
129              Suppress the headings line that is normally the first line of
130              output.  Useful if grepping the output.
131
132       --nolocking
133              Disable locking.
134
135       --nosuffix
136              Suppress the suffix on output sizes. Use with --units (except h
137              and H) if processing the output.
138
139       -o|--options String
140              Comma-separated, ordered list of fields to display in columns.
141              String arg syntax is: [+|-|#]Field1[,Field2 ...]  The prefix +
142              will append the specified fields to the default fields, - will
143              remove the specified fields from the default fields, and # will
144              compact specified fields (removing them when empty for all
145              rows.)  Use -o help to view the list of all available fields.
146              Use separate lists of fields to add, remove or compact by re‐
147              peating the -o option: -o+field1,field2 -o-field3,field4
148              -o#field5.  These lists are evaluated from left to right.  Use
149              field name lv_all to view all LV fields, vg_all all VG fields,
150              pv_all all PV fields, pvseg_all all PV segment fields, seg_all
151              all LV segment fields, and pvseg_all all PV segment columns.
152              See the lvm.conf report section for more config options.  See
153              lvmreport(7) for more information about reporting.
154
155       --profile String
156              An alias for --commandprofile or --metadataprofile, depending on
157              the command.
158
159       -q|--quiet ...
160              Suppress output and log messages. Overrides --debug and --ver‐
161              bose.  Repeat once to also suppress any prompts with answer
162              'no'.
163
164       --readonly
165              Run the command in a special read-only mode which will read on-
166              disk metadata without needing to take any locks. This can be
167              used to peek inside metadata used by a virtual machine image
168              while the virtual machine is running. No attempt will be made to
169              communicate with the device-mapper kernel driver, so this option
170              is unable to report whether or not LVs are actually in use.
171
172       --reportformat basic|json
173              Overrides current output format for reports which is defined
174              globally by the report/output_format setting in lvm.conf.  basic
175              is the original format with columns and rows.  If there is more
176              than one report per command, each report is prefixed with the
177              report name for identification. json produces report output in
178              JSON format. See lvmreport(7) for more information.
179
180       --rows
181              Output columns as rows.
182
183       --segments
184              Use default columns that emphasize segment information.
185
186       -S|--select String
187              Select objects for processing and reporting based on specified
188              criteria.  The criteria syntax is described by --select help and
189              lvmreport(7).  For reporting commands, one row is displayed for
190              each object matching the criteria.  See --options help for se‐
191              lectable object fields.  Rows can be displayed with an addi‐
192              tional "selected" field (-o selected) showing 1 if the row
193              matches the selection and 0 otherwise.  For non-reporting com‐
194              mands which process LVM entities, the selection is used to
195              choose items to process.
196
197       --separator String
198              String to use to separate each column. Useful if grepping the
199              output.
200
201       --shared
202              Report/display shared VGs that would otherwise be skipped when
203              lvmlockd is not being used on the host.  See lvmlockd(8) for
204              more information about shared VGs.
205
206       -O|--sort String
207              Comma-separated ordered list of columns to sort by. Replaces the
208              default selection. Precede any column with - for a reverse sort
209              on that column.
210
211       -t|--test
212              Run in test mode. Commands will not update metadata.  This is
213              implemented by disabling all metadata writing but nevertheless
214              returning success to the calling function. This may lead to un‐
215              usual error messages in multi-stage operations if a tool relies
216              on reading back metadata it believes has changed but hasn't.
217
218       --unbuffered
219              Produce output immediately without sorting or aligning the col‐
220              umns properly.
221
222       --units r|R|h|H|b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E
223              All sizes are output in these units: human-(r)eadable with '<'
224              rounding indicator, (h)uman-readable, (b)ytes, (s)ectors,
225              (k)ilobytes, (m)egabytes, (g)igabytes, (t)erabytes, (p)etabytes,
226              (e)xabytes.  Capitalise to use multiples of 1000 (S.I.) instead
227              of 1024.  Custom units can be specified, e.g. --units 3M.
228
229       --unquoted
230              When used with --nameprefixes, output values in the field=value
231              pairs are not quoted.
232
233       -v|--verbose ...
234              Set verbose level. Repeat from 1 to 4 times to increase the de‐
235              tail of messages sent to stdout and stderr.
236
237       --version
238              Display version information.
239
240       -y|--yes
241              Do not prompt for confirmation interactively but always assume
242              the answer yes. Use with extreme caution.  (For automatic no,
243              see -qq.)
244

VARIABLES

246       VG
247              Volume Group name.  See lvm(8) for valid names.
248
249       LV
250              Logical Volume name.  See lvm(8) for valid names.  An  LV  posi‐
251              tional  arg  generally  includes  the  VG name and LV name, e.g.
252              VG/LV.
253
254       Tag
255              Tag name.  See lvm(8) for information about tag names and  using
256              tags in place of a VG, LV or PV.
257
258       String
259              See the option description for information about the string con‐
260              tent.
261
262       Size[UNIT]
263              Size is an input number that accepts an  optional  unit.   Input
264              units are always treated as base two values, regardless of capi‐
265              talization, e.g. 'k' and 'K' both refer to  1024.   The  default
266              input unit is specified by letter, followed by |UNIT.  UNIT rep‐
267              resents other possible input units:  bBsSkKmMgGtTpPeE.   b|B  is
268              bytes,  s|S is sectors of 512 bytes, k|K is KiB, m|M is MiB, g|G
269              is GiB, t|T is TiB, p|P is PiB, e|E is EiB.  (This should not be
270              confused  with the output control --units, where capital letters
271              mean multiple of 1000.)
272

ENVIRONMENT VARIABLES

274       See lvm(8) for information about environment  variables  used  by  lvm.
275       For example, LVM_VG_NAME can generally be substituted for a required VG
276       parameter.
277

NOTES

279       The lv_attr bits are:
280
281       1  Volume type: (C)ache, (m)irrored, (M)irrored without  initial  sync,
282          (o)rigin,  (O)rigin  with  merging  snapshot, (r)aid, (R)aid without
283          initial sync, (s)napshot, merging (S)napshot,  (p)vmove,  (v)irtual,
284          mirror  or  raid (i)mage, mirror or raid (I)mage out-of-sync, mirror
285          (l)og device, under (c)onversion, thin (V)olume, (t)hin pool, (T)hin
286          pool  data,  v(d)o pool, v(D)o pool data, raid or pool m(e)tadata or
287          pool metadata spare.
288
289       2  Permissions: (w)riteable,  (r)ead-only,  (R)ead-only  activation  of
290          non-read-only volume
291
292       3  Allocation  policy:  (a)nywhere, (c)ontiguous, (i)nherited, c(l)ing,
293          (n)ormal This is capitalised  if  the  volume  is  currently  locked
294          against allocation changes, for example during pvmove(8).
295
296       4  fixed (m)inor
297
298       5  State:  (a)ctive, (h)istorical, (s)uspended, (I)nvalid snapshot, in‐
299          valid (S)uspended snapshot, snapshot (m)erge failed, suspended snap‐
300          shot  (M)erge failed, mapped (d)evice present without tables, mapped
301          device present with (i)nactive table, thin-pool (c)heck needed, sus‐
302          pended thin-pool (C)heck needed, (X) unknown
303
304       6  device (o)pen, (X) unknown
305
306       7  Target   type:   (C)ache,   (m)irror,  (r)aid,  (s)napshot,  (t)hin,
307          (u)nknown, (v)irtual.  This groups logical volumes  related  to  the
308          same kernel target together.  So, for example, mirror images, mirror
309          logs as well as mirrors themselves appear as (m)  if  they  use  the
310          original device-mapper mirror kernel driver; whereas the raid equiv‐
311          alents using the md raid kernel driver all appear as (r).  Snapshots
312          using the original device-mapper driver appear as (s); whereas snap‐
313          shots of thin volumes using the new thin provisioning driver  appear
314          as (t).
315
316       8  Newly-allocated  data blocks are overwritten with blocks of (z)eroes
317          before use.
318
319       9  Volume Health, where there are currently three groups of  attributes
320          identified:
321
322          Common ones for all Logical Volumes: (p)artial, (X) unknown.
323          (p)artial  signifies  that  one or more of the Physical Volumes this
324          Logical Volume uses is missing from the system. (X)  unknown  signi‐
325          fies the status is unknown.
326
327          Related  to RAID Logical Volumes: (r)efresh needed, (m)ismatches ex‐
328          ist, (w)ritemostly.
329          (r)efresh signifies that one or more of the  Physical  Volumes  this
330          RAID Logical Volume uses had suffered a write error. The write error
331          could be due to a temporary failure of that Physical  Volume  or  an
332          indication  that  it  is failing.  The device should be refreshed or
333          replaced. (m)ismatches signifies that the RAID  logical  volume  has
334          portions  of  the  array that are not coherent.  Inconsistencies are
335          detected by initiating a "check" on a  RAID  logical  volume.   (The
336          scrubbing  operations,  "check"  and "repair", can be performed on a
337          RAID logical volume via the 'lvchange' command.)  (w)ritemostly sig‐
338          nifies  the devices in a RAID 1 logical volume that have been marked
339          write-mostly.  Re(s)haping signifies a RAID Logical Volume is either
340          undergoing  a  stripe  addition/removal, a stripe size or RAID algo‐
341          rithm change.  (R)emove after reshape signifies freed  striped  raid
342          images to be removed.
343
344          Related to Thin pool Logical Volumes: (F)ailed, out of (D)ata space,
345          (M)etadata read only.
346          (F)ailed is set if thin pool encounters serious failures  and  hence
347          no  further  I/O is permitted at all. The out of (D)ata space is set
348          if thin pool has run out of data space. (M)etadata read only  signi‐
349          fies  that  thin  pool encounters certain types of failures but it's
350          still possible to do reads at least, but no metadata changes are al‐
351          lowed.
352
353          Related to Thin Logical Volumes: (F)ailed.
354          (F)ailed  is  set  when related thin pool enters Failed state and no
355          further I/O is permitted at all.
356
357          Related to writecache logical volumes: (E)rror.
358          (E)rror is set dm-writecache reports an error.
359
360       10 s(k)ip activation: this volume is flagged to be skipped during acti‐
361          vation.
362

SEE ALSO

364       lvm(8) lvm.conf(5) lvmconfig(8)
365
366       pvchange(8)  pvck(8)  pvcreate(8)  pvdisplay(8)  pvmove(8)  pvremove(8)
367       pvresize(8) pvs(8) pvscan(8)
368
369       vgcfgbackup(8) vgcfgrestore(8) vgchange(8) vgck(8)  vgcreate(8)  vgcon‐
370       vert(8)  vgdisplay(8)  vgexport(8)  vgextend(8)  vgimport(8)  vgimport‐
371       clone(8) vgmerge(8) vgmknodes(8)  vgreduce(8)  vgremove(8)  vgrename(8)
372       vgs(8) vgscan(8) vgsplit(8)
373
374       lvcreate(8)  lvchange(8)  lvconvert(8)  lvdisplay(8)  lvextend(8) lvre‐
375       duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
376
377       lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
378       vate(8) lvmdump(8)
379
380       dmeventd(8)  lvmpolld(8)  lvmlockd(8)  lvmlockctl(8)  cmirrord(8) lvmd‐
381       busd(8)
382
383       lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
384
385
386
387Red Hat, Inc.          LVM TOOLS 2.03.11(2) (2021-01-08)                LVS(8)
Impressum