Help - Search - Members - Calendar
Full Version: hard disk almost 100%
The Planet Forums > System Administration > General Support Questions
chielsen
Since a few days, i noticed my disk use was almost 100%. Normally i let the backup script keep the backups for 2 weeks.

Now, i can't have 1 (its > 13GB). I think there is something wrong. How can i be that the backups are so big at once? And without backups, the disk usages is 61G (72G disk).

I ran "du -ch --max-depth=1". Which outputs this:

16k ./lost+found
15M ./boot
352k ./dev
du: `./proc/2943/fd/4': No such file or directory
898M ./proc
12G ./var
13G ./tmp
46M ./etc
838M ./usr
5.4M ./bin

After that, it hangs.
I use ensim.

There are a lot of sites on my server, but it hasn't that dramatically. I wonder how all that data has come on my disk.

When i look in ensim, the disk usage per site overview looks good. Most of them use less than 25 mb. I think there must be something wrong.
mouse
QUOTE
Originally posted by chielsen
Since a few days, i noticed my disk use was almost 100%. Normally i let the backup script keep the backups for 2 weeks.

Now, i can't have 1 (its > 13GB). I think there is something wrong. How can i be that the backups are so big at once? And without backups, the disk usages is 61G (72G disk).

I ran "du -ch --max-depth=1". Which outputs this:

12G     ./var
13G     ./tmp


inside of /var is log and /var/log/httpd
clean out your logfiles..

and 13GB in /tmp is crazy.. start to emptying that sucker.. Mouse
chielsen
It aren't the apache logs. What can i delete from /tmp?
mouse
most everything other than the .s.PGSQL files..
it all depends on what you have running though most any folder should be deletable in there.. Mouse
chielsen
I found out that /var/lib/mysql is 4.8G. That can't be right.
But how to find out what i have to delete?

And what /var/spool/mail (/root) for?


I have found (and deleted) two backups of sites of today. These were 13G together. How can the get into /tmp? Or is that because of the backup program got stuck?
chielsen
In the mysql dir, i get a lot of these files base-bin.127 (or other numbers). They are sometimes hundreds of mbs large.
What are they?
Edgewize
The backup program uses /tmp to build the backup files before copying them to the final location. So yes, if a backup process gets interrupted, you end up with a huge chunk of wasted space in /tmp.

/var/lib/mysql contains all your MySQL databases, so that should definately not be removed.

/var/spool/mail/USER contains all the unread email that has been sent to USER@your.servername.com.

Have you never checked your root email? If not, then your spool file will be VERY large and trying to run an email program would be like server suicide. If your /var/spool/mail/root file is very large ( > 50 megabytes or so), just delete it. And start checking your email from now on. You can run 'pine' as root to get an email interface over SSH.
chielsen
Mail file for root is 2GB:eek:

So deleting is the thing to do?

I've deleted it.

I've brought back the disk space usage from 61 to 42G.
Is 42G normal for like 250 sites with an average usage of 20mb.
ruckus
have you checked the /var/log for each virtual account? they all generate log files unless you cronjob them. I had a client show up with 20GB of logs in /home/virtual/sitexx/fst/var/log/httpd/
LighthousePoint
QUOTE
Originally posted by ruckus
have you checked the /var/log for each virtual account? they all generate log files unless you cronjob them. I had a client show up with 20GB of logs in /home/virtual/sitexx/fst/var/log/httpd/

Why did you have their qouta set so high as to allow that?
chielsen
Yes, i use logrotate. Logs are normal.

I don't know but how big /home at yours? du can't even check it, its >30 GB over here i guess.
ruckus
QUOTE
Originally posted by LighthousePoint
Why did you have their qouta set so high as to allow that?


This was on a stock ensim 3.1 machine, when I first started hosting and it was on a relatives website, It filled up like 1 week after I got the box, had to call in a ticket on it because I was like WTF he couldnt even put anyone up on his site cause it said he was over his quota. Thats when I learned about cronjobs, even though im still not sure how the logs filled up so quick.
ruckus
QUOTE
Originally posted by chielsen
Yes, i use logrotate. Logs are normal.

I don't know but how big /home at yours? du can't even check it, its >30 GB over here i guess.


This is a server with 25 sites
16k ./lost+found
16M ./boot
352k ./dev
505M ./proc
219M ./var
28k ./tmp
32M ./etc
964M ./usr
5.4M ./bin
1.6G ./home
4.0k ./initrd
128M ./lib
8.0k ./mnt
4.0k ./opt
2.4M ./root
7.1M ./sbin
4.0k ./misc
2.3M ./mailscanner-kit-0.2
3.5G .
3.5G total
icedemon
Put something like this in your cronjob to clear out your /tmp everyday.

02 8 * * * /bin/rm -rf /tmp/*
chielsen
/tmp is not the problem, there was one large file in it, which is deleted now.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.