Operating System - HP-UX
1833871 Members
1737 Online
110063 Solutions
New Discussion

Re: Filesystem utilization does not join after purging files

 
Chris Fung
Frequent Advisor

Filesystem utilization does not join after purging files

Hi all,

I have a strange problem that after I purge a huge files within a directory....the size of that filesystem does not drop !! I am thinking to unmount or reboot the system....and I am sure the space will be released. (Operating System - 10.x)

However, the system is running in 24 x 7 mode...so just wondering if there is another workarounds ?

Could you tell me the reason(s) for the symptom ? Is that we should not trust the output of "df" ? If so, any other command reflect the true picture ?

Much appreciated for your advice.

Cheers,

Chris
8 REPLIES 8
Patrick Wallek
Honored Contributor

Re: Filesystem utilization does not join after purging files

The problem is probably that some process was still accessing the file when you deleted it. Until that process releases the file, your space will not be freed up even though the file no longer show up in the output of an ls command.

Your best bet is to see who may still be accessing the filesystem that the file was in. You can do an 'fuser -cu /mountpoint name' to see who all is accessing that mount point.

Another way would be to use 'lsof' to look at the processes and the files they are using. Once you identify the process you can kill it if need be.
John Payne_2
Honored Contributor

Re: Filesystem utilization does not join after purging files

Patrick hit the nail on the head for you.

Since you already found the files, you have done 75-90% of the work already. If fuser does not give you a process, (it happens) lsof will definitely do it for you. My boss just spend most of an evening chasing files on a system, moving stuff around, etc. (/ had filled up do a couple very naughty files in the FS)

If you are just lazy, schedule a reboot. If you find the process causing the trouble and find it can't be killed, is a system process, etc. You may be stuck rebooting anyway, but 9 times out of 10, you'll get the FS utilization down and be the hero.

John
Spoon!!!!
John Payne_2
Honored Contributor

Re: Filesystem utilization does not join after purging files

Patrick hit the nail on the head for you.

Since you already found the files, you have done 75-90% of the work already. If fuser does not give you a process, (it happens) lsof will definitely do it for you. My boss just spend most of an evening chasing files on a system, moving stuff around, etc. (/ had filled up do a couple very naughty files in the FS)

If you are just lazy (temporarily or otherwise), on vacation, in a hurry, etc., schedule a reboot. If you find the process causing the trouble and find it can't be killed, is a system process, etc. You may be stuck rebooting anyway, but 9 times out of 10, you'll get the FS utilization down and be the hero.

John
Spoon!!!!
John Payne_2
Honored Contributor

Re: Filesystem utilization does not join after purging files

Patrick hit the nail on the head for you.

Since you already found the files, you have done 75-90% of the work already. If fuser does not give you a process, (it happens) lsof will definitely do it for you. My boss just spend most of an evening chasing files on a system, moving stuff around, etc. (/ had filled up do a couple very naughty files in the FS)

If you are just lazy (temporarily or otherwise), on vacation, in a hurry, etc., schedule a reboot. If you find the process causing the trouble and find it can't be killed, is a system process, etc. You may be stuck rebooting anyway, but 9 times out of 10, you'll get the FS utilization down and be the hero.

John
Spoon!!!!
John Payne_2
Honored Contributor

Re: Filesystem utilization does not join after purging files

Sorry about the multiple posts. The forum was having some sort of problem.

John
Spoon!!!!
T G Manikandan
Honored Contributor

Re: Filesystem utilization does not join after purging files

YOu can just find the processes accessing the specified file system or associated directory by using

fuser -cu
or by using lsof.

What kind of file is that?

I used to face the same problem with one of the application process.
Stopping and starting the process would also suffice.

If you do not have lsof get it from

64 bit
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf58885079106d71190050090279cd0f9,00.html

32 bit
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.61/

Revert
harry d brown jr
Honored Contributor

Re: Filesystem utilization does not join after purging files

Steven E. Protter
Exalted Contributor

Re: Filesystem utilization does not join after purging files

Now if you can't clear the fs, you can use

fuser -cuk /fsname

Its a sledgehammer, and if there is a legitmate user of that filesystem, like an oracle database, you'll hear glass crash right after you do it.

Steve
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com