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           [    --ignoreskippedcluster ]
30           [    --logonly ]
31           [    --nameprefixes ]
32           [    --noheadings ]
33           [    --nolocking ]
34           [    --nosuffix ]
35           [    --readonly ]
36           [    --reportformat basic|json ]
37           [    --rows ]
38           [    --separator String ]
39           [    --shared ]
40           [    --trustcache ]
41           [    --unbuffered ]
42           [    --units r|R|h|H|b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E ]
43           [    --unquoted ]
44           [ COMMON_OPTIONS ]
45           [ VG|LV|Tag ... ]
46
47       Common options for lvm:
48           [ -d|--debug ]
49           [ -h|--help ]
50           [ -q|--quiet ]
51           [ -t|--test ]
52           [ -v|--verbose ]
53           [ -y|--yes ]
54           [    --commandprofile String ]
55           [    --config String ]
56           [    --driverloaded y|n ]
57           [    --lockopt String ]
58           [    --longhelp ]
59           [    --profile String ]
60           [    --version ]
61

OPTIONS

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

VARIABLES

259       VG
260              Volume Group name.  See lvm(8) for valid names.
261
262       LV
263              Logical  Volume  name.  See lvm(8) for valid names.  An LV posi‐
264              tional arg generally includes the VG  name  and  LV  name,  e.g.
265              VG/LV.
266
267       Tag
268              Tag  name.  See lvm(8) for information about tag names and using
269              tags in place of a VG, LV or PV.
270
271       String
272              See the option description for information about the string con‐
273              tent.
274
275       Size[UNIT]
276              Size  is  an  input number that accepts an optional unit.  Input
277              units are always treated as base two values, regardless of capi‐
278              talization,  e.g.  'k'  and 'K' both refer to 1024.  The default
279              input unit is specified by letter, followed by |UNIT.  UNIT rep‐
280              resents  other  possible  input units: bBsSkKmMgGtTpPeE.  b|B is
281              bytes, s|S is sectors of 512 bytes, k|K  is  kilobytes,  m|M  is
282              megabytes, g|G is gigabytes, t|T is terabytes, p|P is petabytes,
283              e|E is exabytes.  (This should not be confused with  the  output
284              control --units, where capital letters mean multiple of 1000.)
285

ENVIRONMENT VARIABLES

287       See  lvm(8)  for  information  about environment variables used by lvm.
288       For example, LVM_VG_NAME can generally be substituted for a required VG
289       parameter.
290

NOTES

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

SEE ALSO

371       lvm(8) lvm.conf(5) lvmconfig(8)
372
373       pvchange(8)  pvck(8)  pvcreate(8)  pvdisplay(8)  pvmove(8)  pvremove(8)
374       pvresize(8) pvs(8) pvscan(8)
375
376       vgcfgbackup(8) vgcfgrestore(8) vgchange(8) vgck(8)  vgcreate(8)  vgcon‐
377       vert(8)  vgdisplay(8)  vgexport(8)  vgextend(8)  vgimport(8)  vgimport‐
378       clone(8) vgmerge(8) vgmknodes(8)  vgreduce(8)  vgremove(8)  vgrename(8)
379       vgs(8) vgscan(8) vgsplit(8)
380
381       lvcreate(8)  lvchange(8)  lvconvert(8)  lvdisplay(8)  lvextend(8) lvre‐
382       duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
383
384       lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
385       vate(8) lvmdump(8)
386
387       dmeventd(8)  lvmetad(8)  lvmpolld(8) lvmlockd(8) lvmlockctl(8) clvmd(8)
388       cmirrord(8) lvmdbusd(8)
389
390       lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
391
392
393
394Red Hat, Inc.         LVM TOOLS 2.02.183(2) (2018-12-07)                LVS(8)
Impressum