Operating System - HP-UX
1829121 Members
1968 Online
109986 Solutions
New Discussion

Filesystem size not reporting space correctly

 
John Oberlander
Frequent Advisor

Filesystem size not reporting space correctly

Twice in June i've had filesystems fill up to 100% and stay there even after we move or purge files. We moved 2G out of are /archives directory and it's sill reporting at 100%.

VxFS presented from a EVA5000


RP8400 10CPU 18GRam,
6 REPLIES 6
Devender Khatana
Honored Contributor

Re: Filesystem size not reporting space correctly

Hi,

This file system has some open files which are in use by some applications which is causing this.Use fuser command to find processes using this

#fuser -u /archives

Once these process are terminted or aborted the space should be reflected properly.

HTH,
Devender
Impossible itself mentions "I m possible"
RAC_1
Honored Contributor

Re: Filesystem size not reporting space correctly

You need to think about it yourself. What would cause this?? open files?? open processes?? Most probable reason is you moved/deleted files when they were still being accesses.

Before you move/delete them, you should always do a check to see if they are being used or not.

fuser -u /dir/file
Will give you which process is using the file. The other tool that most of the admins use is lsof (list open files) you can get it fro here.

http://hpux.connect.org.uk

Now as you have moved/deleted files, you will have to stop the process to see that process releasesthe space and you see it in your bdf/FS

You can do lsof +aL1 to check what processes are holding the space now.

Anil
There is no substitute to HARDWORK
John Oberlander
Frequent Advisor

Re: Filesystem size not reporting space correctly

Thanks for the quick response. I have lsof installed, but i didn't think i would be able to move files that were in use. Copy yes, but delete? We started seeing this problem when a new contractor created a shadow file in /etc locking out all the users even root. We've never had this problem till that happened.

Thanks,
John
Bill Hassell
Honored Contributor

Re: Filesystem size not reporting space correctly

Hummmm, a new contractor with root access? Oh well. Deleting files that are open is a long tradition for Unix systems. The file is not really removed. Instead, the link count is decremented to zero and the entry disappears from the directory. But the space is not released until all processes have closed the file. Once a file has been opened, access to the file space is based on a file control block within the program so the directory entry can disappear but the file inodes still remain intact until all processes release control.


Bill Hassell, sysadmin
Sandman!
Honored Contributor

Re: Filesystem size not reporting space correctly

# lsof +aL1

should report the open files that havent' released space (NLINK=0).

regards!
John Oberlander
Frequent Advisor

Re: Filesystem size not reporting space correctly

Thanks for all the great info!!

John