LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-15-2005, 09:01 PM   #1
krizzz
Member
 
Registered: Oct 2004
Location: NY
Distribution: Slackware
Posts: 198

Rep: Reputation: 30
Question rm doesn't free the disk space


Hello,

I have the disk with ReiserFS. Sometimes it gets full becouse of my php error_log (I know how to deal with php settings and my question is not about it).

My partition is 900MB. My linux uses about 380MB of disk space. So the log must become about 520MB to fill it up. After removing the file I still have whole disk space taken, however the file disapears. After rebooting I'm getting disk space free again. What's the matter?

Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda1 975676 975676 0 100% /
/dev/hdb1 11719020 220120 11498900 2% /hdb1

Last edited by krizzz; 02-15-2005 at 09:03 PM.
 
Old 02-15-2005, 11:29 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,999
Blog Entries: 11

Rep: Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881Reputation: 881
Do you stop/restart the webserver when you delete the log?


Cheers,
Tink
 
Old 02-16-2005, 03:02 AM   #3
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,438

Rep: Reputation: 52
Hmm, interesting. If you cat /dev/null > php.log, then you should be able to free up some space in /. Yea, try tinksters suggestion of restarting apache and see if that helps - even though I don't know how it would.

-twantrd
 
Old 02-16-2005, 08:03 AM   #4
Hobbletoe
Member
 
Registered: Sep 2004
Location: Dayton, Oh
Distribution: Linux Mint 10, Linux Mint 11
Posts: 148

Rep: Reputation: 18
This problem occurs in Solaris as well once you fill up a disk. The only solution that we've found for it is to reboot the machine. And normally when we would fill up a disk, it was with a database export. As such, I don't think that the problem would be with Apache holding on to that memory (once our export would finish, we would remove the files in question, and still not reclaim the free space, and Oracle wouldn't be holding onto it as that process was finished at the time). I'd definately try restarting the Web Server, but I doubt that it will clean up that free space.

Hobbletoe Clubfoot
 
Old 02-16-2005, 11:44 AM   #5
LasseW
Member
 
Registered: Oct 2004
Distribution: Fedora 7, OpenSuse 10.2
Posts: 108

Rep: Reputation: 15
You can see if there are processes using the file with

fuser -v error_log

Stop those processes first, then remove the file.
 
Old 02-16-2005, 12:27 PM   #6
krizzz
Member
 
Registered: Oct 2004
Location: NY
Distribution: Slackware
Posts: 198

Original Poster
Rep: Reputation: 30
Great advice everybody! O course, I haven't stopped apache before deleting the file. Restarting it later, after removing log didn't help but ... I deleted some other small file to get some free bytes. The new log of size of 160B appeared. Then I stopped apache and deleted the new log. The result was that after deleting 160 bytes small file I got 500MB of disk space.. So thank you everybody for the good advice!
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
No free space on disk, but there is? Recirqie Suse/Novell 4 02-22-2013 02:17 PM
free disk space mp4-10 Linux - Software 1 04-06-2005 04:32 AM
Can't free disk space mcm8327 Linux - Software 4 03-29-2004 09:19 AM
Free up disk space TheShemeta Slackware 5 11-26-2003 05:50 PM
free disk space? Alf829 Linux - Newbie 3 08-01-2003 12:26 PM


All times are GMT -5. The time now is 08:50 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