LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 12-09-2007, 07:27 PM   #1
adasiak
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:

Quote:
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:

Quote:
There was an error setting up inter-process communications for KDE. The message returned by the system was:
Could not read network connection list.
/home/shared/.DCOPserver_desktop__0
Please check that the "dcopserver" program is running!
A little Web-checking suggested that my hard drive had filled up, and the output of
Code:
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
Code:
apt-get clean
and even
Code:
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?)

--Paul
 
Old 12-09-2007, 08:42 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,258

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
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, 02:45 PM   #3
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 75
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).
 
  


Reply


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 07:44 AM
Can I move /home partition under root partition arijit_2404 Linux - General 3 07-05-2007 01:01 AM
colinux access to ext3 partition (opensuse root partition) billtracy1957 Linux - General 0 05-03-2007 11:29 PM
root partition gets full when using cp -a on another partition timsch75 Linux - General 2 10-02-2005 07:41 AM
Ballooning kernel, way too big... lopoetve Linux - Newbie 8 10-31-2002 01:33 AM


All times are GMT -5. The time now is 07:53 AM.

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