maverick23

Well-Known Member
Feb 23, 2005
92
0
156
cPanel Access Level
DataCenter Provider
Hi..

i know this question must have got asked multiple times but here i am asking again as i could not find a satisfactory resolution to my problem.

present df -h output of my system is :-

/dev/sda5 7.8G 907M 6.5G 13% /
/dev/sda8 195G 120G 65G 65% /home
/dev/sda6 996M 336M 609M 36% /tmp
/dev/sda3 7.8G 5.8G 1.7G 78% /usr
/dev/sda2 9.7G 2.7G 6.6G 29% /var
/dev/sda1 122M 17M 99M 15% /boot
tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/sdb1 226G 144G 71G 67% /backup


Its been long that i have been able to manage the space for cpanel directory but now this is out of hands.

the only directory consuming most of the space is of cpanel.

now i have a few questions:-

Can i move cpanel's directory to some other location? if not then how do i reduce the size. Present structure is below:-

44K ./cpupdatepatches
4.0K ./.cpanel
180K ./img-sys
4.6M ./scripts
35M ./cgi-sys
16K ./.spamassassin
2.2M ./etc
20K ./redhat
256K ./shared
39M ./logs
4.0K ./mail
26M ./cpaddons
2.0M ./lang
8.1M ./locale
84K ./hooks
328K ./install
56K ./apache
12K ./ea2-tools
16K ./docs
148M ./src
9.4M ./java-sys
2.2M ./share
36K ./htdocs
4.5M ./Whostmgr
248K ./obj
56K ./php
756K ./libexec
416M ./bin
9.1M ./lib
144K ./sys_cpanel
31M ./Cpanel
18M ./perl
1.9M ./build-tools
173M ./modules-install
48K ./entropychat
16K ./t-dist
905M ./3rdparty
289M ./whostmgr
76K ./var
394M ./base
16K ./sqloptimizer
76K ./tmp
2.6G .


i had already moved the mailman directory and it is located separately.

what is it that i can remove or move?

Otherwise is it safe to move the cpanel directory itself?

Please help..
 

tobaniyi

Member
Mar 12, 2014
10
0
1
cPanel Access Level
Root Administrator
I faced this issue myself a while back. I tried moving cPanel directory as you suggested and boy did I regret that... Took a while to get the system back in order. Eventually, I moved the log folder in cpanel directory and domlogs in Apache directory and symlinked them to their original locations. It appears the log files were using up so much space and helped reduce the usage drastically.


I hope this helps.

Regards
 

MilesWeb

Well-Known Member
PartnerNOC
May 23, 2012
173
2
68
India
cPanel Access Level
Root Administrator
Twitter
If you wish to move the cPanel directory to a different partition, create a symlink and point it to the cPanel directory. This is a workaround that you can apply.

In the long run, setting up a new server with larger partitions is a better option.
 

maverick23

Well-Known Member
Feb 23, 2005
92
0
156
cPanel Access Level
DataCenter Provider
I faced this issue myself a while back. I tried moving cPanel directory as you suggested and boy did I regret that... Took a while to get the system back in order. Eventually, I moved the log folder in cpanel directory and domlogs in Apache directory and symlinked them to their original locations. It appears the log files were using up so much space and helped reduce the usage drastically.


I hope this helps.

Regards
Hi tobaniyi,

Thanks for your response but the log file size for cpanel directory is only 39 MB so it would not make much of a difference, and apache folder along with logs is also 175 MB even it would not make difference.

Below is for /usr directory

1.7M ./kerberos
88K ./man
8.0K ./games
68K ./cron
16K ./lost+found
12K ./etc
102M ./sbin
2.8G ./local
27M ./include
104M ./src
1.1G ./share
21M ./libexec
204M ./bin
675M ./lib
16K ./X11R6
5.0G .


and for /usr/local it is

1.4M ./modsecurity
1.2M ./csf
44K ./man
8.0K ./games
28K ./etc
2.7M ./IonCube
8.0K ./sbin
2.6G ./cpanel
175M ./apache
3.9M ./include
6.6M ./src
264K ./share
108K ./bandmin
32K ./php
8.0K ./libexec
20M ./bin
4.1M ./lib
32M ./frontpage
1.5M ./cpanel-rollback
2.8G .

Is there anything that can be done without going for a re-install or new setup?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello :)

I do not recommend moving files and adding symbolic links for the /usr/local/cpanel directory. While it might seem like a bit of work, the best way to resolve this issue is to reinstall the OS/cPanel and restore the accounts. When installing the OS, ensure you use the recommended partition setup:

cPanel Install - Partition Scheme

Thank you.
 

maverick23

Well-Known Member
Feb 23, 2005
92
0
156
cPanel Access Level
DataCenter Provider
Thanks for your response Michael, but this server is running since 2010 and at that time this was the recommended partition structure installed by ThePlanet.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
The cPanel transfer tools can make migrations to new servers relatively simple. There are several threads open with tips on how to reduce downtown during a server migration if you decide to take that route.

Thank you.