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           --nosync
26           --noudevsync
27           --poolmetadatasize [+]Size[m|UNIT]
28           --profile String
29        -q|--quiet
30           --reportformat basic|json
31        -r|--resizefs
32        -L|--size [+|-]Size[m|UNIT]
33        -i|--stripes Number
34        -I|--stripesize Size[k|UNIT]
35        -t|--test
36           --type linear|striped|snapshot|mir‐
37       ror|raid|thin|cache|thin-pool|cache-pool
38        -v|--verbose
39           --version
40        -y|--yes
41

DESCRIPTION

43       lvresize resizes an LV in the same way as lvextend  and  lvreduce.  See
44       lvextend(8) and lvreduce(8) for more information.
45
46       In  the usage section below, --size Size can be replaced with --extents
47       Number.  See both descriptions the options section.
48

USAGE

50       Resize an LV by a specified size.
51
52       lvresize -L|--size [+|-]Size[m|UNIT] LV
53           [ -l|--extents [+|-]Number[PERCENT] ]
54           [ -r|--resizefs ]
55           [    --poolmetadatasize [+]Size[m|UNIT] ]
56           [ COMMON_OPTIONS ]
57           [ PV ... ]
58       -
59
60       Resize an LV by specified PV extents.
61
62       lvresize LV PV ...
63           [ -r|--resizefs ]
64           [ COMMON_OPTIONS ]
65       -
66
67       Resize a pool metadata SubLV by a specified size.
68
69       lvresize --poolmetadatasize [+]Size[m|UNIT] LV_thinpool
70           [ COMMON_OPTIONS ]
71           [ PV ... ]
72       -
73
74       Common options for command:
75           [ -A|--autobackup y|n ]
76           [ -f|--force ]
77           [ -n|--nofsck ]
78           [ -i|--stripes Number ]
79           [ -I|--stripesize Size[k|UNIT] ]
80           [    --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
81           ]
82           [    --nosync ]
83           [    --noudevsync ]
84           [    --reportformat basic|json ]
85           [    --type linear|striped|snapshot|mir‐
86           ror|raid|thin|cache|thin-pool|cache-pool ]
87
88       Common options for lvm:
89           [ -d|--debug ]
90           [ -h|--help ]
91           [ -q|--quiet ]
92           [ -t|--test ]
93           [ -v|--verbose ]
94           [ -y|--yes ]
95           [    --commandprofile String ]
96           [    --config String ]
97           [    --driverloaded y|n ]
98           [    --lockopt String ]
99           [    --longhelp ]
100           [    --profile String ]
101           [    --version ]
102

OPTIONS

