Sharing Knowledge | System Admin Articles

Extend Logical Volume online in Linux

To extend a logical volume, expand the volume group if necessary, and then use following steps:

Either specify the final size of the logical volume:

lvextend --size <size> /dev/<vgname>/<lvname>

or specify how much to expand the logical volume:

lvextend --size +<additional _size> /dev/<vgname>/<lvname>

Instead of specifying the size or amount of space to add in gigabytes, it is also possible to use the -l <num_of_le> to provide the number of logical extents

After extending the logical volume, the filesystem on it must be expanded as well.

If it is an ext3 filesystem (default filesystem for Red Hat Enterprise Linux), it can be expanded while it is still mounted (also known as online).

To do so, execute the following as root:

resize2fs /dev/<vgname>/<lvname>

Labels: Linux, LVM, Quick HOWTO

My Profile PhotoAbout the Author

I'm Parthiban, An UNIX System Admin by Profession. I'm Experienced in Linux/Unix System Administration and Scripting. I have done lot of work on the infrastructure Mgmt side in Linux, UNIX and Windows system administration, Hardware, Storage and Data center. I'm blogging since 2008.
Follow Me On Twitter or On Facebook

0 Comments for "Extend Logical Volume online in Linux"

What do you think about this Article? Add your Opinion..!

Back To Top