[SOLVED] scratch space appears full but I can't find the files
Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This looks to me like df is reporting that there is 34G used in /scratch and du is reporting that there is only 1G used in /scratch. Why the discrepancy? Where is the other 33G?
I am looking to free up space in /scratch but I can only find the 1G of data. Where is the rest?
Earlier today, I had a ~20G file in /scratch and df was reporting the capacity at 95% and 2.2G available. After removing the file, df now reports the above values i.e. 87%, 5.2G. How does this make sense?
If there's a process running which still has an open file handle for any of the files you've removed, then the space won't be released until the process either dies of closes the file.
If you've got 'lsof' installed, try running 'lsof | grep deleted'. You might get some joy from 'fuser /scratch', but to be honest fuser never works for me. If not, try:
cd /proc
find . -size +18000000000
That should find any processes with files bigger than ~18GB open. The first part of the path from any results is the PID for the process.
If a reboot isn't possible ilikejam's solution will identify the process. If the process can't be killed you can hit the file descriptor directly you will see something like this:
-rw-r–r– 1 webservd webservd 121601722 Apr 6 12:36 935/fd/19
935 is the process, 19 is the file descriptor
cd to the /proc/935/fd directory (or whatever is appropriate) and then :>19 (or what your number was) to zero out the file
There are all kinds of warnings against doing it this way I would advice restarting the process as the best way.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.