Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 02-15-2005, 08:01 PM   #1
Registered: Oct 2004
Location: NY
Distribution: Slackware
Posts: 200

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


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 08:03 PM.
Old 02-15-2005, 10:29 PM   #2
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

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

Old 02-16-2005, 02:02 AM   #3
Senior Member
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

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.

Old 02-16-2005, 07:03 AM   #4
Registered: Sep 2004
Location: Dayton, Oh
Distribution: Linux Mint 17
Posts: 150

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, 10:44 AM   #5
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, 11:27 AM   #6
Registered: Oct 2004
Location: NY
Distribution: Slackware
Posts: 200

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!


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 / openSUSE 4 02-22-2013 01:17 PM
free disk space mp4-10 Linux - Software 1 04-06-2005 03:32 AM
Can't free disk space mcm8327 Linux - Software 4 03-29-2004 08:19 AM
Free up disk space TheShemeta Slackware 5 11-26-2003 04:50 PM
free disk space? Alf829 Linux - Newbie 3 08-01-2003 11:26 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:57 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration