- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- deleted file still occupying space
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2010 10:46 AM
тАО11-09-2010 10:46 AM
deleted file still occupying space
I read that rm'ing a file actually deletes only the name of the file if it is open and the file inode is still present.
it can be removed by killing processes which lsof lists with empty names.
we have 2 nodes of RAC n I use one ocfs moutpoint for export dumps. the export dumps are 4-5G big and sometimes i do a TAR.GZ of the exp files and remove the original ones to save space.
today i did the same and deleted 10 .EXP files immediately after tarring them. I found that the space around 25G occupied by the files did not get released.
user@dbs1:~> df -h | grep u10
/dev/sdi1 200G 164G 37G 82% /u10
user@dbs1:~> du -sh /u10/
113G /u10/
this is how my system shows as of now. I am lucky it didnt happen to a production mountpoint which is running out of space.
I would like to know how i should handle this in future.
>> If I leave it as is, will the new files automatically write to the disk without running out space.
lsof does not show anything for me. I mean there is no file which has empty names.
any inputs on how to deal with such situations and what I should do now to recover this space (apart from rebooting).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2010 11:48 AM
тАО11-09-2010 11:48 AM
Re: deleted file still occupying space
The best way to find deleted files is with 'lsof +L 1'
Try that and see what you find.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2010 11:51 AM
тАО11-09-2010 11:51 AM
Re: deleted file still occupying space
# lsof +L 1 | grep afile
more 19812 root 3r REG 8,2 110079 0 558341 /root/afile (deleted)
This shows that /root/afile has been deleted but is still open by the 'more' command from pid 19812.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2010 12:48 PM
тАО11-09-2010 12:48 PM
Re: deleted file still occupying space
The deleted file will occupy space so long as a process maintains an open file handle on it.
Lets use /tmp as an example
fuser -cu /tmp
# displays process with open file handles on the file system
fuser -cuk /tmp
Kills them all. Very dangerous. I warned you.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2010 07:58 PM
тАО11-09-2010 07:58 PM
Re: deleted file still occupying space
the command i was trying all this while was
lsof /u10
shows no output
lsof +L 1
does not show the files which i deleted yesterday. how do i deal with this.
and further, if I now copy a 50G file into the partition /u10, will it run out of space at 37G or will it overwrite the open handles?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2010 08:22 PM
тАО11-10-2010 08:22 PM
Re: deleted file still occupying space
diff between df and dh is as below. I am losing over 50G
user1@dbs1:~> du -sh /u10/
114G /u10/
user1@dbs1:~> df -h | grep u10
/dev/sdi1 200G 166G 35G 83% /u10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2010 06:21 AM
тАО11-12-2010 06:21 AM
Re: deleted file still occupying space
run "lsof |grep deleted" command and then kill that processes
taylan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-13-2010 11:10 AM
тАО11-13-2010 11:10 AM
Re: deleted file still occupying space
the command lsof | grep deleted shows a whole bunch of files ... none actually show a size greater than zero.
my partition is a ocfs partition which is shared on two nodes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-13-2010 04:01 PM
тАО11-13-2010 04:01 PM
Re: deleted file still occupying space
How can you tell, wrong filesystem?
>none actually show a size greater than zero.
Why not clean them up too?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-13-2010 08:45 PM
тАО11-13-2010 08:45 PM
Re: deleted file still occupying space
i deleted files. backup exp dumps from /u10 which is an ocfs partition.
current status
du -sh /u10/
128G /u10/
Filesystem Size Used Avail Use% Mounted on
/dev/sdi1 200G 180G 21G 90% /u10
52G loss.
there are about 110 entries when i run lsof | grep deleted. is it safe to kill those processes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2010 03:57 AM
тАО11-14-2010 03:57 AM
Re: deleted file still occupying space
Which is more important, those processes or the space?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2010 11:15 AM
тАО11-14-2010 11:15 AM
Re: deleted file still occupying space
the lsof command does not show any entries from /u10
So will deleting the other processes help. For sure space is imp, but i dont want to screw something.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2010 12:00 PM
тАО11-14-2010 12:00 PM
Re: deleted file still occupying space
You don't know what each file has, only the filesystem. But you do know the process and the owner. That the info you can use to figure out what's more important.
>the lsof command does not show any entries from /u10
Then there is nothing you can do. Somebody is lying to you. You might want to see if you regain that space after some future reboot.
>So will deleting the other processes help. space is imp, but I don't want to screw something.
No, not if it is a different filesystem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2010 02:46 PM
тАО11-15-2010 02:46 PM
Re: deleted file still occupying space
Have you checked ALL nodes that use the OCFS partition? Could a node other than the one you are logged into be holding the files open?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2010 02:40 AM
тАО11-16-2010 02:40 AM
Re: deleted file still occupying space
i had checked on both nodes of my cluster. my partition /u10 is not seen in
lsof | grep deleted
the current partition doesnt contain anything related to production. i can try to umount it and remount it.... provided it allows me to.
my concern is, if this happens in my production mountpoint tomorrow, i sud be able to handle it. :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2010 05:59 AM
тАО11-17-2010 05:59 AM
Re: deleted file still occupying space
not sure, u might have alrady tried all these, but just for your information.
If you use just lsof, it will show lot of entries, please try to use something like this
#lsof /u01 | grep -i deleted
as you stated, yes i understand, no deleted open files. can u also check the list of process using /u01 filesystem? by fuser, and try to understand which process can be killed.
Such issues, shuld be solved without a server reboot... good luck.... please post the solution without fail.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2010 07:26 AM
тАО11-17-2010 07:26 AM
Re: deleted file still occupying space
http://www.idevelopment.info/data/Oracle/DBA_tips/OCFS2/OCFS2_5.shtml
It may shed some light on the problems you are having.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2010 11:04 AM
тАО11-17-2010 11:04 AM
Re: deleted file still occupying space
looks like the idevelopment.info like mite help me.
rpm -qa shows ocfs2 version as 1.4.0
the partition in question is not in production.
so shall i umount it from all nodes and do a fsck.ocfs2 -fy /dev/sdi1 without stopping the clusterware?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-19-2010 11:06 AM
тАО11-19-2010 11:06 AM
Re: deleted file still occupying space
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-22-2010 12:24 AM
тАО11-22-2010 12:24 AM
Re: deleted file still occupying space
Try this example.. it should work. kill all the process which has the nlink count as 0.
lsof +L1 /u300 | sort -nr +7
Cheers,
Saleem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-25-2010 02:30 AM
тАО11-25-2010 02:30 AM
Re: deleted file still occupying space
sorry for the delay in replying.
i am disappointed with the turn of events at my end.
yday we had some serious issues with the storage eva4400 and both nodes of the RAC restarted automatically.
luckily the data was safe! And space in the partition for which i started the thread came back to its normal state.
i m disappointed that i cud not handle it without the restart ... :(
wonder wat i wud do if it happens in a partition used in prod! :(