1LVRESIZE(8) System Manager's Manual LVRESIZE(8)
2
3
4
6 lvresize - Resize a logical volume
7
9 lvresize option_args position_args
10 [ option_args ]
11 [ position_args ]
12
13 --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
14 -A|--autobackup y|n
15 --commandprofile String
16 --config String
17 -d|--debug
18 --driverloaded y|n
19 -l|--extents [+|-]Number[PERCENT]
20 -f|--force
21 -h|--help
22 --lockopt String
23 --longhelp
24 -n|--nofsck
25 --nolocking
26 --nosync
27 --noudevsync
28 --poolmetadatasize [+]Size[m|UNIT]
29 --profile String
30 -q|--quiet
31 --reportformat basic|json
32 -r|--resizefs
33 -L|--size [+|-]Size[m|UNIT]
34 -i|--stripes Number
35 -I|--stripesize Size[k|UNIT]
36 -t|--test
37 --type linear|striped|snapshot|mir‐
38 ror|raid|thin|cache|thin-pool|cache-pool
39 -v|--verbose
40 --version
41 -y|--yes
42
44 lvresize resizes an LV in the same way as lvextend and lvreduce. See
45 lvextend(8) and lvreduce(8) for more information.
46
47 In the usage section below, --size Size can be replaced with --extents
48 Number. See both descriptions the options section.
49
51 Resize an LV by a specified size.
52
53 lvresize -L|--size [+|-]Size[m|UNIT] LV
54 [ -l|--extents [+|-]Number[PERCENT] ]
55 [ -r|--resizefs ]
56 [ --poolmetadatasize [+]Size[m|UNIT] ]
57 [ COMMON_OPTIONS ]
58 [ PV ... ]
59 -
60
61 Resize an LV by specified PV extents.
62
63 lvresize LV PV ...
64 [ -r|--resizefs ]
65 [ COMMON_OPTIONS ]
66 -
67
68 Resize a pool metadata SubLV by a specified size.
69
70 lvresize --poolmetadatasize [+]Size[m|UNIT] LV_thinpool
71 [ COMMON_OPTIONS ]
72 [ PV ... ]
73 -
74
75 Common options for command:
76 [ -A|--autobackup y|n ]
77 [ -f|--force ]
78 [ -n|--nofsck ]
79 [ -i|--stripes Number ]
80 [ -I|--stripesize Size[k|UNIT] ]
81 [ --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
82 ]
83 [ --nosync ]
84 [ --noudevsync ]
85 [ --reportformat basic|json ]
86 [ --type linear|striped|snapshot|mir‐
87 ror|raid|thin|cache|thin-pool|cache-pool ]
88
89 Common options for lvm:
90 [ -d|--debug ]
91 [ -h|--help ]
92 [ -q|--quiet ]
93 [ -t|--test ]
94 [ -v|--verbose ]
95 [ -y|--yes ]
96 [ --commandprofile String ]
97 [ --config String ]
98 [ --driverloaded y|n ]
99 [ --lockopt String ]
100 [ --longhelp ]
101 [ --nolocking ]
102 [ --profile String ]
103 [ --version ]
104
106 --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
107 Determines the allocation policy when a command needs to allo‐
108 cate Physical Extents (PEs) from the VG. Each VG and LV has an
109 allocation policy which can be changed with vgchange/lvchange,
110 or overriden on the command line. normal applies common sense
111 rules such as not placing parallel stripes on the same PV.
112 inherit applies the VG policy to an LV. contiguous requires new
113 PEs be placed adjacent to existing PEs. cling places new PEs on
114 the same PV as existing PEs in the same stripe of the LV. If
115 there are sufficient PEs for an allocation, but normal does not
116 use them, anywhere will use them even if it reduces performance,
117 e.g. by placing two stripes on the same PV. Optional positional
118 PV args on the command line can also be used to limit which PVs
119 the command will use for allocation. See lvm(8) for more infor‐
120 mation about allocation.
121
122 -A|--autobackup y|n
123 Specifies if metadata should be backed up automatically after a
124 change. Enabling this is strongly advised! See vgcfgbackup(8)
125 for more information.
126
127 --commandprofile String
128 The command profile to use for command configuration. See
129 lvm.conf(5) for more information about profiles.
130
131 --config String
132 Config settings for the command. These override lvm.conf set‐
133 tings. The String arg uses the same format as lvm.conf, or may
134 use section/field syntax. See lvm.conf(5) for more information
135 about config.
136
137 -d|--debug ...
138 Set debug level. Repeat from 1 to 6 times to increase the detail
139 of messages sent to the log file and/or syslog (if configured).
140
141 --driverloaded y|n
142 If set to no, the command will not attempt to use device-mapper.
143 For testing and debugging.
144
145 -l|--extents [+|-]Number[PERCENT]
146 Specifies the new size of the LV in logical extents. The --size
147 and --extents options are alternate methods of specifying size.
148 The total number of physical extents used will be greater when
149 redundant data is needed for RAID levels. An alternate syntax
150 allows the size to be determined indirectly as a percentage of
151 the size of a related VG, LV, or set of PVs. The suffix %VG
152 denotes the total size of the VG, the suffix %FREE the remaining
153 free space in the VG, and the suffix %PVS the free space in the
154 specified PVs. For a snapshot, the size can be expressed as a
155 percentage of the total size of the origin LV with the suffix
156 %ORIGIN (100%ORIGIN provides space for the whole origin). When
157 expressed as a percentage, the size defines an upper limit for
158 the number of logical extents in the new LV. The precise number
159 of logical extents in the new LV is not determined until the
160 command has completed. When the plus + or minus - prefix is
161 used, the value is not an absolute size, but is relative and
162 added or subtracted from the current size.
163
164 -f|--force ...
165 Override various checks, confirmations and protections. Use
166 with extreme caution.
167
168 -h|--help
169 Display help text.
170
171 --lockopt String
172 Used to pass options for special cases to lvmlockd. See lvm‐
173 lockd(8) for more information.
174
175 --longhelp
176 Display long help text.
177
178 -n|--nofsck
179 Do not perform fsck before resizing filesystem when filesystem
180 requires it. You may need to use --force to proceed with this
181 option.
182
183 --nolocking
184 Disable locking.
185
186 --nosync
187 Causes the creation of mirror, raid1, raid4, raid5 and raid10 to
188 skip the initial synchronization. In case of mirror, raid1 and
189 raid10, any data written afterwards will be mirrored, but the
190 original contents will not be copied. In case of raid4 and
191 raid5, no parity blocks will be written, though any data written
192 afterwards will cause parity blocks to be stored. This is use‐
193 ful for skipping a potentially long and resource intensive ini‐
194 tial sync of an empty mirror/raid1/raid4/raid5 and raid10 LV.
195 This option is not valid for raid6, because raid6 relies on
196 proper parity (P and Q Syndromes) being created during initial
197 synchronization in order to reconstruct proper user date in case
198 of device failures. raid0 and raid0_meta do not provide any
199 data copies or parity support and thus do not support initial
200 synchronization.
201
202 --noudevsync
203 Disables udev synchronisation. The process will not wait for
204 notification from udev. It will continue irrespective of any
205 possible udev processing in the background. Only use this if
206 udev is not running or has rules that ignore the devices LVM
207 creates.
208
209 --poolmetadatasize [+]Size[m|UNIT]
210 Specifies the new size of the pool metadata LV. The plus prefix
211 + can be used, in which case the value is added to the current
212 size.
213
214 --profile String
215 An alias for --commandprofile or --metadataprofile, depending on
216 the command.
217
218 -q|--quiet ...
219 Suppress output and log messages. Overrides --debug and --ver‐
220 bose. Repeat once to also suppress any prompts with answer
221 'no'.
222
223 --reportformat basic|json
224 Overrides current output format for reports which is defined
225 globally by the report/output_format setting in lvm.conf. basic
226 is the original format with columns and rows. If there is more
227 than one report per command, each report is prefixed with the
228 report name for identification. json produces report output in
229 JSON format. See lvmreport(7) for more information.
230
231 -r|--resizefs
232 Resize underlying filesystem together with the LV using
233 fsadm(8).
234
235 -L|--size [+|-]Size[m|UNIT]
236 Specifies the new size of the LV. The --size and --extents
237 options are alternate methods of specifying size. The total
238 number of physical extents used will be greater when redundant
239 data is needed for RAID levels. When the plus + or minus - pre‐
240 fix is used, the value is not an absolute size, but is relative
241 and added or subtracted from the current size.
242
243 -i|--stripes Number
244 Specifies the number of stripes in a striped LV. This is the
245 number of PVs (devices) that a striped LV is spread across. Data
246 that appears sequential in the LV is spread across multiple
247 devices in units of the stripe size (see --stripesize). This
248 does not change existing allocated space, but only applies to
249 space being allocated by the command. When creating a RAID
250 4/5/6 LV, this number does not include the extra devices that
251 are required for parity. The largest number depends on the RAID
252 type (raid0: 64, raid10: 32, raid4/5: 63, raid6: 62), and when
253 unspecified, the default depends on the RAID type (raid0: 2,
254 raid10: 2, raid4/5: 3, raid6: 5.) To stripe a new raid LV
255 across all PVs by default, see lvm.conf alloca‐
256 tion/raid_stripe_all_devices.
257
258 -I|--stripesize Size[k|UNIT]
259 The amount of data that is written to one device before moving
260 to the next in a striped LV.
261
262 -t|--test
263 Run in test mode. Commands will not update metadata. This is
264 implemented by disabling all metadata writing but nevertheless
265 returning success to the calling function. This may lead to
266 unusual error messages in multi-stage operations if a tool
267 relies on reading back metadata it believes has changed but
268 hasn't.
269
270 --type linear|striped|snapshot|mir‐
271 ror|raid|thin|cache|thin-pool|cache-pool
272 The LV type, also known as "segment type" or "segtype". See
273 usage descriptions for the specific ways to use these types.
274 For more information about redundancy and performance (raid<N>,
275 mirror, striped, linear) see lvmraid(7). For thin provisioning
276 (thin, thin-pool) see lvmthin(7). For performance caching
277 (cache, cache-pool) see lvmcache(7). For copy-on-write snap‐
278 shots (snapshot) see usage definitions. Several commands omit
279 an explicit type option because the type is inferred from other
280 options or shortcuts (e.g. --stripes, --mirrors, --snapshot,
281 --virtualsize, --thin, --cache). Use inferred types with care
282 because it can lead to unexpected results.
283
284 -v|--verbose ...
285 Set verbose level. Repeat from 1 to 4 times to increase the
286 detail of messages sent to stdout and stderr.
287
288 --version
289 Display version information.
290
291 -y|--yes
292 Do not prompt for confirmation interactively but always assume
293 the answer yes. Use with extreme caution. (For automatic no,
294 see -qq.)
295
297 LV
298 Logical Volume name. See lvm(8) for valid names. An LV posi‐
299 tional arg generally includes the VG name and LV name, e.g.
300 VG/LV. LV followed by _<type> indicates that an LV of the given
301 type is required. (raid represents raid<N> type)
302
303 PV
304 Physical Volume name, a device path under /dev. For commands
305 managing physical extents, a PV positional arg generally accepts
306 a suffix indicating a range (or multiple ranges) of physical
307 extents (PEs). When the first PE is omitted, it defaults to the
308 start of the device, and when the last PE is omitted it defaults
309 to end. Start and end range (inclusive): PV[:PE-PE]... Start
310 and length range (counting from 0): PV[:PE+PE]...
311
312 String
313 See the option description for information about the string con‐
314 tent.
315
316 Size[UNIT]
317 Size is an input number that accepts an optional unit. Input
318 units are always treated as base two values, regardless of capi‐
319 talization, e.g. 'k' and 'K' both refer to 1024. The default
320 input unit is specified by letter, followed by |UNIT. UNIT rep‐
321 resents other possible input units: bBsSkKmMgGtTpPeE. b|B is
322 bytes, s|S is sectors of 512 bytes, k|K is kilobytes, m|M is
323 megabytes, g|G is gigabytes, t|T is terabytes, p|P is petabytes,
324 e|E is exabytes. (This should not be confused with the output
325 control --units, where capital letters mean multiple of 1000.)
326
328 See lvm(8) for information about environment variables used by lvm.
329 For example, LVM_VG_NAME can generally be substituted for a required VG
330 parameter.
331
333 Extend an LV by 16MB using specific physical extents:
334 lvresize -L+16M vg1/lv1 /dev/sda:0-1 /dev/sdb:0-1
335
337 lvm(8) lvm.conf(5) lvmconfig(8)
338
339 pvchange(8) pvck(8) pvcreate(8) pvdisplay(8) pvmove(8) pvremove(8)
340 pvresize(8) pvs(8) pvscan(8)
341
342 vgcfgbackup(8) vgcfgrestore(8) vgchange(8) vgck(8) vgcreate(8) vgcon‐
343 vert(8) vgdisplay(8) vgexport(8) vgextend(8) vgimport(8) vgimport‐
344 clone(8) vgmerge(8) vgmknodes(8) vgreduce(8) vgremove(8) vgrename(8)
345 vgs(8) vgscan(8) vgsplit(8)
346
347 lvcreate(8) lvchange(8) lvconvert(8) lvdisplay(8) lvextend(8) lvre‐
348 duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
349
350 lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
351 vate(8) lvmdump(8)
352
353 dmeventd(8) lvmpolld(8) lvmlockd(8) lvmlockctl(8) cmirrord(8) lvmd‐
354 busd(8)
355
356 lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
357
358
359
360Red Hat, Inc. LVM TOOLS 2.03.02(2)-RHEL8 (2019-01-04) LVRESIZE(8)