LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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: 40
/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: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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: 40
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: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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: 111

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: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
"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: 768

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

tobyl
 
  


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
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:29 PM.

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