1LVS(8) System Manager's Manual LVS(8)
2
3
4
6 lvs - Display information about logical volumes
7
9 lvs
10 [ option_args ]
11 [ position_args ]
12
14 lvs produces formatted output about LVs.
15
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
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
105 unless LVs were removed while lvm.conf metadata/record_lvs_his‐
106 tory 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
147 repeating 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
191 selectable 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
215 unusual error messages in multi-stage operations if a tool
216 relies on reading back metadata it believes has changed but
217 hasn't.
218
219 --unbuffered
220 Produce output immediately without sorting or aligning the col‐
221 umns properly.
222
223 --units r|R|h|H|b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E
224 All sizes are output in these units: human-(r)eadable with '<'
225 rounding indicator, (h)uman-readable, (b)ytes, (s)ectors,
226 (k)ilobytes, (m)egabytes, (g)igabytes, (t)erabytes, (p)etabytes,
227 (e)xabytes. Capitalise to use multiples of 1000 (S.I.) instead
228 of 1024. Custom units can be specified, e.g. --units 3M.
229
230 --unquoted
231 When used with --nameprefixes, output values in the field=value
232 pairs are not quoted.
233
234 -v|--verbose ...
235 Set verbose level. Repeat from 1 to 4 times to increase the
236 detail of messages sent to stdout and stderr.
237
238 --version
239 Display version information.
240
241 -y|--yes
242 Do not prompt for confirmation interactively but always assume
243 the answer yes. Use with extreme caution. (For automatic no,
244 see -qq.)
245
247 VG
248 Volume Group name. See lvm(8) for valid names.
249
250 LV
251 Logical Volume name. See lvm(8) for valid names. An LV posi‐
252 tional arg generally includes the VG name and LV name, e.g.
253 VG/LV.
254
255 Tag
256 Tag name. See lvm(8) for information about tag names and using
257 tags in place of a VG, LV or PV.
258
259 String
260 See the option description for information about the string con‐
261 tent.
262
263 Size[UNIT]
264 Size is an input number that accepts an optional unit. Input
265 units are always treated as base two values, regardless of capi‐
266 talization, e.g. 'k' and 'K' both refer to 1024. The default
267 input unit is specified by letter, followed by |UNIT. UNIT rep‐
268 resents other possible input units: bBsSkKmMgGtTpPeE. b|B is
269 bytes, s|S is sectors of 512 bytes, k|K is kilobytes, m|M is
270 megabytes, g|G is gigabytes, t|T is terabytes, p|P is petabytes,
271 e|E is exabytes. (This should not be confused with the output
272 control --units, where capital letters mean multiple of 1000.)
273
275 See lvm(8) for information about environment variables used by lvm.
276 For example, LVM_VG_NAME can generally be substituted for a required VG
277 parameter.
278
280 The lv_attr bits are:
281
282 1 Volume type: (C)ache, (m)irrored, (M)irrored without initial sync,
283 (o)rigin, (O)rigin with merging snapshot, (r)aid, (R)aid without
284 initial sync, (s)napshot, merging (S)napshot, (p)vmove, (v)irtual,
285 mirror or raid (i)mage, mirror or raid (I)mage out-of-sync, mirror
286 (l)og device, under (c)onversion, thin (V)olume, (t)hin pool, (T)hin
287 pool data, v(d)o pool, v(D)o pool data, raid or pool m(e)tadata or
288 pool metadata spare.
289
290 2 Permissions: (w)riteable, (r)ead-only, (R)ead-only activation of
291 non-read-only volume
292
293 3 Allocation policy: (a)nywhere, (c)ontiguous, (i)nherited, c(l)ing,
294 (n)ormal This is capitalised if the volume is currently locked
295 against allocation changes, for example during pvmove(8).
296
297 4 fixed (m)inor
298
299 5 State: (a)ctive, (h)istorical, (s)uspended, (I)nvalid snapshot,
300 invalid (S)uspended snapshot, snapshot (m)erge failed, suspended
301 snapshot (M)erge failed, mapped (d)evice present without tables,
302 mapped device present with (i)nactive table, thin-pool (c)heck
303 needed, suspended thin-pool (C)heck needed, (X) unknown
304
305 6 device (o)pen, (X) unknown
306
307 7 Target type: (C)ache, (m)irror, (r)aid, (s)napshot, (t)hin,
308 (u)nknown, (v)irtual. This groups logical volumes related to the
309 same kernel target together. So, for example, mirror images, mirror
310 logs as well as mirrors themselves appear as (m) if they use the
311 original device-mapper mirror kernel driver; whereas the raid equiv‐
312 alents using the md raid kernel driver all appear as (r). Snapshots
313 using the original device-mapper driver appear as (s); whereas snap‐
314 shots of thin volumes using the new thin provisioning driver appear
315 as (t).
316
317 8 Newly-allocated data blocks are overwritten with blocks of (z)eroes
318 before use.
319
320 9 Volume Health, where there are currently three groups of attributes
321 identified:
322
323 Common ones for all Logical Volumes: (p)artial, (X) unknown.
324 (p)artial signifies that one or more of the Physical Volumes this
325 Logical Volume uses is missing from the system. (X) unknown signi‐
326 fies the status is unknown.
327
328 Related to RAID Logical Volumes: (r)efresh needed, (m)ismatches
329 exist, (w)ritemostly.
330 (r)efresh signifies that one or more of the Physical Volumes this
331 RAID Logical Volume uses had suffered a write error. The write error
332 could be due to a temporary failure of that Physical Volume or an
333 indication that it is failing. The device should be refreshed or
334 replaced. (m)ismatches signifies that the RAID logical volume has
335 portions of the array that are not coherent. Inconsistencies are
336 detected by initiating a "check" on a RAID logical volume. (The
337 scrubbing operations, "check" and "repair", can be performed on a
338 RAID logical volume via the 'lvchange' command.) (w)ritemostly sig‐
339 nifies the devices in a RAID 1 logical volume that have been marked
340 write-mostly. Re(s)haping signifies a RAID Logical Volume is either
341 undergoing a stripe addition/removal, a stripe size or RAID algo‐
342 rithm change. (R)emove after reshape signifies freed striped raid
343 images to be removed.
344
345 Related to Thin pool Logical Volumes: (F)ailed, out of (D)ata space,
346 (M)etadata read only.
347 (F)ailed is set if thin pool encounters serious failures and hence
348 no further I/O is permitted at all. The out of (D)ata space is set
349 if thin pool has run out of data space. (M)etadata read only signi‐
350 fies that thin pool encounters certain types of failures but it's
351 still possible to do reads at least, but no metadata changes are
352 allowed.
353
354 Related to Thin Logical Volumes: (F)ailed.
355 (F)ailed is set when related thin pool enters Failed state and no
356 further I/O is permitted at all.
357
358 Related to writecache logical volumes: (E)rror.
359 (E)rror is set dm-writecache reports an error.
360
361 10 s(k)ip activation: this volume is flagged to be skipped during acti‐
362 vation.
363
365 lvm(8) lvm.conf(5) lvmconfig(8)
366
367 pvchange(8) pvck(8) pvcreate(8) pvdisplay(8) pvmove(8) pvremove(8)
368 pvresize(8) pvs(8) pvscan(8)
369
370 vgcfgbackup(8) vgcfgrestore(8) vgchange(8) vgck(8) vgcreate(8) vgcon‐
371 vert(8) vgdisplay(8) vgexport(8) vgextend(8) vgimport(8) vgimport‐
372 clone(8) vgmerge(8) vgmknodes(8) vgreduce(8) vgremove(8) vgrename(8)
373 vgs(8) vgscan(8) vgsplit(8)
374
375 lvcreate(8) lvchange(8) lvconvert(8) lvdisplay(8) lvextend(8) lvre‐
376 duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
377
378 lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
379 vate(8) lvmdump(8)
380
381 dmeventd(8) lvmpolld(8) lvmlockd(8) lvmlockctl(8) cmirrord(8) lvmd‐
382 busd(8)
383
384 lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
385
386
387
388Red Hat, Inc. LVM TOOLS 2.03.10(2) (2020-08-09) LVS(8)