Wednesday, January 6, 2016

Increase the LVM partition size at runtime in RHEL


A). Increase "/" partition at run-time in Linux:

# df -h
# fdisk /dev/sdd (create new LVM type partition as 'sdd1')
# pvcreate /dev/sdd1
# vgdisplay vg_oeltest
# vgextend vg_oeltest /dev/sdd1
# vgdisplay vg_oeltest
# lvextend -L +10G  /dev/mapper/vg_oeltest-lv_root
# resize2fs /dev/mapper/vg_oeltest-lv_root
# df -h

Note: If the filesystem is ext4 with Red Hat Enterprise Linux 5, use resize4fs command instead of the resize2fs command.

URL:
https://access.redhat.com/solutions/24770

B). Increase the LVM partition size at runtime in RHEL:

1. Increasing CC vg size:
# vgextend ccvg /dev/mpath/mpath7

2. Increase LV size:
# lvextend -L +189GB /dev/mapper/ccvg-cclv

3. Increase LV filesystem size:
# resize4fs /dev/mapper/ccvg-cclv

No comments:

Post a Comment