HELP! Diskspace :(
I have recently being struggling with an diskspace problem.
I run a i7 server in France and it is used as a production server (shared hosting) Problem is that most space was allocated to /home/ of course for webhosting and only 10GB was allocated to / Now the problem is that cPanel is freaking out because to put it basically, / is full. /dev/root /var/named/chroot/var/run/dbus 95.11% (9661348 of 10157944) I have 5TB on this thing but stupid me forgot to give / a little extra and I went along with the standard partition which only allocated 10GB. I am wondering what I should do? I already moved the entire mysql database directory to /home/ and then did a symlink to save space, but that cleared 700mb and took it to 85%, WITHIN ONE DAY it went back up to 95% - there has to be something generating files and using all this space, if its logs then where should I look? Sorry for all the questions, hope I can get an answer from one of you pro's - thanks. |
Hello and Welcome to LinuxQuestions,
You could run this: Code:
du -h / | grep ^[0-9.]*G Kind regards, Eric |
Quote:
|
Hi,
Most likely you'll encounter problems if you do so. All logs with an extension gz.X (X is a number) or just X (number) can be deleted without any problem since they are 'older' logs. The ones that have the normal .log extension I wouldn't delete. If one of them (or more) are big in size check why (look at the content), note the errors and solve them. If you need to reduce them you can do: Code:
echo >/var/log/logfilename Kind regards, Eric |
Quote:
It instantly rose back to 1mb within a minute or so, thats pretty fast - is there anyway I can find out why this is growing so fastly? Would it be safe to put /var/log/ in /home/log/ and then symlink /var/log/ to /home/log/ ? |
Deleting log files will just solve your problem for now.
You could create a script to delete the rotated log files, and put it in a cronjob. If you have physical access to the server, an other option is to backup the /home partition, and use gparted to shrink it. Then you can create a separate partition for /var Kind regards |
Quote:
|
Quote:
Do you have allot of mail traffic? You can however set the log level lower http://www.exim.org/exim-html-3.20/d...51.html#SEC862 Kind regards |
Quote:
Take a look at http://serverfault.com/questions/559...-log-directory Kind regards |
Quote:
No need to write a separate script for that. You can easily configure all you need in a logrotate config file. Have a look at the man page for logrotate: Code:
man logrotate Kind regards, Eric |
Quote:
If that log file is growing that fast, then better have a look inside (cat, less, more) and post some lines here to see if we can pinpoint what's going on. Kind regards, Eric |
All times are GMT -5. The time now is 03:34 AM. |