LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 09-08-2006, 04:25 PM   #1
WindowBreaker
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 228

Rep: Reputation: 31
/var is at 100% usage, even after deleting files


I had a problem where log files grew very big on /var. My usage was at 100% per 'df -h'. I removed all the big log files, but it's still showing as 100% usage. If I run 'du -sh /var' , it's only 600MB now, but it's showing as 6.5GB on the output of the 'df -h' command. It's mounted as it's own partition.

I need it to realize only 600MB are being used without actually remounting the /var partition, since people are using the server. Until I do this, postfix SMTP will not receive emails, saying there's not space left on device.

Any help would be appreciated.
 
Old 09-08-2006, 04:53 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,962
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
Well, if you've deleted a file while it's still in use you've created
a harder to diagnose problem ... the file (and it's allocated inodes)
will remain in use until you shut down the service/process that had
created it.

In other words ... remember what you killed, which process owned it,
and then HUP that process.


Cheers,
Tink
 
Old 09-08-2006, 05:05 PM   #3
WindowBreaker
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 228

Original Poster
Rep: Reputation: 31
Tinkster:
Thanks for the tip. The log files I deleted were from several days ago, and I made sure they were not being accessed.

The solution was, as I suspected, to unmount/remount the /var partition. I just warned my users, and rebooted. Now the output of 'df -h' shows the correct usage.

It still bugs me that it took a remount to update the output.
 
Old 09-08-2006, 05:12 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,962
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
A reboot shouldn't have been necessary if the umount actually worked.
If it didn't it indicates that some process was still holding on to
some files.


Cheers,
Tink
 
Old 09-08-2006, 06:47 PM   #5
Daga
Member
 
Registered: Apr 2006
Location: A comfy chair...
Distribution: Slackware
Posts: 110

Rep: Reputation: 15
Next time "lsof|grep '/var/path/log_file'" might help diagnose which program is responsible
 
Old 09-08-2006, 07:06 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,953
Blog Entries: 54

Rep: Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732
"lsof|grep '/var/path/log_file'"
Use "lsof +D /var/log" and get one command to use elsewhere for free!!!
That's amazing, Mike.
 
Old 09-10-2006, 08:17 AM   #7
tobyl
Member
 
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 743

Rep: Reputation: 50
have you got logrotate running?
you can add your own logfiles if you need to, in /etc/logrotate.conf

tobyl
 
  


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
Deleting some of /var/lib/urpmi Sabinou Linux - Newbie 4 07-29-2006 10:14 AM
not able to clear the var folder show 100% usage help me? oldnavyboy06 Linux - Networking 1 07-11-2006 05:04 AM
deleting 100 rows in text file (1-100) via terminal itz2000 Linux - Newbie 5 01-17-2006 11:19 PM
Deleting Swaret files in /var/swaret?? Garibaldi3489 Slackware 2 12-30-2004 04:10 PM
100% CPU usage while I copy files.... Pyroteam Linux - Hardware 4 10-24-2004 04:17 AM


All times are GMT -5. The time now is 06:14 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration