This is more of Resize LVM
I have tested this on CentOS 5.5. Since this is root partition modification, I’ll recommend to keep config backup before proceeding.
create new partition (partition id should be 8e Linux LVM)
ADD PHYSICAL VOLUME
pvcreate /dev/new_partition
Verify new physical volume
pvdisplay
Or
pvscan
Extend existing VOLUME GROUP
vgextend VolGroup00 /dev/xvda3
make sure vg free size is = new partition size using vgdisplay command
Extend existing LVM by adding new partition
lvextend /dev/VolGroup00/LogVol00 /dev/xvda3
make sure lv size is increased, use lvdisplay
RESIZE FILE SYSTEM
Reboot Linux to init1
umount /dev/VolGroup00/LogVol00
fsck -f /dev/VolGroup00/LogVol00
Mount / partition or reboot to init1 for following command to run.
resize2fs /dev/VolGroup00/LogVol00
Now you may reboot & check / partition size.
Awesome!
You need to mount the / into rw mode so you can do it with this:
#mount -o remount -rw /dev/mapper/VolGroup00-LogVol00 /
keep up n_n
Thanks for replying Dhaval. What you suggested sounds the likely cause and a good solution. In the end I used the CentOS Live CD which worked a treat.
Even once I’m in single user I still cannot unmount /dev/VolGroup00/LogVol00. It comes back with umount: /: device is busy.
Any ideas?
I guess you are going to init1 from init3/init5
try to get init1 while booting, using grub.