Installation guide

Table Of Contents
At this point you cannot extend the striped logical volume to the full size of the volume group,
because two underlying devices are needed in order to stripe the data.
# lvextend vg/stripe1 -L 406G
Using stripesize of last segment 64.00 KB
Extending logical volume stripe1 to 406.00 GB
Insufficient suitable allocatable extents for logical volume stripe1: 34480
more required
To extend the striped logical volume, add another physical volume and then extend the logical
volume. In this example, having added two physical volumes to the volume group we can ex-
tend the logical volume 5A to the full size of the volume group.
# vgextend vg /dev/sdd1
Volume group "vg" successfully extended
# vgs
VG #PV #LV #SN Attr VSize VFree
vg 4 1 0 wz--n- 542.62G 271.31G
# lvextend vg/stripe1 -L 542G
Using stripesize of last segment 64.00 KB
Extending logical volume stripe1 to 542.00 GB
Logical volume stripe1 successfully resized
If you do not have enough underlying physical devices to extend the striped logical volume, it is
possible to extend the volume anyway if it does not matter that the extension is not striped,
which may result in uneven performance. When adding space to the logical volume, the default
operation is to use the same striping paramgers of the last segment of the existing logical
volume, but you can override those parameters. The following example extends the existing
striped logical volume to use the remaining free space after the initial lvextend command fails.
# lvextend vg/stripe1 -L 406G
Using stripesize of last segment 64.00 KB
Extending logical volume stripe1 to 406.00 GB
Insufficient suitable allocatable extents for logical volume stripe1: 34480
more required
# lvextend -iL -l+100%FREE vg/stripe1
4.10. Shrinking Logical Volumes
To reduce the size of a logical volume, first unmount the file system. You can then use the lvre-
duce command to shrink the volume. After shrinking the volume, remount the file system.
Caution
It is important to reduce the size of the file system or whatever is residing in the
volume before shrinking the volume itself, otherwise you risk losing data.
Shrinking a logical volume frees some of the volume group to be allocated to other logical
volumes in the volume group.
The following example reduces the size of logical volume lvol1 in volume group vg00 by 3 logic-
4.10. Shrinking Logical Volumes
36