Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete files, where's the space? 4

Status
Not open for further replies.

JPJeffery

Technical User
May 26, 2006
600
GB
Sorry.

What for?

I'm a windows fella asking what must be an often asked question with a really bleedin' obvious answer.

Having deleted some files from an ESX server (which is based on Linux, or is it NetBSD?), using WinSCP, we're not seeing the expected disk space being added to the free space total.

What gives? How do we claim it back?

TIA

JJ
[small][purple]Variables won't. Constants aren't[/purple][/small]
 
This usually will happen when there is a process running that still has opened the (allegedly) deleted files.
The disk space will be available as soon as the process has ended.
So find out, and stop the offending process.
If in doubt: A reboot will stop it, and make the space available.

hope this gelps
 
So find out, and stop the offending process.

Use the command lsof to do so.

--== Anything can go wrong. It's just a matter of how far wrong it will go till people think its right. ==--
 
Use the command lsof to do so.
Not sure how this could be done, when the file hase been deleted, i.e. it is no longer visible for ls command ?
It would be easy if one had used lsof before deleting ...
 
If an application has a file open, it will still show with lsof (kernel file handle?).

Example:
Code:
$ /usr/sbin/lsof | grep mytest.txt
vim       16032    zeland    4u      REG       8,17     12288   788942 /home/zeland/.mytest.txt.swp
Deleting the file while vim is still open
Code:
$ rm .mytest.txt.swp
$ /usr/sbin/lsof | grep mytest.txt
vim       16032    zeland    4u      REG       8,17     12288   788942 /home/zeland/.mytest.txt.swp (deleted)

--== Anything can go wrong. It's just a matter of how far wrong it will go till people think its right. ==--
 
zeland,

thanks for confirming!
One learns something new ever day. [smile]
 
Well, some great responses there, thanks to all.

Could the problem also be related to the file system? i.e. that all the partitions are presented as being part of the same file structure so some folders have different free space than do others...

JJ
[small][purple]Variables won't. Constants aren't[/purple][/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top