LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices



Reply
 
Search this Thread
Old 09-22-2010, 03:04 PM   #1
gunther123
LQ Newbie
 
Registered: Sep 2010
Posts: 2

Rep: Reputation: 0
scratch space appears full but I can't find the files


Solaris 10

"df -h" reports:
/scratch, size=39G, used=34G, avail=5.2G, capacity=87%

"du -skh /scratch" reports:
1.0G /scratch

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?

-Mike
 
Old 09-22-2010, 05:35 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi.

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.

Dave
 
Old 09-22-2010, 05:38 PM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,523

Rep: Reputation: 365Reputation: 365Reputation: 365Reputation: 365
Quote:
Originally Posted by ilikejam View Post
You might get some joy from 'fuser /scratch', but to be honest fuser never works for me.
fuser only see files that haven't been unlinked so it won't detect the big "removed" one.
 
1 members found this post helpful.
Old 09-23-2010, 04:57 PM   #4
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 682

Rep: Reputation: 63
Standard windows answer... Reboot.

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-rr 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.
 
Old 09-23-2010, 06:38 PM   #5
gunther123
LQ Newbie
 
Registered: Sep 2010
Posts: 2

Original Poster
Rep: Reputation: 0
A reboot worked!
Thanks for the suggestions!
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disk full. Deleted files but no space available. atrejo Linux - General 3 05-03-2010 03:00 PM
root partition full but cannot find big files leotina Linux - Newbie 3 09-02-2009 12:19 AM
Scratch Disk Full Solaris 10. Cant Delete or Move Files donanap Solaris / OpenSolaris 5 01-12-2009 07:41 AM
disk space full because alot of files in /var/spool/clientmqueue folder k0nsole.c Linux - Software 3 07-03-2007 07:09 AM
How to find a work within a folder full of text files? juanb Linux - General 4 05-03-2005 05:09 PM


All times are GMT -5. The time now is 02:19 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration