[root partition is full - /var/log is huge

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help

[root partition is full - /var/log is huge

Postby doronba on Wed Apr 03, 2013 1:49 pm

hi,
i use my linux mint 14 for a while, and recently it says that root partition is 100% full.
i have been checking and found that /var/log uses most of the space (10.2 GB),
i don't know what this folder contains and should i delete some files of it.
i have been using linux for few years, PCLINUXOS, UBUNTU, MINT, and it it is the first time that something like this happens to me.
i usually let the root partition 12 gb and it was enough always.

can someone please tell me what is this folder at all and what can i delete of it ?

thanks.
doronba
Last edited by doronba on Wed Apr 03, 2013 2:55 pm, edited 1 time in total.
doronba
Level 1
Level 1
 
Posts: 25
Joined: Thu Feb 21, 2013 5:39 am

Linux Mint is funded by ads and donations.
 

Re: root partition is full - /var/log is huge

Postby xenopeek on Wed Apr 03, 2013 2:23 pm

/var/log is for ... drum-roll ... your log files. Normally those are rotated daily, with a weeks worth of history kept in archives. So normally it is kept to a manageable size automatically. (6.5 MB total here.) If you have 10 GB worth of log files, something is wrong and asking for your action. So instead of immediately deleting it, find the newest, biggest, file there and read it. Browse through it and you should surely see some error repeat hundreds of thousands of times. What is that error? What program is notifying you something is wrong? Fix it, then delete any of the big log files (anything bigger than 1 MB) and then reboot. This doesn't do any harm; programs will automatically create a new log file and continue logging there after reboot.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15259
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: root partition is full - /var/log is huge

Postby doronba on Wed Apr 03, 2013 2:46 pm

thanks a lot for the excellent answer.

after observing the files list again i found the blame for the huge size, these are the 2 hugh files :
kern.log.1 = 5.5 gb
syslog.1 = 5.5 gb

i opened them and both have thousands of lines, which obviously i should not scan in order to find the problem, unless you can tell me what to look for and how.
but, if it is possible to just delete these 2 naughty boys from my /var/log folder i think that it would be more than enough.
can i delete them and then reboot, and everything will be fine ?
might all this fuss be because of me using the hibernate option (the happily and finally i can use on linux) ?

thanks.
doronba
doronba
Level 1
Level 1
 
Posts: 25
Joined: Thu Feb 21, 2013 5:39 am

Re: root partition is full - /var/log is huge

Postby xenopeek on Wed Apr 03, 2013 2:53 pm

You can delete both and need not reboot. These are log files from at least 24 hours ago, so you can delete them without disturbing anything.

I suggest you have a look in /var/log/syslog from time to time. Unless you fix whatever is wrong these files will probably grow on you again. Easy what you are looking for; go to the end of the file and start scrolling back. With a file this big it should be obvious which message is repeated over and over and over again, if you scroll 10 pages up it should start jumping out at you.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15259
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: root partition is full - /var/log is huge

Postby doronba on Wed Apr 03, 2013 2:54 pm

thanks a lot - seems like SOLVED
doronba
Level 1
Level 1
 
Posts: 25
Joined: Thu Feb 21, 2013 5:39 am


Return to Other topics

Who is online

Users browsing this forum: No registered users and 4 guests