1819901 Members
2461 Online
109607 Solutions
New Discussion юеВ

Cleanup /var

 
Quark
Valued Contributor

Cleanup /var

Hi,

on my HP-UX 11.11 the /var is at 93%

I did some investigation and the reason is that there is a lof of stuff in /var/adm/sw/save.

After patch installation is usually run 'cleanup -c1' to save some space.

Is there a way to cleanup the 'save' directory? (other than using 'rm' an messing up the system)

With kind regards,

Kris
7 REPLIES 7
Fred Ruffet
Honored Contributor

Re: Cleanup /var

From the cleanup manpage :
The cleanup -c command can be executed to commit all patches that have been superseded specified number of times. The only benefit from committing patches is that disk space will be recovered in the /var/adm/sw/save directory.

If you issued a cleanup -c1, files in save directory are matching patches that haven't been superseeded. So, no, there is no way to get more space back, except from an rm command. But this is not safe (even if I must admit that rolling back a patch is not a frequent task).

other way will be to increase /var filesystem.

Regards,

Fred

--

"Reality is just a point of view." (P. K. D.)
Steven E. Protter
Exalted Contributor

Re: Cleanup /var

Shalom Kris,

cleanup will get you a lot of space back at the cost of not being able to roll back patches to the previous version.

cd /var
du -k | sort -rn | more

Identify where the space is being used, you might find other fat targets for cleanup.

Another quick space getter is to use sam routine tasks trim log files.

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
Sandeep_Chaudhary
Trusted Contributor

Re: Cleanup /var

Provide output of
cd /var
# du -sk *|sort -n
check for crash dump in /var/adm/crash
gzip OLDsyslog.log
truncate mail.log

truncate files inside /var/mail
SKR_1
Trusted Contributor

Re: Cleanup /var

1. You can remove older crash directories inside /var/adm/crash

2. You can trim syslog.log & mail.log after taking the backup if needed.

3. You can gzip sar files inside /var/adm/sa directory.

Atlast nothing is possible for cleanup then you can add some space to /var.

Thanks

SKR
Dennis Handly
Acclaimed Contributor

Re: Cleanup /var

>Is there a way to cleanup the 'save' directory?

cleanup does that. Or you could move the files elsewhere and add a symlink.
(Unfortunately on one of my systems someone did that and didn't protect the directory and then later removed that tree. )-:

I suppose you could compress directories and then undo it when you want to remove patches.
James R. Ferguson
Acclaimed Contributor

Re: Cleanup /var

Hi Kris:

In lieu of running 'cleanup' (which is a friendly front-end to 'swmodify') you can commit *all* patches and regain the space used for their rollback images with:

# swmodify -x patch_commit=true \*

This should give you the most returnable space.

Regards!

...JRF...
Bob E Campbell
Honored Contributor

Re: Cleanup /var

Cleanup and swmodify are the tools, *do not use rm!!!!*

That said, make a new IUX recovery image before you commit patches. Always leave your options open when working with patches.