Linux Logical Volume Extend Size

 

Hi,

 

You can extend a volume size in linux by just following the commands below

If you want to extend a size of volume /dev/mapper/volume-var to 400GB you need enter the following command.

lvextend -L400GB /dev/mapper/volume-var

O/P

Extending logical volume var to 400.00 GiB
  Logical volume usr successfully resized

Then resize the volume

resize2fs /dev/mapper/volume-var

O/P

resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/mapper/volume-var is mounted on /var; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 7
Performing an on-line resize of /dev/mapper/volume-var to 26214400 (4k) blocks.
The filesystem on /dev/mapper/volume-var is now 26214400 blocks long.

 

You are done with lvm extending.
[Note: For /var and / partitions you will not be able to unmount them but you may resize the partition without unmounting and it is at your own risk of data loss].

Thank you for viewing https://helpinlinux.com

One comment

Leave a Reply

Protected by WP Anti Spam