Howto extend a logical volume

I frequently need to increase the size of the LVM file systems I have mounted on my various Linux machines.

$ sudo /usr/sbin/lvextend +16G /dev/VolGroup00/LogVolBackup00 Path required for Logical Volume "+16G" Please provide a volume group name Run `lvextend --help' for more information. [rusharri@landfill ~]$ sudo /usr/sbin/lvextend -L+16G /dev/VolGroup00/LogVolBackup00 /dev/hdb: open failed: No medium found Extending logical volume LogVolBackup00 to 32.00 GB Logical volume LogVolBackup00 successfully resized

$ sudo /sbin/e2fsck -f /dev/VolGroup00/LogVolBackup00 e2fsck 1.39 (29-May-2006) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information LogVolBackup00: 534741/2097152 files (0.0% non-contiguous), 4193824/4194304 blocks

$ sudo /sbin/resize2fs /dev/VolGroup00/LogVolBackup00 resize2fs 1.39 (29-May-2006) Resizing the filesystem on /dev/VolGroup00/LogVolBackup00 to 8388608 (4k) blocks. The filesystem on /dev/VolGroup00/LogVolBackup00 is now 8388608 blocks long.

[rusharri@landfill ~]$ sudo /sbin/resize2fs /dev/VolGroup00/LogVolBackup00 resize2fs 1.39 (29-May-2006) Please run 'e2fsck -f /dev/VolGroup00/LogVolBackup00' first.