Extending an LVM Partition

Posted by Tres Sat, 20 Oct 2007 13:41:00 GMT

If your LVM partition is running out of room, it’s very easy to add more disk space; use a combination of lvextend, fsck and resize2fs to make that partition bigger.

First, let’s make the logical volume bigger:

[root@calliope mnt]# lvextend -L+1G -r /dev/vol00/partition

In this example, we made the /dev/vol00/partition logical volume 1 gigabyte bigger (-L+1G is where we set how much bigger we want to make it).

The hard part is over, now all we need to do is make sure the extended logical volume doesn’t have errors:

[root@calliope mnt]# e2fsck -f /dev/vol00/partition

And finally, extend the filesystem table to account for the new space:

[root@calliope mnt]# resize2fs /dev/vol00/partition

Posted in ,  | Tags , , , , , , ,