LVM Extend and Shrink Commands in RHEL
To shrink:
df -h
umount /dev/mapper/vg_blrws197-lv_home
e2fsck -ff /dev/mapper/vg_blrws197-lv_home
resize2fs /dev/mapper/vg_blrws197-lv_home 5GB
resize2fs /dev/mapper/vg_blrws197-lv_home 5G
lvreduce -L -397G /dev/mapper/vg_blrws197-lv_home
mount /dev/mapper/vg_blrws197-lv_home /home
To Extend:
df -h
pvs
vgdisplay
lvextend -l +102912 /dev/mapper/vg_blrws197-lv_root
resize2fs /dev/mapper/vg_blrws197-lv_root
df -h
umount /dev/mapper/vg_blrws197-lv_home
e2fsck -ff /dev/mapper/vg_blrws197-lv_home
resize2fs /dev/mapper/vg_blrws197-lv_home 5GB
resize2fs /dev/mapper/vg_blrws197-lv_home 5G
lvreduce -L -397G /dev/mapper/vg_blrws197-lv_home
mount /dev/mapper/vg_blrws197-lv_home /home
To Extend:
df -h
pvs
vgdisplay
lvextend -l +102912 /dev/mapper/vg_blrws197-lv_root
resize2fs /dev/mapper/vg_blrws197-lv_root
No comments