System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Used space is not getting reduced even after removing lot of files and directories in HP-UX 11.00

 
SOLVED
Go to solution
senthil_kumar_1
Super Advisor

Used space is not getting reduced even after removing lot of files and directories in HP-UX 11.00

Hi All,

I have found that space /var utilized about 96%.

Example:

#bdf /var
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol8 2097152 1998952 92099 96% /var


Therefore I used following steps to rmove some bigger files.


#cd /var

#ll

-rw-rw---- 1 mleadm mail 2384120 Aug 19 07:00 mleadm
-rw-rw---- 1 oracle mail 34275847 Aug 19 07:15 oracle
-rw-rw---- 1 oracle9 mail 564186146 Aug 19 07:15 oracle9


# > mleadm

# > oracle9

# > oracle


After executing above commands, I have just checked. But there is no reduce in the usage of the space of /var.

#bdf /var
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol8 2097152 1998992 92061 96% /var



How to solve the issue?

8 REPLIES
rariasn
Honored Contributor
Solution

Re: Used space is not getting reduced even after removing lot of files and directories in HP-UX 11.00

Hi,

Restart oracle application

rgs,
CIBER Unix
Occasional Advisor

Re: Used space is not getting reduced even after removing lot of files and directories in HP-UX 11.00

The reason for this is probably that a file was still open by a program/application and being used; the rm would remove the directory entry for the file (ie. its name) but would not free up the space until the program(s) using it have exited.
The above suggestion of stopping and restarting the application would achieve this.
Berd
Trusted Contributor

Re: Used space is not getting reduced even after removing lot of files and directories in HP-UX 11.00

Senthil,

The files are still in use by application and so space is not released.

A fuser -fu may show who is holding the file open. Failing tah you could use lsof.

HTH

Berd
senthil_kumar_1
Super Advisor

Re: Used space is not getting reduced even after removing lot of files and directories in HP-UX 11.00

Hi Bred,

When I executed below mentioned command, I got following outputs:

#fuser -fu oracle9
oracle9:

#fuser -fu oracle
oracle:

#fuser -fu mleadm
mleadm:

So the above command is not showing the info of which application / process is using this file.


How to use lsof, what is the syntax?
madhuchakkaravarthy
Trusted Contributor

Re: Used space is not getting reduced even after removing lot of files and directories in HP-UX 11.00

hi what is the output of fuser -cu /var

regards
Mc
senthil_kumar_1
Super Advisor

Re: Used space is not getting reduced even after removing lot of files and directories in HP-UX 11.00

Hi

#fuser -cu /var
/var: 744mco(root) 574o(root) 480o(root) 629o(root) 740mco(lp) 672c(root) 1229m(root) 729 mo(root) 814o(root) 1186o(root) 860o(root) 931o(root) 958mo(root) 1782o(root) 1781o(root) 117 9mo(root) 1778o(root) 5446m(oracle) 20475mo(root) 1232o(root) 1283o(root) 2854m(oracle) 5436m(oracle) 1255o(root) 1362o(root) 2852m(oracle) 2850m(oracle) 2846m(oracle) 5438m(oracle) 2848m(oracle) 14 17o(root) 2844m(oracle) 13808o(root) 1286m(root) 1466o(root) 5444m(oracle) 17559mo(root) 5440m(oracle) 20464o(root) 16044m(root) 7381cm(root) 5442m(oracle) 20462o(root)
James R. Ferguson
Acclaimed Contributor

Re: Used space is not getting reduced even after removing lot of files and directories in HP-UX 11.00

Hi Senthil:

The output of your 'fuser' will show the processes IDs associated with in-use files. These may or may *not* represent processes holding deleted file disk blocks.

Use 'lsof' against the filesystem. Look for files with an "NLINK" count of zero (0). The "SIZE/OFF" field will be the size in characters consumed. Files with a link count of zero are those that have been unlinked (removed):

# lsof +L1 +D /var/spool

If you don't have 'lsof' installed (and you should) fetch it for installation from:

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

Installation does not require a reboot. The installation tree will be '/usr/local/bin' so you might want to execute the binary with an absolute path.

Regards!

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: Used space is not getting reduced even after removing lot of files and directories in HP-UX 11.00

Hi (again) Senthil:

And it just registered with me that you said you were running 11.0 --- an unsupported, obsolete release.

If you want to try using 'lsof' you are probably going to have to fetch the source from the link I provided and try compiling it yourself.

I suspect that it will be less trouble for you to increase your '/var' filesystem.

You might also run 'cleanup -c 1' to remove the rollback images of patches. This generally returns significant space to '/var'.

Regards!

...JRF...