How to extend the LVM Partition / Resizing lvm partion
If required space is not available in the VG then request Vmware or SAN team for a new disk.
To Extend the lvm partion, we need to have free space in volume group. This can be verified from the vgs command.
# vgs VG #PV #LV #SN Attr VSize VFree vg0 1 1 0 wz--n- 3.06G 2.06G suse01:~ #
Once the required space is available in Volume group then we can extend the space for LVM partition like below.
suse01:~ # lvextend -L+500M /dev/vg0/lvm1
Extending logical volume lvm1 to 1.49 GB
Logical volume lvm1 successfully resized
suse01:~ #
Run resize2fs command to update the newly added space to the LVM partition
suse01:~ # resize2fs /dev/vg0/lvm1
resize2fs 1.41.9 (22-Aug-2009)
resize2fs: Bad magic number in super-block while trying to open /dev/vg0/lvm1
Couldn't find valid filesystem superblock.
suse01:~ #
Run df -h command to verify the space increase in LVM Partition
suse01:~ # df -h /lvm1/
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg0-lvm1 1.5G 35M 1.4G 3% /lvm1
suse01:~ #
Share This Post:
more news from the blog