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|json_std ]
35 [ --rows ]
36 [ --separator String ]
37 [ --shared ]
38 [ --unbuffered ]
39 [ --units [Number]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 [ --devices PV ]
54 [ --devicesfile String ]
55 [ --driverloaded y|n ]
56 [ --journal String ]
57 [ --lockopt String ]
58 [ --longhelp ]
59 [ --nohints ]
60 [ --nolocking ]
61 [ --profile String ]
62 [ --version ]
63
65 --aligned
66 Use with --separator to align the output columns
67
68 -a|--all
69 Show information about internal LVs. These are components of
70 normal LVs, such as mirrors, which are not independently acces‐
71 sible, e.g. not mountable.
72
73 --binary
74 Use binary values "0" or "1" instead of descriptive literal val‐
75 ues for columns that have exactly two valid values to report
76 (not counting the "unknown" value which denotes that the value
77 could not be determined).
78
79 --commandprofile String
80 The command profile to use for command configuration. See
81 lvm.conf(5) for more information about profiles.
82
83 --config String
84 Config settings for the command. These override lvm.conf(5) set‐
85 tings. The String arg uses the same format as lvm.conf(5), or
86 may use section/field syntax. See lvm.conf(5) for more informa‐
87 tion about config.
88
89 --configreport log|vg|lv|pv|pvseg|seg
90 See lvmreport(7).
91
92 -d|--debug ...
93 Set debug level. Repeat from 1 to 6 times to increase the detail
94 of messages sent to the log file and/or syslog (if configured).
95
96 --devices PV
97 Restricts the devices that are visible and accessible to the
98 command. Devices not listed will appear to be missing. This op‐
99 tion can be repeated, or accepts a comma separated list of de‐
100 vices. This overrides the devices file.
101
102 --devicesfile String
103 A file listing devices that LVM should use. The file must exist
104 in /etc/lvm/devices/ and is managed with the lvmdevices(8) com‐
105 mand. This overrides the lvm.conf(5) devices/devicesfile and
106 devices/use_devicesfile settings.
107
108 --driverloaded y|n
109 If set to no, the command will not attempt to use device-mapper.
110 For testing and debugging.
111
112 --foreign
113 Report/display foreign VGs that would otherwise be skipped. See
114 lvmsystemid(7) for more information about foreign VGs.
115
116 -h|--help
117 Display help text.
118
119 -H|--history
120 Include historical LVs in the output. (This has no effect un‐
121 less LVs were removed while lvm.conf(5) metadata/record_lvs_his‐
122 tory was enabled.
123
124 --ignorelockingfailure
125 Allows a command to continue with read-only metadata operations
126 after locking failures.
127
128 --journal String
129 Record information in the systemd journal. This information is
130 in addition to information enabled by the lvm.conf log/journal
131 setting. command: record information about the command. out‐
132 put: record the default command output. debug: record full com‐
133 mand debugging.
134
135 --lockopt String
136 Used to pass options for special cases to lvmlockd. See lvm‐
137 lockd(8) for more information.
138
139 --logonly
140 Suppress command report and display only log report.
141
142 --longhelp
143 Display long help text.
144
145 --nameprefixes
146 Add an "LVM2_" prefix plus the field name to the output. Useful
147 with --noheadings to produce a list of field=value pairs that
148 can be used to set environment variables (for example, in udev
149 rules).
150
151 --noheadings
152 Suppress the headings line that is normally the first line of
153 output. Useful if grepping the output.
154
155 --nohints
156 Do not use the hints file to locate devices for PVs. A command
157 may read more devices to find PVs when hints are not used. The
158 command will still perform standard hint file invalidation where
159 appropriate.
160
161 --nolocking
162 Disable locking. Use with caution, concurrent commands may pro‐
163 duce incorrect results.
164
165 --nosuffix
166 Suppress the suffix on output sizes. Use with --units (except h
167 and H) if processing the output.
168
169 -o|--options String
170 Comma-separated, ordered list of fields to display in columns.
171 String arg syntax is: [+|-|#]Field1[,Field2 ...] The prefix +
172 will append the specified fields to the default fields, - will
173 remove the specified fields from the default fields, and # will
174 compact specified fields (removing them when empty for all
175 rows.) Use -o help to view the list of all available fields.
176 Use separate lists of fields to add, remove or compact by re‐
177 peating the -o option: -o+field1,field2 -o-field3,field4
178 -o#field5. These lists are evaluated from left to right. Use
179 field name lv_all to view all LV fields, vg_all all VG fields,
180 pv_all all PV fields, pvseg_all all PV segment fields, seg_all
181 all LV segment fields, and pvseg_all all PV segment columns.
182 See the lvm.conf(5) report section for more config options. See
183 lvmreport(7) for more information about reporting.
184
185 --profile String
186 An alias for --commandprofile or --metadataprofile, depending on
187 the command.
188
189 -q|--quiet ...
190 Suppress output and log messages. Overrides --debug and --ver‐
191 bose. Repeat once to also suppress any prompts with answer
192 'no'.
193
194 --readonly
195 Run the command in a special read-only mode which will read on-
196 disk metadata without needing to take any locks. This can be
197 used to peek inside metadata used by a virtual machine image
198 while the virtual machine is running. No attempt will be made to
199 communicate with the device-mapper kernel driver, so this option
200 is unable to report whether or not LVs are actually in use.
201
202 --reportformat basic|json|json_std
203 Overrides current output format for reports which is defined
204 globally by the report/output_format setting in lvm.conf(5).
205 basic is the original format with columns and rows. If there is
206 more than one report per command, each report is prefixed with
207 the report name for identification. json produces report output
208 in JSON format. json_std produces report output in JSON format
209 which is more compliant with JSON standard. See lvmreport(7)
210 for more information.
211
212 --rows
213 Output columns as rows.
214
215 --segments
216 Use default columns that emphasize segment information.
217
218 -S|--select String
219 Select objects for processing and reporting based on specified
220 criteria. The criteria syntax is described by --select help and
221 lvmreport(7). For reporting commands, one row is displayed for
222 each object matching the criteria. See --options help for se‐
223 lectable object fields. Rows can be displayed with an addition‐
224 al "selected" field (-o selected) showing 1 if the row matches
225 the selection and 0 otherwise. For non-reporting commands which
226 process LVM entities, the selection is used to choose items to
227 process.
228
229 --separator String
230 String to use to separate each column. Useful if grepping the
231 output.
232
233 --shared
234 Report/display shared VGs that would otherwise be skipped when
235 lvmlockd is not being used on the host. See lvmlockd(8) for
236 more information about shared VGs.
237
238 -O|--sort String
239 Comma-separated ordered list of columns to sort by. Replaces the
240 default selection. Precede any column with - for a reverse sort
241 on that column.
242
243 -t|--test
244 Run in test mode. Commands will not update metadata. This is
245 implemented by disabling all metadata writing but nevertheless
246 returning success to the calling function. This may lead to un‐
247 usual error messages in multi-stage operations if a tool relies
248 on reading back metadata it believes has changed but hasn't.
249
250 --unbuffered
251 Produce output immediately without sorting or aligning the col‐
252 umns properly.
253
254 --units [Number]r|R|h|H|b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E
255 All sizes are output in these units: human-(r)eadable with '<'
256 rounding indicator, (h)uman-readable, (b)ytes, (s)ectors,
257 (k)ilobytes, (m)egabytes, (g)igabytes, (t)erabytes, (p)etabytes,
258 (e)xabytes. Capitalise to use multiples of 1000 (S.I.) instead
259 of 1024. Custom units can be specified, e.g. --units 3M.
260
261 --unquoted
262 When used with --nameprefixes, output values in the field=value
263 pairs are not quoted.
264
265 -v|--verbose ...
266 Set verbose level. Repeat from 1 to 4 times to increase the de‐
267 tail of messages sent to stdout and stderr.
268
269 --version
270 Display version information.
271
272 -y|--yes
273 Do not prompt for confirmation interactively but always assume
274 the answer yes. Use with extreme caution. (For automatic no,
275 see -qq.)
276
278 VG Volume Group name. See lvm(8) for valid names.
279
280 LV Logical Volume name. See lvm(8) for valid names. An LV posi‐
281 tional arg generally includes the VG name and LV name, e.g.
282 VG/LV.
283
284 Tag Tag name. See lvm(8) for information about tag names and using
285 tags in place of a VG, LV or PV.
286
287 String See the option description for information about the string con‐
288 tent.
289
290 Size[UNIT]
291 Size is an input number that accepts an optional unit. Input
292 units are always treated as base two values, regardless of capi‐
293 talization, e.g. 'k' and 'K' both refer to 1024. The default
294 input unit is specified by letter, followed by |UNIT. UNIT rep‐
295 resents other possible input units: b|B is bytes, s|S is sectors
296 of 512 bytes, k|K is KiB, m|M is MiB, g|G is GiB, t|T is TiB,
297 p|P is PiB, e|E is EiB. (This should not be confused with the
298 output control --units, where capital letters mean multiple of
299 1000.)
300
302 See lvm(8) for information about environment variables used by lvm.
303 For example, LVM_VG_NAME can generally be substituted for a required VG
304 parameter.
305
307 The lv_attr bits are:
308
309 1 Volume type: (C)ache, (m)irrored, (M)irrored without initial sync,
310 (o)rigin, (O)rigin with merging snapshot, (r)aid, (R)aid without
311 initial sync, (s)napshot, merging (S)napshot, (p)vmove, (v)irtual,
312 mirror or raid (i)mage, mirror or raid (I)mage out-of-sync, mirror
313 (l)og device, under (c)onversion, thin (V)olume, (t)hin pool, (T)hin
314 pool data, v(d)o pool, v(D)o pool data, raid or pool m(e)tadata or
315 pool metadata spare.
316
317 2 Permissions: (w)riteable, (r)ead-only, (R)ead-only activation of
318 non-read-only volume
319
320 3 Allocation policy: (a)nywhere, (c)ontiguous, (i)nherited, c(l)ing,
321 (n)ormal This is capitalised if the volume is currently locked
322 against allocation changes, for example during pvmove(8).
323
324 4 fixed (m)inor
325
326 5 State: (a)ctive, (h)istorical, (s)uspended, (I)nvalid snapshot, in‐
327 valid (S)uspended snapshot, snapshot (m)erge failed, suspended snap‐
328 shot (M)erge failed, mapped (d)evice present without tables, mapped
329 device present with (i)nactive table, thin-pool (c)heck needed, sus‐
330 pended thin-pool (C)heck needed, (X) unknown
331
332 6 device (o)pen, (X) unknown
333
334 7 Target type: (C)ache, (m)irror, (r)aid, (s)napshot, (t)hin,
335 (u)nknown, (v)irtual. This groups logical volumes related to the
336 same kernel target together. So, for example, mirror images, mirror
337 logs as well as mirrors themselves appear as (m) if they use the
338 original device-mapper mirror kernel driver; whereas the raid equiv‐
339 alents using the md raid kernel driver all appear as (r). Snapshots
340 using the original device-mapper driver appear as (s); whereas snap‐
341 shots of thin volumes using the new thin provisioning driver appear
342 as (t).
343
344 8 Newly-allocated data blocks are overwritten with blocks of (z)eroes
345 before use.
346
347 9 Volume Health, where there are currently three groups of attributes
348 identified:
349
350 Common ones for all Logical Volumes: (p)artial, (X) unknown.
351 (p)artial signifies that one or more of the Physical Volumes this
352 Logical Volume uses is missing from the system. (X) unknown signi‐
353 fies the status is unknown.
354
355 Related to RAID Logical Volumes: (r)efresh needed, (m)ismatches ex‐
356 ist, (w)ritemostly.
357 (r)efresh signifies that one or more of the Physical Volumes this
358 RAID Logical Volume uses had suffered a write error. The write error
359 could be due to a temporary failure of that Physical Volume or an
360 indication that it is failing. The device should be refreshed or
361 replaced. (m)ismatches signifies that the RAID logical volume has
362 portions of the array that are not coherent. Inconsistencies are
363 detected by initiating a "check" on a RAID logical volume. (The
364 scrubbing operations, "check" and "repair", can be performed on a
365 RAID logical volume via the 'lvchange' command.) (w)ritemostly sig‐
366 nifies the devices in a RAID 1 logical volume that have been marked
367 write-mostly. Re(s)haping signifies a RAID Logical Volume is either
368 undergoing a stripe addition/removal, a stripe size or RAID algo‐
369 rithm change. (R)emove after reshape signifies freed striped raid
370 images to be removed.
371
372 Related to Thin pool Logical Volumes: (F)ailed, out of (D)ata space,
373 (M)etadata read only.
374 (F)ailed is set if thin pool encounters serious failures and hence
375 no further I/O is permitted at all. The out of (D)ata space is set
376 if thin pool has run out of data space. (M)etadata read only signi‐
377 fies that thin pool encounters certain types of failures but it's
378 still possible to do reads at least, but no metadata changes are al‐
379 lowed.
380
381 Related to Thin Logical Volumes: (F)ailed.
382 (F)ailed is set when related thin pool enters Failed state and no
383 further I/O is permitted at all.
384
385 Related to writecache logical volumes: (E)rror.
386 (E)rror is set dm-writecache reports an error.
387
388 10 s(k)ip activation: this volume is flagged to be skipped during acti‐
389 vation.
390
392 lvm(8), lvm.conf(5), lvmconfig(8), lvmdevices(8),
393
394 pvchange(8), pvck(8), pvcreate(8), pvdisplay(8), pvmove(8),
395 pvremove(8), pvresize(8), pvs(8), pvscan(8),
396
397 vgcfgbackup(8), vgcfgrestore(8), vgchange(8), vgck(8), vgcreate(8),
398 vgconvert(8), vgdisplay(8), vgexport(8), vgextend(8), vgimport(8),
399 vgimportclone(8), vgimportdevices(8), vgmerge(8), vgmknodes(8),
400 vgreduce(8), vgremove(8), vgrename(8), vgs(8), vgscan(8), vgsplit(8),
401
402 lvcreate(8), lvchange(8), lvconvert(8), lvdisplay(8), lvextend(8),
403 lvreduce(8), lvremove(8), lvrename(8), lvresize(8), lvs(8), lvscan(8),
404
405 lvm-fullreport(8), lvm-lvpoll(8), blkdeactivate(8), lvmdump(8),
406
407 dmeventd(8), lvmpolld(8), lvmlockd(8), lvmlockctl(8), cmirrord(8),
408 lvmdbusd(8), fsadm(8),
409
410 lvmsystemid(7), lvmreport(7), lvmcache(7), lvmraid(7), lvmthin(7),
411 lvmvdo(7), lvmautoactivation(7)
412
413
414
415
416Red Hat, Inc. LVM TOOLS 2.03.22(2) (2023-08-02) LVS(8)