Operating System - HP-UX
1748156 Members
4107 Online
108758 Solutions
New Discussion юеВ

Re: var cleanup hp ux 11.23 itanium

 
SOLVED
Go to solution
Donald Thaler
Super Advisor

var cleanup hp ux 11.23 itanium

i'm looking at cleaning up the /var directory, it's 80% full.. in the /var/adm/sw/save/ directory are what look like Patch directories like \PHSS_38140.. can these directories be removed ?


14 REPLIES 14
Michael Steele_2
Honored Contributor
Solution

Re: var cleanup hp ux 11.23 itanium

Hi

If you are fairly new to HP-UX then refer to the 'Routine Tasks' section under SAM and let SAM guide you in this task.
Support Fatherhood - Stop Family Law
James R. Ferguson
Acclaimed Contributor

Re: var cleanup hp ux 11.23 itanium

Hi Donald:

Do _not_ manually diddle (remove, modify, etc.) in the '/var/adm/sw' directory. If you corrupt the contents of this directory you can render your server un-patchable.

To potentially regain space, use the 'cleanup' command:

# cleanup -c 1

Regards!

...JRF...
Fabian Brise├▒o
Esteemed Contributor

Re: var cleanup hp ux 11.23 itanium

Hello Donald.
Do not delete manually any file in /var/adm/sw you can corrupt your software.

check under /var/tmp to see if you can delete something there.

also check /var/tombstones

Another option should be to search for core file in var.

Knowledge is power.
Vishu
Trusted Contributor

Re: var cleanup hp ux 11.23 itanium

Hi Donald,

Dont delete anything in /var/adm/sw/save directory. It is used for rollback.

Better look for some old pacct files in /var/adm or you can truncate some of your logs like /var/adm/cron/log, or anything in /var/tmp.
Donald Thaler
Super Advisor

Re: var cleanup hp ux 11.23 itanium

I was trying to free up space on /var because when i ran swa(software ass't), it indicated i didn't have enough free space. Is there some way of running swa and telling it to use some other mount point ?
James R. Ferguson
Acclaimed Contributor

Re: var cleanup hp ux 11.23 itanium

Hi (again) Donald:

In '/root/.swa.conf' (or on the command line) you can set the '-x user_dir' and the '-x swcache' to a directory that offers you the space you need.

See:

http://docs.hp.com/en/5992-5125/5992-5125.pdf

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: var cleanup hp ux 11.23 itanium

> I was trying to free up space on /var because when i ran swa(software ass't), it indicated i didn't have enough free space. Is there some way of running swa and telling it to use some other mount point ?

The best thing to do is to create another lvol that will hold the /var/adm/sw directory. Once the lvol is created, mount it to a temporary mountpoint, copy all the files and directories to the new location. As a precaution, backup the /var/ad/sw directory to tape or another location. Then unmount the new lvol, remove all the files and directories in /var/adm/sw and mount the new lvol to /var/adm/sw. The last step is to add the new mountpoint to /etc/fstab.

You should also analyze /var using du to see what other large directories are present. Use this command:

du -sk | sort -rn | head -20


Bill Hassell, sysadmin
Michael Steele_2
Honored Contributor

Re: var cleanup hp ux 11.23 itanium

Hi

# swa clean {usercache | swcache | all}
When the swa command runs, it produces cache files for its use. Run swa clean to free up disk
space after your swa session is complete.

See attached.
Support Fatherhood - Stop Family Law
Michael Steele_2
Honored Contributor

Re: var cleanup hp ux 11.23 itanium

Hi

In answer to your question, use the -x user_dir option.

x user_dir=~/.swa
Usage: Basic
Applicable caches: usercache all
This is the directory where SWA stores catalog, inventory, analysis, ignore, and report files.
The default location is a subdirectory (.swa) of the user's home directory. This can be changed,
for example, to allow archival of previous interim artifacts in a date-specific directory or
off-host. Several other options default to a directory relative to this directory, so changing
this option allows all of those locations to stay in synch relative to a common root.
Support Fatherhood - Stop Family Law