LVM Resize root partition -Centos

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)

pvcreate /dev/new_partition

Verify new physical volume


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

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.

if you find any missing point in here, please let us know in comment section or tweet us at @linuxreaders. To get more articles like this, subscribe to our RSS feeds / Mails.
Read 248 articles by
  • Omar Naas

    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

  • Aaron

    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.

  • Aaron

    Even once I’m in single user I still cannot unmount /dev/VolGroup00/LogVol00. It comes back with umount: /: device is busy. Any ideas?

    • Dhaval Thakar

      I guess you are going to init1 from init3/init5 try to get init1 while booting, using grub.

Trending Posts