Operating System - HP-UX
1753614 Members
6131 Online
108797 Solutions
New Discussion юеВ

mounted file system show 50% free but it is empty

 
Richard Hollenbeck
Occasional Advisor

mounted file system show 50% free but it is empty

I have a FS that showed 50% used but there is nothing in it. (HP-UX 11i) I tried to unmount it and it returned "busy". After fuser -cu, I found three processes and killed them. I could then umount the file system. I fsck'd it and then remounted it and it showed 100%. Can anyone explain what might have happened? This is rather urgent. Thank you.
2 REPLIES 2
Sanjay_6
Honored Contributor

Re: mounted file system show 50% free but it is empty

Hi,

It is possible that a process was writing to a log file on this filesystem and the file was deleted. Since the process was still running the space was still occupied by the deleted file. When you killed the process, it released the space and doing an unmount/fsck/remount reclaimed the space. Though the umount/fsck/remount was not necessary.

You can use lsof to find any process that is holding a file open within a filesystem. To download and install lsof, if you don;t have it installed, try

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.73/

This link from itrc might be helpful,

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000072657091

The itrc doc id is KBRC00008039.

Hope this helps.

Regds
A. Clay Stephenson
Acclaimed Contributor

Re: mounted file system show 50% free but it is empty

I assume that when you say it showed 100% that means 100% free. When a file is unlinked (rm'ed - more or less) the link count is reduced by 1. If that link count is now zero, the entry is removed from the directory. However, the space occupied is not actually freed until all process which had the file open either close the file or terminate. Man 2 unlink for more details.

If it ain't broke, I can fix that.