Operating System - HP-UX
1753882 Members
7470 Online
108809 Solutions
New Discussion

Re: Filesystem free space is not releasing completly

 
joseph51
Regular Advisor

Re: Filesystem free space is not releasing completly

the ouput I have pasted is after clearing the FS , and I am sure that no process was using this direcory ,again I unmounted the FS then just did a fsck -F vxfs -o full,nolog . after that I mouted it back . Now now any way there will not be aby process using this ..And One more interesting thing is that when I restored data which is greated than the total available size as per the bdf output , I could do it successfully . and Now its showing the total usage of 95% only . Why this kind of behaviour .
James R. Ferguson
Acclaimed Contributor

Re: Filesystem free space is not releasing completly

Hi (again):

> And One more interesting thing is that when I restored data which is greated than the total available size as per the bdf output , I could do it successfully . and Now its showing the total usage of 95% only . Why this kind of behaviour .

As usual, if you told us *how* [ what tool ] you used to "restore" [ copy ] the data we might be able to enlighten you.

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: Filesystem free space is not releasing completly

When you copy files and directories to a new location (or restore them from a backup image), there will be very little possibility that the occupied space will be the same. Consider a directory that had 5 million files in it. All the files were removed so the directory is empty. HOWEVER, the space needed to remember all those file names in the directory is NOT reduce. There are a million free entries in the directory that can be used. When this directory is created at the new location, it has no entries and will be significantly smaller in terms of occupied space at the target.

Conversely, a 'sparse' file has very large pieces of undefined space between records. A program writes record 1 then lseeks to record 1000000000 and writes one more record. The file occupies very little space. But when it is copied, the file is read sequentially. Since there is no way to inform the copy program that these records are undefined, a stream of zeros (nulls) is supplied and not the destination copy of the file is one million times larger than the original file. Sparse files are very common in database programs.

So to verify that a copy is correct, you count the number of files and directories. And if you are very paranoid, then run a cksum on every file and compare the values with the original files. Note that cksum will produce identical values with a sparse file and the copy.


Bill Hassell, sysadmin
Michael Steele_2
Honored Contributor

Re: Filesystem free space is not releasing completly

"..t when I restored data which is greated than the total available size as per the bdf output , I could do it successfully . and Now its showing the total usage of 95% only . Why this kind of behaviour .."

It more reliable to compare inodes than bytes for the reasons explained to you above: Bytes are written into 1024 KB blocks. They are not contiguously written like you would write onto tape.

If you copy 10 GB from filesystem A to B, then the bdf in bytes will be wrong. However, the "...bdf -i.., or df -i..." report on inodes will always be exactly the same.

bdf -i
df -i
Support Fatherhood - Stop Family Law
Vivek_Pendse
Valued Contributor

Re: Filesystem free space is not releasing completly

Try the "sync" command after file(s) deletion.
Some times, to clear off the consumed space from file system requires time. Use debugger to drill down.

Thanks,
Vivek
Michael Steele_2
Honored Contributor

Re: Filesystem free space is not releasing completly

the sync command automatically executes every 30 seconds. Unless that's changed. I haven't looked up the execution time interval for awhile, but it was always 30 seconds.
Support Fatherhood - Stop Family Law
Dennis Handly
Acclaimed Contributor

Re: Filesystem free space is not releasing completly

>Vivek: Some times, to clear off the consumed space from file system requires time.

Yes, I've seen that.

>Use debugger to drill down.

What debugger on what program or the kernel?
Vivek_Pendse
Valued Contributor

Re: Filesystem free space is not releasing completly

Hi Dennis,

I was talking about fsdb.

Thanks,
Vivek
MJCMarx
New Member

Re: Filesystem free space is not releasing completly

Thx for this, my issue was resovled as a result of this forum. After killing the process the usage went down to 0% as ecxpected.

chindi
Respected Contributor

Re: Filesystem free space is not releasing completly

I hope this is HP-UX  only.

Is it 11iv2 or v3 ?

Would like to know filesystem version , fstyp -v

If you are unable to trace 113gb file , can you create the same using "prealloc" command and then just "rm" it and see if the space gets released .

Let me whether you have online JFS installed or not ??