1LVRESIZE(8)                 System Manager's Manual                LVRESIZE(8)
2
3
4

NAME

6       lvresize - Resize a logical volume
7

SYNOPSIS

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|vdo|thin-pool|cache-pool|vdo-pool
39        -v|--verbose
40           --version
41        -y|--yes
42

DESCRIPTION

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

USAGE

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|vdo|thin-pool|cache-pool|vdo-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

OPTIONS

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.  in‐
112              herit 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 de‐
152              notes 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 no‐
204              tification from udev. It will continue irrespective of any pos‐
205              sible udev processing in the background. Only use this if udev
206              is not running or has rules that ignore the devices LVM creates.
207
208       --poolmetadatasize [+]Size[m|UNIT]
209              Specifies the new size of the pool metadata LV.  The plus prefix
210              + can be used, in which case the value is added to the current
211              size.
212
213       --profile String
214              An alias for --commandprofile or --metadataprofile, depending on
215              the command.
216
217       -q|--quiet ...
218              Suppress output and log messages. Overrides --debug and --ver‐
219              bose.  Repeat once to also suppress any prompts with answer
220              'no'.
221
222       --reportformat basic|json
223              Overrides current output format for reports which is defined
224              globally by the report/output_format setting in lvm.conf.  basic
225              is the original format with columns and rows.  If there is more
226              than one report per command, each report is prefixed with the
227              report name for identification. json produces report output in
228              JSON format. See lvmreport(7) for more information.
229
230       -r|--resizefs
231              Resize underlying filesystem together with the LV using
232              fsadm(8).
233
234       -L|--size [+|-]Size[m|UNIT]
235              Specifies the new size of the LV.  The --size and --extents op‐
236              tions are alternate methods of specifying size.  The total num‐
237              ber of physical extents used will be greater when redundant data
238              is needed for RAID levels.  When the plus + or minus - prefix is
239              used, the value is not an absolute size, but is relative and
240              added or subtracted from the current size.
241
242       -i|--stripes Number
243              Specifies the number of stripes in a striped LV. This is the
244              number of PVs (devices) that a striped LV is spread across. Data
245              that appears sequential in the LV is spread across multiple de‐
246              vices in units of the stripe size (see --stripesize). This does
247              not change existing allocated space, but only applies to space
248              being allocated by the command.  When creating a RAID 4/5/6 LV,
249              this number does not include the extra devices that are required
250              for parity. The largest number depends on the RAID type (raid0:
251              64, raid10: 32, raid4/5: 63, raid6: 62), and when unspecified,
252              the default depends on the RAID type (raid0: 2, raid10: 2,
253              raid4/5: 3, raid6: 5.)  To stripe a new raid LV across all PVs
254              by default, see lvm.conf allocation/raid_stripe_all_devices.
255
256       -I|--stripesize Size[k|UNIT]
257              The amount of data that is written to one device before moving
258              to the next in a striped LV.
259
260       -t|--test
261              Run in test mode. Commands will not update metadata.  This is
262              implemented by disabling all metadata writing but nevertheless
263              returning success to the calling function. This may lead to un‐
264              usual error messages in multi-stage operations if a tool relies
265              on reading back metadata it believes has changed but hasn't.
266
267       --type linear|striped|snapshot|mir‐
268              ror|raid|thin|cache|vdo|thin-pool|cache-pool|vdo-pool
269              The LV type, also known as "segment type" or "segtype".  See us‐
270              age descriptions for the specific ways to use these types.  For
271              more information about redundancy and performance (raid<N>, mir‐
272              ror, striped, linear) see lvmraid(7).  For thin provisioning
273              (thin, thin-pool) see lvmthin(7).  For performance caching
274              (cache, cache-pool) see lvmcache(7).  For copy-on-write snap‐
275              shots (snapshot) see usage definitions.  For VDO (vdo) see
276              lvmvdo(7).  Several commands omit an explicit type option be‐
277              cause the type is inferred from other options or shortcuts (e.g.
278              --stripes, --mirrors, --snapshot, --virtualsize, --thin,
279              --cache, --vdo).  Use inferred types with care because it can
280              lead to unexpected results.
281
282       -v|--verbose ...
283              Set verbose level. Repeat from 1 to 4 times to increase the de‐
284              tail of messages sent to stdout and stderr.
285
286       --version
287              Display version information.
288
289       -y|--yes
290              Do not prompt for confirmation interactively but always assume
291              the answer yes. Use with extreme caution.  (For automatic no,
292              see -qq.)
293

VARIABLES

295       LV
296              Logical Volume name.  See lvm(8) for valid names.  An  LV  posi‐
297              tional  arg  generally  includes  the  VG name and LV name, e.g.
298              VG/LV.  LV followed by _<type> indicates that an LV of the given
299              type is required. (raid represents raid<N> type)
300
301       PV
302              Physical  Volume  name,  a device path under /dev.  For commands
303              managing physical extents, a PV positional arg generally accepts
304              a suffix indicating a range (or multiple ranges) of physical ex‐
305              tents (PEs). When the first PE is omitted, it  defaults  to  the
306              start of the device, and when the last PE is omitted it defaults
307              to end.  Start and end range (inclusive):  PV[:PE-PE]...   Start
308              and length range (counting from 0): PV[:PE+PE]...
309
310       String
311              See the option description for information about the string con‐
312              tent.
313
314       Size[UNIT]
315              Size is an input number that accepts an  optional  unit.   Input
316              units are always treated as base two values, regardless of capi‐
317              talization, e.g. 'k' and 'K' both refer to  1024.   The  default
318              input unit is specified by letter, followed by |UNIT.  UNIT rep‐
319              resents other possible input units:  bBsSkKmMgGtTpPeE.   b|B  is
320              bytes,  s|S is sectors of 512 bytes, k|K is KiB, m|M is MiB, g|G
321              is GiB, t|T is TiB, p|P is PiB, e|E is EiB.  (This should not be
322              confused  with the output control --units, where capital letters
323              mean multiple of 1000.)
324

ENVIRONMENT VARIABLES

326       See lvm(8) for information about environment  variables  used  by  lvm.
327       For example, LVM_VG_NAME can generally be substituted for a required VG
328       parameter.
329

EXAMPLES

331       Extend an LV by 16MB using specific physical extents:
332       lvresize -L+16M vg1/lv1 /dev/sda:0-1 /dev/sdb:0-1
333

SEE ALSO

335       lvm(8) lvm.conf(5) lvmconfig(8)
336
337       pvchange(8)  pvck(8)  pvcreate(8)  pvdisplay(8)  pvmove(8)  pvremove(8)
338       pvresize(8) pvs(8) pvscan(8)
339
340       vgcfgbackup(8)  vgcfgrestore(8)  vgchange(8) vgck(8) vgcreate(8) vgcon‐
341       vert(8)  vgdisplay(8)  vgexport(8)  vgextend(8)  vgimport(8)  vgimport‐
342       clone(8)  vgmerge(8)  vgmknodes(8)  vgreduce(8) vgremove(8) vgrename(8)
343       vgs(8) vgscan(8) vgsplit(8)
344
345       lvcreate(8) lvchange(8)  lvconvert(8)  lvdisplay(8)  lvextend(8)  lvre‐
346       duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
347
348       lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
349       vate(8) lvmdump(8)
350
351       dmeventd(8) lvmpolld(8)  lvmlockd(8)  lvmlockctl(8)  cmirrord(8)  lvmd‐
352       busd(8)
353
354       lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
355
356
357
358Red Hat, Inc.          LVM TOOLS 2.03.11(2) (2021-01-08)           LVRESIZE(8)
Impressum