Monday, September 26, 2011

How to resize an LVM volume in CentOS 5

Volume group name is VolGroup00
- create new partition /dev/sda3 with fdisk /dev/sda
- reboot with parted cd in text mode
- create pvolume
lvm pvcreate /dev/sda3
- display pvolumes
lvm pvdisplay
- extend volume group by adding new pvolume
lvm vgextend VolGroup00 /dev/sda3
- resize volume group by 32 GB
lvm lvextend -L+32G /dev/VolGroup00/LogVol00
- check filesystem for errors before resizing
e2fsck -f /dev/VolGroup00/LogVol00
- resize filesystem
resize2fs /dev/VolGroup00/LogVol00

No comments:

Post a Comment