
Chapter 11. Miscellaneous recipes 151
Extend the logical volume and the file system
Now that you have free space in the volume group, you can increase the size of the existing
logical volume with the lvextend command. The -l option specifies the number extents to
add. Finally, use the ext2online command, which increases the size of the file system while it
is mounted. You can use the df command to show the file system size before and after you
extend it as Example 11-13 shows.
Example 11-13 Using lvextend
# lvextend -l +533 /dev/vg0/lv0
Extending logical volume lv0 to 4.16 GB
Logical volume lv0 successfully resized
# df -h /mnt/data
Filesystem