LinuxQuestions.org
Visit Jeremy's Blog.
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 09-29-2009, 05:52 AM   #1
mohit052
LQ Newbie
 
Registered: Nov 2008
Posts: 25

Rep: Reputation: 15
Freeing disk space


Hi, Had this problem in a few different instances where a process was creating a set of files in directory and using those files.

Some one just happened to go to the dir and deleted those files without stopping the process. The result being that as the process is still telling the machine that the disk usage is still what it initially was (df -h shows the old disk usage) , where as a du -h or a ls -lh on that same dir show that the files are not there.

Once this happened with mysql where the user delete the database dir in /var/database_name in the mysql home dir. The result being that the dusk usage was still showing as the old one even if the files were missing. This was resolved by restarting the mysql server.

Similar thing happened with some other processes where on restarting the problem was resolved..

My question being is there a method to solve this problem by whithout restarting the concerned process.. Some magical command like free disk or recheck dis usage :-) .. may be too much to ask but can some one help me out here.
 
Old 09-29-2009, 06:49 AM   #2
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by mohit052 View Post
Hi, Had this problem in a few different instances where a process was creating a set of files in directory and using those files.

Some one just happened to go to the dir and deleted those files without stopping the process. The result being that as the process is still telling the machine that the disk usage is still what it initially was (df -h shows the old disk usage) , where as a du -h or a ls -lh on that same dir show that the files are not there.

Once this happened with mysql where the user delete the database dir in /var/database_name in the mysql home dir. The result being that the dusk usage was still showing as the old one even if the files were missing. This was resolved by restarting the mysql server.

Similar thing happened with some other processes where on restarting the problem was resolved..

My question being is there a method to solve this problem by whithout restarting the concerned process.. Some magical command like free disk or recheck dis usage :-) .. may be too much to ask but can some one help me out here.
The answer is it depends on the process and its code. If the process code makes the assumption that no one would erase open, active files in use by a live process, then there's nothing you can do but rewrite the code or restart the process. There's no third option -- you can't force the process to update its assumptions if it won't do this on its own.
 
  


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
Problem with freeing disk space on a two hard disk Fedora Core 4 box favadalikhan Linux - Server 1 04-29-2008 09:04 PM
freeing disk space yull Debian 9 05-10-2007 08:28 PM
Red Hat 6.2 disk space error - "Freeing blocks not in datazone" richfink Linux - Software 2 08-26-2006 04:08 PM
Disk Usage and freeing up some space MicahCarrick Linux - Software 3 01-26-2006 01:49 PM
freeing up space on floppy disk mleschis Linux - Newbie 20 12-18-2003 05:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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