Growing Logical Volumes - Red Hat LVM ADMINISTRATOR FOR RHEL 4.5 Administrator's Manual

Lvm administrator's guide for rhel 4.5
Table of Contents

Advertisement

Chapter 4. LVM Administration with CLI Commands
mapping) in a fixed format.
The following command shows the attributes of
been created for this original logical volume, this command shows a list of all snapshot logical
volumes and their status (active or inactive) as well.
lvdisplay -v /dev/vg00/lvol2
The
command scans for all logical volumes in the system and lists them, as in the
lvscan
following example.
# lvscan
ACTIVE

4.8. Growing Logical Volumes

To increase the size of a logical volume, use the
After extending the logical volume, you will need to increase the size of the associated file
system to match.
When you extend the logical volume, you can indicate how much you want to extend the
volume, or how large you want it to be after you extend it.
The following command extends the logical volumne
# lvextend -L12G /dev/myvg/homevol
lvextend -- extending logical volume "/dev/myvg/homevol" to 12 GB
lvextend -- doing automatic backup of volume group "myvg"
lvextend -- logical volume "/dev/myvg/homevol" successfully extended
The following command adds another gigabyte to the logical volume
# lvextend -L+1G /dev/myvg/homevol
lvextend -- extending logical volume "/dev/myvg/homevol" to 13 GB
lvextend -- doing automatic backup of volume group "myvg"
lvextend -- logical volume "/dev/myvg/homevol" successfully extended
As with the
lvcreate
specify the number of extents by which to increase the size of the logical volume. You can also
use this argument to specify a percentage of the volume group, or a percentage of the
remaining free space in the volume group. The following command extends the logical volume
called
to fill all of the unallocated space in the volume group
testlv
40
'/dev/vg0/gfslv' [1.46 GB] inherit
command, you can use the
in
. If snapshot logical volumes have
lvol2
vg00
command.
lvextend
/dev/myvg/homevol
/dev/myvg/homevol
argument of the
-l
lvextend
myvg
to 12 gigabytes.
.
command to
.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Configuration and administration 4.5

Table of Contents