/usr keeps filling up. Have to rm domlogs contents every 3 d

fog

Well-Known Member
Jun 22, 2002
164
0
166
Could someone tell me another way to fix this? Having to rm the contents of domlogs every 3 days is getting aggrevating. Thanks in advance :)

Please give me the step by step as I am fairly new to this control panel.
 

dandanfireman

Well-Known Member
PartnerNOC
May 31, 2002
117
0
316
It sounds like the main problem is that your /usr partition is not large enough. The last server I had built, I specified that /usr be 10G just for this reason. For the previous one, I specified 6G thinking it would be enough...but its not.

First I would look around at your logs and try to get an idea of who is filling up your logs. For me, I had about 3 users who were the main offenders. The way I resolved this was to move the log file to the user's /home directory then symlink back to domlogs. Something like the following. Lets say domain.com is our problem and their username is domain.

mv /usr/local/apache/domlogs/domain.com /home/domain
ln -s /home/domain/domain.com /usr/local/apache/domlogs/domain.com
/etc/init.d/httpd restart
 

fog

Well-Known Member
Jun 22, 2002
164
0
166
Would these exact commands (minus the domain.com portion) work if I also wanted to move the entire domlogs dir to /home/domlogs?
 

dandanfireman

Well-Known Member
PartnerNOC
May 31, 2002
117
0
316
I would be hesitant to give you a by the numbers approach to doing this. I wouldn't want to leave you in a situation where things are broken with no way to fix them. Please contact me via

MSN: [email protected]
AIM: alphhos
YIM: alphhos
ICQ: 295434

And we can talk more about it.
 

jsteel

Well-Known Member
Jul 4, 2002
646
0
166
Atlanta, GA
If you have a partition that is larger you could simply create the domlogs directory on that partition (copy all the data over), delete it from the apache directory and then create a symbolic link in the apache directory called domlogs that points to the new location.

I had to do something similar on Tomcat logs on one of my boxes because the provider didn't make partitions large enough. I personally don't think Nick should let a provider become a CPanel distributor if they don't build out servers properly.

Jaz
 

fog

Well-Known Member
Jun 22, 2002
164
0
166
Could ya post a step by step to link the domlogs to /home2/domlogs? It would be appreciated :)
 

anand

Well-Known Member
Nov 11, 2002
1,435
1
168
India
cPanel Access Level
DataCenter Provider
[quote:65ab3057c3][i:65ab3057c3]Originally posted by fog[/i:65ab3057c3]

Could ya post a step by step to link the domlogs to /home2/domlogs? It would be appreciated :)[/quote:65ab3057c3]

its exactly the way dandanfireman has explained, neways...

mv /usr/local/apache/domlogs /home2/domlogs
ln -s /home2/domlogs /usr/local/apache/domlogs
/etc/rc.d/init.d/httpd restart

still have a probs give me a buzz at [email protected], i would help. I just did this on my server, 1.7gb of domlogs phew! my usr was almost full.

regards,

Anand
 

moronhead

Well-Known Member
Aug 12, 2001
706
0
316
This is a tad more secure:

* Stop Apache from WHM or SSH
* Move content and create new directory:
cp -a /usr/local/apache/domlogs /home2
* Make sure /home2/domlogs is created
* Remove /usr/local/apache/domlogs directory:
rm -fR /usr/local/apache/domlogs
* add symbolic link to the new directory:
ln -s /home2/domlogs /usr/local/apache/domlogs
* Start Apache in WHM or SSH
 

Drake

Well-Known Member
Nov 9, 2001
83
0
306
New Jersey
cPanel Access Level
DataCenter Provider
Do you want to keep all the old logs?? not me...

Why not think of adding those dom logs into the logrotate routine, this way they will be rotated daily .1, .2, and finally .gone ?
 

Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,051
1
343
[quote:d4c7f4ad3f][i:d4c7f4ad3f]Originally posted by moronhead[/i:d4c7f4ad3f]

This is a tad more secure:

* Stop Apache from WHM or SSH
* Make the new log directory:
mkdir /home2/domlogs
* Move content:
mv /usr/local/apache/domlogs /home2/domlogs
* Make sure /home2/domlogs is created
* Remove /usr/local/apache/domlogs directory:
rm -fR /usr/local/apache/domlogs
* add symbolic link to the new directory:
ln -s /home2/domlogs /usr/local/apache/domlogs
* Start Apache in WHM or SSH[/quote:d4c7f4ad3f]


Hello ,

this suggestion of course will work also on my /home dir ( I have 27 GB free there ) ?

Thanks
 

fog

Well-Known Member
Jun 22, 2002
164
0
166
I did just what was posted here in the step by step, but when I look in /usr/local/apache/domlogs I still see the files.