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           [    --trustcache ]
39           [    --unbuffered ]
40           [    --units r|R|h|H|b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E ]
41           [    --unquoted ]
42           [ COMMON_OPTIONS ]
43           [ VG|LV|Tag ... ]
44
45       Common options for lvm:
46           [ -d|--debug ]
47           [ -h|--help ]
48           [ -q|--quiet ]
49           [ -t|--test ]
50           [ -v|--verbose ]
51           [ -y|--yes ]
52           [    --commandprofile String ]
53           [    --config String ]
54           [    --driverloaded y|n ]
55           [    --lockopt String ]
56           [    --longhelp ]
57           [    --nolocking ]
58           [    --profile String ]
59           [    --version ]
60

OPTIONS

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

VARIABLES

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

ENVIRONMENT VARIABLES

280       See lvm(8) for information about environment  variables  used  by  lvm.
281       For example, LVM_VG_NAME can generally be substituted for a required VG
282       parameter.
283

NOTES

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

SEE ALSO

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