Operating System - HP-UX
1822080 Members
3414 Online
109640 Solutions
New Discussion юеВ

Re: compression not releasing space

 
SOLVED
Go to solution
shruti_1
Advisor

compression not releasing space

Its very strange thing happening on my server.
From y'day we ar compressing the files using gzip. I could see that the files are being reduced frpm 30 Gb to 5 GB. However available space in the that particular volume is not increasing. Could anyone throw light what could be the reason.


8 REPLIES 8
Darrel Louis
Honored Contributor

Re: compression not releasing space

Hi,

Do you have lsof on your system.
Use lsof to see which PID isn't releasing the inode.

Darrel
shruti_1
Advisor

Re: compression not releasing space

I dont have lsog, how could i download it.
Arunvijai_4
Honored Contributor

Re: compression not releasing space

Hi Shruti,

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.77/

-Arun

"A ship in the harbor is safe, but that is not what ships are built for"
Steven E. Protter
Exalted Contributor
Solution

Re: compression not releasing space

Shalom shruti,

lsof is useful and you should get a copy.

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

What is happening is that the gzip process is not closing its file handle or closing at all.

You can use the fuser -u or fuser -cu command to see what processes are open in the folder.

Then you can carefully kill them until the space is released.

gzip may simply not be finishing. It needs to keep two copies of the data until its done.

If the original file is 30 GB and the compressed one is going to be 8 GB it needs 38 GB of space on the filesystem to complete the zip process.

SEP
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
xcvzxvzxdv
Advisor

Re: compression not releasing space

Dear SEP,
I could not see the two copies of a particular file. There is only the compress file.

It has removed it but not released its space.
xcvzxvzxdv
Advisor

Re: compression not releasing space

I have installed the lsof depot. However when I type lsof it is giving

# lsof
sh: lsof: not found.
Raj D.
Honored Contributor

Re: compression not releasing space

hi,
You can go to /usr/local/bin/
and execute lsof

# cd /usr/local/bin
# ./lsof -i -U
(To list all open Internet, and UNIX files,

(see the man page for details )
you can also use the find command to locate where lsof is located:
# find / -name lsof -print

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Bill Hassell
Honored Contributor

Re: compression not releasing space

When you install lsof, it will be placed in a specific directory (typically /usr/local/bin) and a properly packaged product will make sure that the file /etc/PATH is updated with this path. Look at /etc/PATH and if /usr/local/bin is in this list, log out and back in again. Then use the command:

type lsof

It should report lsof's location. If not, your login is not processing /etc/profile (common with Xwindows or strange shells like csh).


Bill Hassell, sysadmin