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 |
Hi,
Your log files (/var/log/) could have grown to big. Maybe you can truncate one (or more) of those. Hope this helps. |
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. |
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 |
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. |
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 |
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. |
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 |
/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 |
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 |
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... |
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 |
What does
du -sm * /var/*|sort -g give you? Cheers, Tink |
Quote:
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 |
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. |
All times are GMT -5. The time now is 04:54 PM. |