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>

Share this

Related Posts

Previous
Next Post »

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