Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-09-2007, 06:27 PM   #1
LQ Newbie
Registered: Sep 2007
Location: Fairbanks, Alaska
Distribution: MEPIS
Posts: 18

Rep: Reputation: 0
How to keep root partition from ballooning up?

How can I ensure that the files /var/log/messages.0, /var/log/kern.log.0, and /var/log/syslog.0 do not balloon out of control and take up my hard drive?

I recently booted up (using SimplyMEPIS 6.5), and after the login, when the KDE splash screen would usually appear, I was given the message:

Xsession: warning: unable to write to /tmp; X session may exit with an error
I clicked "okay" -- then was taken back to the login, where the same thing happened several times. For some reason, the system after a while gave me this message:

There was an error setting up inter-process communications for KDE. The message returned by the system was:
Could not read network connection list.
Please check that the "dcopserver" program is running!
A little Web-checking suggested that my hard drive had filled up, and the output of
df -h
(when I logged in with the terminal, as root) showed that /dev/hdd4 (my MEPIS partition) was 100% used.

A couple of people suggested (for others with a similar problem) that one answer was to clean the .deb packages with
apt-get clean
and even
apt-get autoclean
This worked enough right away for me to use the GUI, but the next output of df -h (I ran it right away) showed that /dev/hdd4 was still 94% full -- so I was worried that my hard drive might fill up unexpectedly. A little poking around showed that three files in /var/log/ -- messages.0, kern.log.0, and syslog.0 -- were the leading culprits, each occupying 1.36 GB.

One or two logins (and complete powerings-down) later, none of those three files is above 776 K, and /dev/hdd4 is only 40% full -- and, since it's an 8-gig partition, that doesn't worry me a bit. What worries me is: how do I make sure something like this doesn't happen in the future? Have I already done it by running clean and autoclean? (Also, they don't show up in my list of installed packages, so how do I know that they're "installed" and that they'll do their job in the future?)

Old 12-09-2007, 07:42 PM   #2
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,370

Rep: Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753
Normally log files in that are get auto-rotated and then the oldest version is deleted.
That's prob what's happened.
There is a setting somewhere for how many versions too rotate/keep. Try /etc/logrotate.d or something like that.
iirc, logrotate/purge is usually set for the wee hrs, so maybe you'd want to change that time. See root/system crontab(s).
Old 12-10-2007, 01:45 PM   #3
HCL Maintainer
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
Also, /tmp should be mounted with type tmpfs on linux. That way, it will automatically empty on reboot and you will only run out of space when you run out of memory (you can, however, configure a limit on your tmpfs if you so chose).


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB won't load windows partition - root (hd0,0), Filesystem type unknown partition.. cillm527 Linux - Software 4 04-27-2008 06:44 AM
Can I move /home partition under root partition arijit_2404 Linux - General 3 07-05-2007 12:01 AM
colinux access to ext3 partition (opensuse root partition) billtracy1957 Linux - General 0 05-03-2007 10:29 PM
root partition gets full when using cp -a on another partition timsch75 Linux - General 2 10-02-2005 06:41 AM
Ballooning kernel, way too big... lopoetve Linux - Newbie 8 10-31-2002 12:33 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:29 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration