System failed due to lack of free disk space
I downloaded a file onto my Mandrake 10 system.
I shut down the system. When I restarted the system would not start properly. The nVidia splash screen usually appears before a login screen appears. This time the nVidia splash screen blinked on and off a few times, then I was presented with a text based login.
I rebooted and looked at the verbose version of the startup.
I got a failure as follows;
Starting partmon - checking if partitions have enough free disk space
Warning free disk space for </> is only <0> which is inferior to <20000> [FAILED][FAILED]
I guessed the last file I downloaded tipped the system over the edge and caused problems, so via the text based login I deleted it using rm. I rebooted. Still no good, the system GUI will not start.
My system is now useless to me (I have had to use my Windows OS to post this). How can I fix it?
Also how do you pause the messages in verbose startup mode so you can read them. I had to reboot 8 times to get the full failure message down on paper!
I seem have solved problem by deleting syslog file from /var/log
I hope that was the right thing to do.
The / partition was full.
What is the story with this syslog file? Why does it grow to a point where it harms the system without any warning? Doesn't seem right.
How can I stop this from happening again?
It's happen to me also several times. Unfortunately this can occur again. You should check free space frequently on root partition. Check in your home directory or in root home directory (/root/) if there is crash data (core) files. There are several MB each. You can delete them safely. How big is your root partition and which distro you use? Also check /tmp and /home/yourname/tmp directories. They should not exceed 1MB at normal work. Of course from time to time (1-2 months) you can delete old log files.
I don't think it's wise to go ahead and delete the logfiles; most programs should know how to create a new logfile if none is found, but it's possible that one day you bump into a program that doesn't do it. Therefore it's wiser to do
Another thing: yes, the logfiles do grow. This is because logs can be important so no data ought to be deleted unless administrator does it -- and administrator is meant to do it. You should, once in a while, clear the logfiles but at the same time save copies somewhere in case you need them; if you're sure there are no problems and the logfiles are not needed, then don't save them, but it wouldn't harm you to use an external drive for example for this. It's pretty easy to create a "maintenance script" which clears the logfiles, backs them up if needed first, and perhaps checks the free space and warns if it goes below some limit. Then you could make it run by a cronjob, maybe, to let you out of running it manually. Maybe it'd be a good idea to even save the logfiles to some temporary place, clear current logfiles, and after a week or so delete the temporary logfile copies; this way you could check the old logs in case you forgot to do it "in time".
I'm not 100% sure if the system logging tools allow you to easily control the maximum size of logfiles (I guess they should), but it's easily done via a script too: just write a shell script that checks the logfiles' size, and if some exceeds a given limit, it's cleared (or better yet, first copied to another place for a few days and then cleared, giving you an opportunity to view it first) and make that script run by cron at some intervals, like once a day or few days.
OK thanks. Is there any way to get back the syslog file I removed using rm? Should I recreate an empty file named syslog and place it back where it was? I am a little worried that I have deleted it now, but doing so did get my system back up and running.
Don't worry it - check if a new one got created, if not just run that command b0uncer posted.
Doesn't Mandy have logrotate (or equivalent) ???. That manages the various logs for you - creates compressed backups and deletes then after a (user-defined) period.
Couple of weeks, couple of months whatever.
I just had the same problem again and executed
$ echo "" > /var/log/syslog
to fix it.
This time I tried to copy the syslog file to a directory in a user's home directory before executing the above command, but after 3 minutes of waiting for the cp command to execute, I gathered their was a problem and stopped the cp process.
Is manually creating a maintenance script as mentioned in this thread the only solution to this ongoing problem? This task is probably a bit beyond me. I have a little command line knowledge, but not enough.
It doesn't seem correct to me that this distro (Mandrake 10) requires such a custom script to be created by the administrator to keep the system running. I started using Mandrake 10 as it was supposed to be good for Linux newbies. I would have thought something like automatic log rotate as mentioned in this thread would be built into this distro. If I have to create a custom script manually, does anyone know where I could get hold of such a script and how would I cause it to execute automatically at the appropriate times to avoid system failure?
It should not happen
You must also have accumulated some tmp files
Mandy 10? Maybe time to try a newer version?
You will have no security patches for 10
How big is the / partition?
You can use drakrpm as root to remove the packages you never use
Also there are utilities to look for duplicate / lint
logrotate must not work. Every few months (like today) I just go and do;
$ echo "" > /var/log/syslog
It works, but its a crude way for a system to run. I am scared to update as it took me three years to get Mandrake 10 configured how I like it. I don't relish the thought of starting over. I like Linux as I can learn how to manipulate the OS, but it is a lot of work.
A newer version of mandriva has auto log rotate installed and you can change it easily.
Try mandriva 2007 spring.
or upgrade via urpmi.
I agree with Glenn, you would be best served by upgrading to a supported release of Mandriva (Mandrake renamed itself to Mandriva following its merge with Conectiva). The current release is Mandriva Linux 2007.1 (Spring). Using Mandrake 10 today is similar to using Windows 98. Security patches are no longer developed, and new threats are created / found daily. Additionally, OS releases that are no longer supported may be unable to correctly work with new hardware.
If you choose to keep Mandrake 10, you should check that the logrotate package is installed. An easy (if not fast) way to check is to open the Software Installer. If the logrotate package is listed, install it. If it is not listed, close the Software Installer, open the Remove Software program to check that logrotate is listed. If so it is installed, otherwise it is not.
The University of Pensylvania still has the Mandrake 10.0 mirror with the RPMS, RPMS2, and RPMS3 repositories. The RPMS repository contains the logrotate package. If you open the RPMS link with Konqueror, you can ALT+Click the logrotate package, select Open with ... then select Software Installer to install it.
Thanks. I tried to install logrotate as you describe but was told "already installed". So I checked for it using the remove software tool. logrotate is not present in the listing of software that I could remove. Where could it be? The lack of memory problem crops up about every 3 logins now. I just cure it with
# echo " " > syslog
# echo " " > messages
Here is a directory listing that was current when the problem last occurred.
If this reveals anything that threatens my security, please tell me and I will delete it from the thread. Are "syslog" and "messages" the only files I can delete (sorry, empty) here? Maybe I could manually clean this directory up a little and extend the time between display boot failures. Thanks.
**NEW EDIT TO POST** Just tried to execute logrotate from command line, logrotate seems to be there but it needs configfile as an argument when executing. What file do I put here when executing? I thought logrotate would execute automatically on shutdown.****
total 50452 -rw-r----- 1 root adm 3021740 Aug 26 20:09 auth.log -rw-r----- 1 root adm 22609 Dec 11 2004 auth.log.1.gz -rw------- 1 root adm 1323072 Aug 26 20:10 bandwidth -rw-r----- 1 root adm 13666420 Aug 26 20:10 boot.log -rw-r----- 1 root adm 172544 Dec 11 2004 boot.log.1.gz
drwxr-xr-x 2 root root 4096 Dec 12 2004 cron/
drwxr-xr-x 2 root root 4096 Jun 27 18:34 cups/
drwxr-xr-x 2 root root 4096 Dec 12 2004 daemons/
-rw-r----- 1 root adm 0 Aug 26 20:10 dirText.txt
-rw-r----- 1 root adm 10017 Aug 26 20:08 dmesg
-rw-r----- 1 root adm 569988 Aug 26 20:09 explanations
-rw-r----- 1 root adm 12194 Dec 11 2004 explanations.1.gz
drwxr-xr-x 2 root root 4096 Jul 3 2004 httpd/
-rw-r----- 1 root adm 476 Apr 11 2005 kdm.log
drwxr-xr-x 2 root root 4096 Dec 12 2004 kernel/
-rw-r--r-- 1 root root 1365 Aug 26 20:08 ksyms.0
-rw-r----- 1 root adm 1365 Aug 24 19:12 ksyms.1
-rw-r----- 1 root adm 1365 Aug 24 19:02 ksyms.2
-rw-r----- 1 root adm 1365 Aug 18 09:05 ksyms.3
-rw-r----- 1 root adm 1365 Aug 17 13:10 ksyms.4
-rw-r----- 1 root adm 1365 Aug 17 12:46 ksyms.5
-rw-r----- 1 root adm 1365 Aug 17 12:06 ksyms.6
-rw-r----- 1 root adm 146876 Aug 26 20:09 lastlog
drwxr-xr-x 2 root root 4096 Dec 12 2004 lpr/
drwxr-xr-x 2 root root 4096 Dec 12 2004 mail/
drwxrwsr-x 2 root mail 4096 Dec 12 2004 mailman/
-rw-r----- 1 root adm 170497 Aug 26 20:09 mdkkdm.log
-rw-r----- 1 root adm 435245 Aug 26 20:10 messages
-rw-r----- 1 root adm 1838145 Dec 12 2004 messages.1.gz
drwxr-xr-x 2 root root 4096 Dec 12 2004 news/
-rw-r----- 1 root adm 1921 Jun 9 2006 nvidia-installer.log
-rw-r----- 1 root adm 0 Jul 4 2004 postgresql
drwxr-xr-x 2 root root 4096 Nov 21 2003 proftpd/
-rw-r----- 1 root adm 31757 Dec 12 2004 rpmpkgs
-rw-r----- 1 root adm 8073 Dec 1 2004 rpmpkgs.1.gz
drwxr-xr-x 2 root root 53248 Jul 24 12:37 samba/
-rw-r----- 1 root adm 8009 Sep 15 2004 scrollkeeper.log
-rw-r----- 1 root adm 347842 Aug 26 20:09 secure
-rw-r----- 1 root adm 2984 Dec 11 2004 secure.1.gz
drwxr-xr-x 2 root root 4096 Dec 12 2004 security/
-rw-r----- 1 root adm 3216 Dec 12 2004 security.log
drwxr-xr-x 2 snort snort 16384 Aug 26 20:09 snort/
-rw-r----- 1 root adm 0 Jul 4 2004 spooler
-rw------- 1 root adm 3513097 Aug 26 20:10 syslog
-rw-r----- 1 root adm 2032871 Dec 12 2004 syslog.1.gz
-rw-r----- 1 root adm 3013 Sep 8 2006 urpmi.log
-rw-r----- 1 root adm 347 Jul 12 2004 urpmi.log.1.gz
-rw-r----- 1 root adm 2311792 Aug 26 20:09 user.log
-rw-r----- 1 root adm 23246 Dec 11 2004 user.log.1.gz
drwxr-xr-x 2 uucp uucp 4096 Dec 12 2004 uucp/
-rw-rw-r-- 1 root utmp 21747456 Aug 26 20:09 wtmp
-rw-r--r-- 1 root root 19384 Aug 26 20:09 XFree86.0.log
-rw-r--r-- 1 root root 19384 Aug 26 20:09 XFree86.0.
Type in at a console "man logrotate" see if that gives you any info that will help with commands, etc.
I found some info on logrotate but could not fully understand the instructions. So I went back over this thread and followed the advice of valyo_bg and echoed " " to the core files. This has helped somewhat. X now runs on boot but I still get a warning that I don't have enough space on /.
I looked and saw that /tmp has 11000 items taking up 105MB.
/tmp is mostly composed of directories that have a 10 digit number as a name. An example of the contents of one of these directories is as follows;
directory name = 0002355797, it contains
a directory named .kde
a directory named .kde
a file named .fonts.cache-1
there are thousands of other such directories. Can these be safely deleted and would this help me with my problem?
I think you can go ahead and delete the content
probably best done in single user mode (not graphics)
look at flAg -m of tune2fs
You might find 5% of your HD reserved to root
I do not know if that would help to free them
|All times are GMT -5. The time now is 03:38 AM.|