LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 07-05-2007, 04:19 AM   #1
Rainel
Member
 
Registered: Jun 2007
Posts: 57

Rep: Reputation: 15
var is full


Hello guys..

My /var partition is full its usage capacity is 100% maybe thats
why when I'm trying to run squid it was failed...
Can anybody help me how to solve it or gave me an idea on what part
should I delete so that the usage capacity will reduce something to 95% or much better
lower than that...

Any help is highly appreciated..

Thanks

Best Regards,
Rainel A. Roflo
 
Old 07-05-2007, 04:24 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Your log files (/var/log/) could have grown to big. Maybe you can truncate one (or more) of those.

Hope this helps.
 
Old 07-05-2007, 05:14 AM   #3
stealth_banana
Member
 
Registered: Mar 2004
Location: Scotland
Distribution: Debian Sid / Kubuntu
Posts: 170

Rep: Reputation: 30
What distro are you running?

If its a debian based, all your updates may be filling up

/var/cache/apt/archives

If that is the case, simply use the command (as root)

apt-get clean

which will clear them all out.
 
Old 07-05-2007, 05:19 AM   #4
Rainel
Member
 
Registered: Jun 2007
Posts: 57

Original Poster
Rep: Reputation: 15
var is full

Thanks for the immediate reply guys I used Centos 4.5 (Final)
I don't know how it work but can you give me a step by step
on this part...

Thanks

Best Regards,
Rainel A. Roflo
 
Old 07-05-2007, 05:32 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Too my knowledge CentOS uses yum.

Check to see if there is a (filled) /var/cache/yum directory: ls -al /var/cache/yum

If there is and there are a lot of files, take a look here (from the official CentOS documentation):

8. Maintaining yum -> 8.2. Clearing the yum Caches

Did you check the /var/log directory?

Hope this helps.
 
Old 07-05-2007, 05:36 AM   #6
Rainel
Member
 
Registered: Jun 2007
Posts: 57

Original Poster
Rep: Reputation: 15
var is full

Yes I chech the /var/log directory and there's
a lot of detailed logs there but it is ok I should delete
them all..


Thanks

Best Regards
Rainel A. Roflo
 
Old 07-05-2007, 06:07 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

You should first determine what is filling up /var. If yum is doing it, check the link I gave in post #5. If 'standard' logging is filling up /var, focus on that.

The next part could be useful if standard logging is filling up /var:

You shouldn't just remove all the files in /var/log.
If logrotate is running (I believe CentOS has it running), you can change the amount of files that are kept for safe keeping. Take a look here for some more info on logrotate: Rotating Linux Log Files
And this is logrotate's manpage

The attribute that is of interest is rotate X, this tells logrotate how long (in weeks) old logfiles should be kept before removing them. If you aren't sure what to change, post your /etc/logrotate.conf file so we can have a look.

Hope this helps.
 
Old 07-05-2007, 07:53 PM   #8
Rainel
Member
 
Registered: Jun 2007
Posts: 57

Original Poster
Rep: Reputation: 15
va is full

Thanks for all the useful hints guys
and sorry for the delayed reply..
Well, I need to study this first and later on
I will post my logrotate.conf..


Thanks

Best Regards,
Rainel
 
Old 07-05-2007, 08:15 PM   #9
Rainel
Member
 
Registered: Jun 2007
Posts: 57

Original Poster
Rep: Reputation: 15
/etc/logrotate.conf

Hello guys this is my logrotate.conf
Seems bit confusing to me...

# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
# compressed

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 1
}

Thanks

Best Regards,
Rainel A. Roflo
 
Old 07-06-2007, 12:12 AM   #10
Rainel
Member
 
Registered: Jun 2007
Posts: 57

Original Poster
Rep: Reputation: 15
var is full

Yes I did the suggestions at Post 5
but it seems only 1% of it has decreased...
For now it will work just fine but later it will just fill up to 100%.


Filesystem Size Used Avail Use% Mounted on
/dev/hda5 9.7G 651M 8.5G 7% /
/dev/hda1 190M 44M 137M 25% /boot
none 501M 0 501M 0% /dev/shm
/dev/hda7 180G 30G 141G 18% /home
/dev/hda2 29G 2.0G 26G 8% /usr
/dev/hda3 9.7G 9.1G 114M 99% /var

Pls. help.

Thanks,

Best Regards,
Rainel A. Roflo
 
Old 07-06-2007, 02:29 AM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Do you need 4 weeks worth of old logfiles online??
Why note reduce that to 1 or 2 and archive older stuff (as part of logrotate) to another meduim eg CD/tape, IF you really need to keep them at all...
 
Old 07-06-2007, 02:37 AM   #12
Rainel
Member
 
Registered: Jun 2007
Posts: 57

Original Poster
Rep: Reputation: 15
var is full

So I just change the "rotate 4" to "rotate 1"
and that's it.

Thanks for the reply.

Best Regards,
Rainel A. Roflo
 
Old 07-06-2007, 04:23 AM   #13
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
What does
du -sm * /var/*|sort -g
give you?


Cheers,
Tink
 
Old 07-06-2007, 07:04 AM   #14
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Quote:
Originally Posted by Tinkster
What does
du -sm * /var/*|sort -g
give you?


Cheers,
Tink
Yes, that would tell us what part of /var fills. Every case is different.. You may have a deffective program that logs a lot of garbage in /var/log.
If the previous cmd shows that /var/log is the fatty one, then get some info from /var/log:

Code:
du -ks /var/log/* | sort -n
 
Old 07-06-2007, 07:13 AM   #15
stealth_banana
Member
 
Registered: Mar 2004
Location: Scotland
Distribution: Debian Sid / Kubuntu
Posts: 170

Rep: Reputation: 30
Incase its not the logs.

can you do

du -h /var
(you may have to sudo it to get access to all directories)

This will scroll a list of folders on the /var partition, and there sizes in human readable form.

Scroll down the list and see what is the largest, or largest 5, then post the results here. That will help us narrow it down to what is taking up the space.
 
  


Reply



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
/var/cache full jeffmski Linux - Newbie 11 12-30-2006 08:45 PM
/var full - need to resize RichardAnderson Linux - General 12 11-11-2006 08:49 PM
/var full manoj142 Linux - General 8 10-17-2005 06:00 AM
/var really full or not? philforrest Linux - Software 6 02-22-2005 03:10 AM
/var full masterJ Red Hat 11 01-16-2004 12:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:26 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
Open Source Consulting | Domain Registration