2008-10-08 16:50:13 +04:00
.TH LVEXTEND 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
2002-01-04 23:35:19 +03:00
.SH NAME
2014-06-11 13:06:30 +04:00
lvextend \(em extend the size of a logical volume
2002-01-04 23:35:19 +03:00
.SH SYNOPSIS
.B lvextend
2012-04-11 16:42:10 +04:00
.RB [ \- \- alloc
.IR AllocationPolicy ]
.RB [ \- A | \- \- autobackup
.RI { y | n }]
2014-05-21 16:53:56 +04:00
.RB [ \- \- commandprofile
.IR ProfileName ]
2012-04-11 16:42:10 +04:00
.RB [ \- d | \- \- debug ]
.RB [ \- h | \- ? | \- \- help ]
2013-04-25 01:41:05 +04:00
.RB [ \- f | \- \- force ]
2012-04-11 16:42:10 +04:00
.RB [ \- i | \- \- stripes
.I Stripes
.RB [ \- I | \- \- stripesize
.IR StripeSize ]]
.RB { \- l | \- \- extents
.RI [ + ] LogicalExtentsNumber [ % { VG | LV | PVS | FREE | ORIGIN }]
|
.BR \- L | \- \- size
.RI [ + ] LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]}
.RB [ \- n | \- \- nofsck ]
2013-04-25 01:41:05 +04:00
.RB [ \- \- noudevsync]
2012-04-11 16:42:10 +04:00
.RB [ \- r | \- \- resizefs ]
2013-04-25 01:41:05 +04:00
.RB [ \- \- use\-policies ]
2012-04-11 16:42:10 +04:00
.RB [ \- t | \- \- test ]
.RB [ \- v | \- \- verbose ]
.I LogicalVolumePath
2014-06-11 13:06:30 +04:00
.RI [ PhysicalVolumePath [ :PE [ \- PE ]]...]
2002-01-04 23:35:19 +03:00
.SH DESCRIPTION
lvextend allows you to extend the size of a logical volume.
Extension of snapshot logical volumes (see
2012-04-11 16:42:10 +04:00
.BR lvcreate (8)
2003-11-14 19:17:55 +03:00
for information to create snapshots) is supported as well.
2006-08-19 02:27:01 +04:00
But to change the number of copies in a mirrored logical
2012-04-11 16:42:10 +04:00
volume use
2006-08-19 01:49:19 +04:00
.BR lvconvert (8).
2002-01-04 23:35:19 +03:00
.SH OPTIONS
2012-04-11 16:42:10 +04:00
See \fB lvm\fP (8) for common options.
2002-01-04 23:35:19 +03:00
.TP
2013-04-25 01:41:05 +04:00
.BR \- f ", " \- \- force
Proceed with size extension without prompting.
2009-08-04 12:09:52 +04:00
.TP
2012-04-11 16:42:10 +04:00
.IR \fB \- l ", " \fB \- \- extents " [" + ] LogicalExtentsNumber [ % { VG | LV | PVS | FREE | ORIGIN }]
2002-01-04 23:35:19 +03:00
Extend or set the logical volume size in units of logical extents.
2012-04-11 16:42:10 +04:00
With the '\fI +\fP ' sign the value is added to the actual size
2002-01-04 23:35:19 +03:00
of the logical volume and without it, the value is taken as an absolute one.
2014-02-25 02:48:23 +04:00
The total number of physical extents allocated will be
greater than this, for example, if the volume is mirrored.
2006-09-26 13:35:43 +04:00
The number can also be expressed as a percentage of the total space
2012-04-11 16:42:10 +04:00
in the Volume Group with the suffix \fI %VG\fP , relative to the existing
size of the Logical Volume with the suffix \fI %LV\fP , of the remaining
free space for the specified PhysicalVolume(s) with the suffix \fI %PVS\fP ,
2010-02-03 06:58:08 +03:00
as a percentage of the remaining free space in the Volume Group
2012-04-11 16:42:10 +04:00
with the suffix \fI %FREE\fP , or (for a snapshot) as a percentage of the total
space in the Origin Logical Volume with the suffix \fI %ORIGIN\fP .
2012-01-05 19:38:18 +04:00
The resulting value is rounded upward.
2014-02-25 02:48:23 +04:00
N.B. In a future release, when expressed as a percentage with PVS, VG or FREE,
the number will be treated as an approximate upper limit for the total number
of physical extents to be allocated (including extents used by any mirrors, for
example). The code may currently allocate more space than you might otherwise
expect.
2002-01-04 23:35:19 +03:00
.TP
2012-04-11 16:42:10 +04:00
.IR \fB \- L ", " \fB \- \- size " [" + ] LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]
2007-01-10 00:12:41 +03:00
Extend or set the logical volume size in units of megabytes.
2006-11-10 21:24:11 +03:00
A size suffix of M for megabytes,
2012-04-11 16:42:10 +04:00
G for gigabytes, T for terabytes, P for petabytes
2006-11-10 21:24:11 +03:00
or E for exabytes is optional.
With the + sign the value is added to the actual size
2002-01-04 23:35:19 +03:00
of the logical volume and without it, the value is taken as an absolute one.
2002-11-18 17:04:08 +03:00
.TP
2012-04-11 16:42:10 +04:00
.BR \- i ", " \- \- stripes " " \fI Stripes
2002-11-18 17:04:08 +03:00
Gives the number of stripes for the extension.
2003-11-14 19:17:55 +03:00
Not applicable to LVs using the original metadata LVM format, which must
use a single value throughout.
2002-11-18 17:04:08 +03:00
.TP
2012-04-11 16:42:10 +04:00
.BR \- I ", " \- \- stripesize " " \fI StripeSize
2002-11-18 17:04:08 +03:00
Gives the number of kilobytes for the granularity of the stripes.
2003-11-14 19:17:55 +03:00
Not applicable to LVs using the original metadata LVM format, which must
use a single value throughout.
2002-11-18 17:04:08 +03:00
.br
StripeSize must be 2^n (n = 2 to 9)
2010-06-17 15:25:43 +04:00
.TP
2012-04-11 16:42:10 +04:00
.BR \- n ", " \- \- nofsck
2010-06-17 15:25:43 +04:00
Do not perform fsck before extending filesystem when filesystem
2012-04-11 16:42:10 +04:00
requires it. You may need to use \fB \- \- force\fR to proceed with
2010-06-17 15:25:43 +04:00
this option.
.TP
2013-04-25 01:41:05 +04:00
.B \- \- noudevsync
Disable udev synchronisation. The
process will not wait for notification from udev.
It will continue irrespective of any possible udev processing
in the background. You should only use this if udev is not running
or has rules that ignore the devices LVM2 creates.
.TP
2012-04-11 16:42:10 +04:00
.BR \- r ", " \- \- resizefs
Resize underlying filesystem together with the logical volume using
2010-06-21 19:56:57 +04:00
\fB fsadm\fR (8).
2013-04-25 01:41:05 +04:00
.TP
.B \- \- use\-policies
Resizes the logical volume according to configured policy. See
\fB lvm.conf\fR (5) for some details.
2002-01-04 23:35:19 +03:00
.SH Examples
2012-04-11 16:42:10 +04:00
Extends the size of the logical volume "vg01/lvol10" by 54MiB on physical
volume /dev/sdk3. This is only possible if /dev/sdk3 is a member of
volume group vg01 and there are enough free physical extents in it:
.sp
2014-06-11 13:06:30 +04:00
.B lvextend \- L +54 /dev/vg01/lvol10 /dev/sdk3
2007-09-21 01:39:08 +04:00
2012-04-11 16:42:10 +04:00
Extends the size of logical volume "vg01/lvol01" by the amount of free
space on physical volume /dev/sdk3. This is equivalent to specifying
2014-06-11 13:06:30 +04:00
"\- l +100%PVS" on the command line:
2012-04-11 16:42:10 +04:00
.sp
.B lvextend /dev/vg01/lvol01 /dev/sdk3
2009-08-10 21:23:04 +04:00
2012-04-11 16:42:10 +04:00
Extends a logical volume "vg01/lvol01" by 16MiB using physical extents
2014-06-11 13:06:30 +04:00
/dev/sda:8\- 9 and /dev/sdb:8\- 9 for allocation of extents:
2012-04-11 16:42:10 +04:00
.sp
2014-06-11 13:06:30 +04:00
.B lvextend -L+16M vg01/lvol01 /dev/sda:8\-9 /dev/sdb:8\-9
2009-08-10 21:23:04 +04:00
2002-01-04 23:35:19 +03:00
.SH SEE ALSO
2010-06-17 15:25:43 +04:00
.BR fsadm (8),
2012-04-11 16:42:10 +04:00
.BR lvm (8),
2013-04-25 01:41:05 +04:00
.BR lvm.conf (5),
2012-04-11 16:42:10 +04:00
.BR lvcreate (8),
.BR lvconvert (8),
.BR lvreduce (8),
.BR lvresize (8),
2002-01-04 23:35:19 +03:00
.BR lvchange (8)