LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This 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


Reply
  Search this Thread
Old 09-22-2010, 02: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, 04:35 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
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, 04:38 PM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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, 03:57 PM   #4
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 683

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

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


Reply



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
Scratch Disk Full Solaris 10. Cant Delete or Move Files donanap Solaris / OpenSolaris 6 10-26-2018 04:41 AM
disk space full because alot of files in /var/spool/clientmqueue folder k0nsole.c Linux - Software 4 03-21-2016 09:26 AM
Disk full. Deleted files but no space available. atrejo Linux - General 3 05-03-2010 02:00 PM
root partition full but cannot find big files leotina Linux - Newbie 3 09-01-2009 11:19 PM
How to find a work within a folder full of text files? juanb Linux - General 4 05-03-2005 04:09 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

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