104       --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
105              Determines the allocation policy when a command needs to allo‐
106              cate Physical Extents (PEs) from the VG. Each VG and LV has an
107              allocation policy which can be changed with vgchange/lvchange,
108              or overriden on the command line.  normal applies common sense
109              rules such as not placing parallel stripes on the same PV.
110              inherit applies the VG policy to an LV.  contiguous requires new
111              PEs be placed adjacent to existing PEs.  cling places new PEs on
112              the same PV as existing PEs in the same stripe of the LV.  If
113              there are sufficient PEs for an allocation, but normal does not
114              use them, anywhere will use them even if it reduces performance,
115              e.g. by placing two stripes on the same PV.  Optional positional
116              PV args on the command line can also be used to limit which PVs
117              the command will use for allocation.  See lvm(8) for more infor‐
118              mation about allocation.
119
120       -A|--autobackup y|n
121              Specifies if metadata should be backed up automatically after a
122              change.  Enabling this is strongly advised! See vgcfgbackup(8)
123              for more information.
124
125       --commandprofile String
126              The command profile to use for command configuration.  See
127              lvm.conf(5) for more information about profiles.
128
129       --config String
130              Config settings for the command. These override lvm.conf set‐
131              tings.  The String arg uses the same format as lvm.conf, or may
132              use section/field syntax.  See lvm.conf(5) for more information
133              about config.
134
135       -d|--debug ...
136              Set debug level. Repeat from 1 to 6 times to increase the detail
137              of messages sent to the log file and/or syslog (if configured).
138
139       --driverloaded y|n
140              If set to no, the command will not attempt to use device-mapper.
141              For testing and debugging.
142
143       -l|--extents [+|-]Number[PERCENT]
144              Specifies the new size of the LV in logical extents.  The --size
145              and --extents options are alternate methods of specifying size.
146              The total number of physical extents used will be greater when
147              redundant data is needed for RAID levels.  An alternate syntax
148              allows the size to be determined indirectly as a percentage of
149              the size of a related VG, LV, or set of PVs. The suffix %VG
150              denotes the total size of the VG, the suffix %FREE the remaining
151              free space in the VG, and the suffix %PVS the free space in the
152              specified PVs.  For a snapshot, the size can be expressed as a
153              percentage of the total size of the origin LV with the suffix
154              %ORIGIN (100%ORIGIN provides space for the whole origin).  When
155              expressed as a percentage, the size defines an upper limit for
156              the number of logical extents in the new LV. The precise number
157              of logical extents in the new LV is not determined until the
158              command has completed.  When the plus + or minus - prefix is
159              used, the value is not an absolute size, but is relative and
160              added or subtracted from the current size.
161
162       -f|--force ...
163              Override various checks, confirmations and protections.  Use
164              with extreme caution.
165
166       -h|--help
167              Display help text.
168
169       --lockopt String
170              Used to pass options for special cases to lvmlockd.  See lvm‐
171              lockd(8) for more information.
172
173       --longhelp
174              Display long help text.
175
176       -n|--nofsck
177              Do not perform fsck before resizing filesystem when filesystem
178              requires it. You may need to use --force to proceed with this
179              option.
180
181       --nosync
182              Causes the creation of mirror, raid1, raid4, raid5 and raid10 to
183              skip the initial synchronization. In case of mirror, raid1 and
184              raid10, any data written afterwards will be mirrored, but the
185              original contents will not be copied. In case of raid4 and
186              raid5, no parity blocks will be written, though any data written
187              afterwards will cause parity blocks to be stored.  This is use‐
188              ful for skipping a potentially long and resource intensive ini‐
189              tial sync of an empty mirror/raid1/raid4/raid5 and raid10 LV.
190              This option is not valid for raid6, because raid6 relies on
191              proper parity (P and Q Syndromes) being created during initial
192              synchronization in order to reconstruct proper user date in case
193              of device failures.  raid0 and raid0_meta do not provide any
194              data copies or parity support and thus do not support initial
195              synchronization.
196
197       --noudevsync
198              Disables udev synchronisation. The process will not wait for
199              notification from udev. It will continue irrespective of any
200              possible udev processing in the background. Only use this if
201              udev is not running or has rules that ignore the devices LVM
202              creates.
203
204       --poolmetadatasize [+]Size[m|UNIT]
205              Specifies the new size of the pool metadata LV.  The plus prefix
206              + can be used, in which case the value is added to the current
207              size.
208
209       --profile String
210              An alias for --commandprofile or --metadataprofile, depending on
211              the command.
212
213       -q|--quiet ...
214              Suppress output and log messages. Overrides --debug and --ver‐
215              bose.  Repeat once to also suppress any prompts with answer
216              'no'.
217
218       --reportformat basic|json
219              Overrides current output format for reports which is defined
220              globally by the report/output_format setting in lvm.conf.  basic
221              is the original format with columns and rows.  If there is more
222              than one report per command, each report is prefixed with the
223              report name for identification. json produces report output in
224              JSON format. See lvmreport(7) for more information.
225
226       -r|--resizefs
227              Resize underlying filesystem together with the LV using
228              fsadm(8).
229
230       -L|--size [+|-]Size[m|UNIT]
231              Specifies the new size of the LV.  The --size and --extents
232              options are alternate methods of specifying size.  The total
233              number of physical extents used will be greater when redundant
234              data is needed for RAID levels.  When the plus + or minus - pre‐
235              fix is used, the value is not an absolute size, but is relative
236              and added or subtracted from the current size.
237
238       -i|--stripes Number
239              Specifies the number of stripes in a striped LV. This is the
240              number of PVs (devices) that a striped LV is spread across. Data
241              that appears sequential in the LV is spread across multiple
242              devices in units of the stripe size (see --stripesize). This
243              does not change existing allocated space, but only applies to
244              space being allocated by the command.  When creating a RAID
245              4/5/6 LV, this number does not include the extra devices that
246              are required for parity. The largest number depends on the RAID
247              type (raid0: 64, raid10: 32, raid4/5: 63, raid6: 62), and when
248              unspecified, the default depends on the RAID type (raid0: 2,
249              raid10: 2, raid4/5: 3, raid6: 5.)  To stripe a new raid LV
250              across all PVs by default, see lvm.conf alloca‐
251              tion/raid_stripe_all_devices.
252
253       -I|--stripesize Size[k|UNIT]
254              The amount of data that is written to one device before moving
255              to the next in a striped LV.
256
257       -t|--test
258              Run in test mode. Commands will not update metadata.  This is
259              implemented by disabling all metadata writing but nevertheless
260              returning success to the calling function. This may lead to
261              unusual error messages in multi-stage operations if a tool
262              relies on reading back metadata it believes has changed but
263              hasn't.
264
265       --type linear|striped|snapshot|mir‐
266              ror|raid|thin|cache|thin-pool|cache-pool
267              The LV type, also known as "segment type" or "segtype".  See
268              usage descriptions for the specific ways to use these types.
269              For more information about redundancy and performance (raid<N>,
270              mirror, striped, linear) see lvmraid(7).  For thin provisioning
271              (thin, thin-pool) see lvmthin(7).  For performance caching
272              (cache, cache-pool) see lvmcache(7).  For copy-on-write snap‐
273              shots (snapshot) see usage definitions.  Several commands omit
274              an explicit type option because the type is inferred from other
275              options or shortcuts (e.g. --stripes, --mirrors, --snapshot,
276              --virtualsize, --thin, --cache).  Use inferred types with care
277              because it can lead to unexpected results.
278
279       -v|--verbose ...
280              Set verbose level. Repeat from 1 to 4 times to increase the
281              detail of messages sent to stdout and stderr.
282
283       --version
284              Display version information.
285
286       -y|--yes
287              Do not prompt for confirmation interactively but always assume
288              the answer yes. Use with extreme caution.  (For automatic no,
289              see -qq.)
290

VARIABLES

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

ENVIRONMENT VARIABLES

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

EXAMPLES

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

SEE ALSO

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