Operating System - HP-UX
1752604 Members
4339 Online
108788 Solutions
New Discussion юеВ

Re: which process is still using deleted files

 
GTFSpanneer
Frequent Advisor

which process is still using deleted files

Hi All,

We have deleted some files but the file system space is not getting reclaimed. how to check which process is still using deleted files in hp ux


Thanks in advance.

Panneer
8 REPLIES 8
AnthonySN
Respected Contributor

Re: which process is still using deleted files

which files have you deleted, are they any datasbase files or normal text files?
GTFSpanneer
Frequent Advisor

Re: which process is still using deleted files

Hi SASj,

database file.

tbs1_tmp01.dbf

rariasn
Honored Contributor

Re: which process is still using deleted files

Asif Sharif
Honored Contributor

Re: which process is still using deleted files

Hi,

shutdown/Start up your database will solve your issue.

Regards,
Asif Sharif
Regards,
Asif Sharif
AnthonySN
Respected Contributor

Re: which process is still using deleted files

and how did u delete that file doing rm -rf, which is not the correct way of doing it.
you need to restart db.
Berd
Trusted Contributor

Re: which process is still using deleted files

I would use lsof utility.
Viktor Balogh
Honored Contributor

Re: which process is still using deleted files

Hi,

Use this command to identify the processes which use the already deleted files:

# lsof +D / +L1

Look for the files with NLINK count of zero.

Regards,
Viktor
****
Unix operates with beer.
Elmar P. Kolkman
Honored Contributor

Re: which process is still using deleted files

And if you don't have lsof installed but a working version of glance, you could use that.

But in this case, you know which file it is, so you might also know which database had that file. That means that you or your DBA should be able to find which database and which databases process is using the file (possibly all processes of the database, if it's the temporary tablespace for your oracle database, for instance). Restarting the database should solve your issue from a Sysadmin point of view, though I suspect it means the database is broken from a DBA point of view...
Every problem has at least one solution. Only some solutions are harder to find.