[H-GEN] Out of disk space errors?

Christopher LeMoyne (HUMBUG) christopher_lemoyne at yahoo.com.au
Fri May 20 04:00:07 EDT 2005


Robert Brockway wrote:

>[ Humbug *General* list - semi-serious discussions about Humbug and     ]
>[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
>
>On Sun, 15 May 2005, David Harrison wrote:
>
>  
>
>>Has anyone seen this behaviour before? Short of a reboot (which I'm trying to
>>    
>>
>
>Yes, it is a function of how Unix uses files.  If you remove a file the 
>space is only freed once the process holding the file exits.  Figure out 
>which daemon or other process was using the files and stop and restart 
>them.
>
>The best option is to use fuser or lsof before deleting the file to see 
>who has it.
>
>You may be able to examine /proc to see who is holding the files.
>
>A reboot works only because it stop the proceses involved.
>
>Rob
>
>  
>
David, you may also want to consider doing a "find . -size +10000000c 
-exec ls -l {} \; -print" in the root directory.  This command will find 
all files larger than 10MB in size.

It can also be enlightening to do a "du -h --max-depth=1", which will 
show the size of all sub-directories.

However, as mentioned above by Robert, if the file has been deleted 
before the process released it, it will still be taking up the disk 
space, but won't release it until the process stops or is killed.  As 
mentioned, "lsof" and "fuser" can aid further investigations if this is 
the case.  Once you find the process that is holding the deleted file 
open, killing that process will free up the disk space.  Obviously care 
is needed here, as killing any random process may cause more problems.

Regards,
Christopher




More information about the General mailing list