Adding a partition to the lv_root
Adding a partition to the lv_root
So. I have a centos 5.5 box as my webserver (cpanel). None of the sites would load today. Apparently the lv_root is at 100% usage. I added 100gb to the vmdk file, downloaded parted and made a partition. But I can't for the life of me figure out how to add that space to the lv_root.
Re: Adding a partition to the lv_root
First hit off Google: https://wiki.centos.org/TipsAndTricks/ExpandLV
But cpanel is not something we support on this forum.
But cpanel is not something we support on this forum.
Re: Adding a partition to the lv_root
You really really really don't want to be running 5.5. Especially not as a machine that's exposed to the internet.
5.5 was released on 31 March 2010 so is now over 5 years behind on security updates. You need to run yum update ASAP to get your system up to date - currently 5.11. You should also consult with cpanel support to find out if you can expect any problems from their software once you do this.
If you created a new partition with the new space in it then you need to tag this new partition as type 0x8e (LVM) in fdisk and save the change. Now run pvcreate on the new partition to create a new LVM Physical Volume. Then you can add that PV to the existing Volume Group with vgextend and now you will have more space in the VG. Once that's done you can run lvextend to extend the lv_root LV and if you pass the -r switch to lvextend then it will also resize the filesystem for you.
5.5 was released on 31 March 2010 so is now over 5 years behind on security updates. You need to run yum update ASAP to get your system up to date - currently 5.11. You should also consult with cpanel support to find out if you can expect any problems from their software once you do this.
If you created a new partition with the new space in it then you need to tag this new partition as type 0x8e (LVM) in fdisk and save the change. Now run pvcreate on the new partition to create a new LVM Physical Volume. Then you can add that PV to the existing Volume Group with vgextend and now you will have more space in the VG. Once that's done you can run lvextend to extend the lv_root LV and if you pass the -r switch to lvextend then it will also resize the filesystem for you.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke