System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

which process is still using deleted files

 
Highlighted
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
Highlighted
Respected Contributor

Re: which process is still using deleted files

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

Re: which process is still using deleted files

Hi SASj,

database file.

tbs1_tmp01.dbf

Highlighted
Honored Contributor

Re: which process is still using deleted files

Highlighted
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
Highlighted
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.
Highlighted
Trusted Contributor

Re: which process is still using deleted files

I would use lsof utility.
Highlighted
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.
Highlighted
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.