Adding a partition to the lv_root

General support questions including new installations
Post Reply
weasel87
Posts: 8
Joined: 2015/09/21 23:39:43

Adding a partition to the lv_root

Post by weasel87 » 2015/09/21 23:45:14

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.

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Adding a partition to the lv_root

Post by aks » 2015/09/22 16:09:20

First hit off Google: https://wiki.centos.org/TipsAndTricks/ExpandLV

But cpanel is not something we support on this forum.

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Adding a partition to the lv_root

Post by TrevorH » 2015/09/22 22:37:17

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.
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

Post Reply