1833764 Members
2664 Online
110063 Solutions
New Discussion

/var/adm/sw maintenance

 
SOLVED
Go to solution
Patrick Bridwell
Occasional Advisor

/var/adm/sw maintenance

My /var/adm/sw filesystem is starting to get full. I'm hesitant to delete files from here without knowing what impact it will have later on. What are typical areas of pruning in this filesystem? Are there certain logs or patch files which can be safely deleted/trimmed or should I just increase the size and live with the growth?

5 REPLIES 5
Andreas Voss
Honored Contributor
Solution

Re: /var/adm/sw maintenance

Hi,

if you are running HP-UX 10.20 you can use the utility

cleanup

to remove obsolete patch files from /var/adm/sw

Regards
Sandor Horvath_2
Valued Contributor

Re: /var/adm/sw maintenance

Hi !

The bigest directory in /var/adm/sw may be the save. There save the PATCH the files which rewrite while patching. It need for You when use swremove.
I suppose backup this directory and remove some older directories. ( Before swremove You can restore from backup )

regadrs, Saa
If no problem, don't fixed it.
Jeff Gunnink
Advisor

Re: /var/adm/sw maintenance

Other commands:

swmodify -x patch_commit=true PHCO_13363.\*
to commit a patch and remove the backout files.

cleanup -c 1
where 1 is the number of times a patch has been supereded by another patch. This removes patches that have been superseded 1 or more times.

show_patches -s
Shows which patches have been superseded.

Bill Hassell
Honored Contributor

Re: /var/adm/sw maintenance

The age of the directories is not a good indication of what you can remove. In fact, once /var/adm/sw is damaged, you'll never be able to load any software or patches again. It is a critical directory but only for software install/remove/configure.

First, backup the /var/adm/sw directory.

Find out how big the sw directory is with:

du -ks /var/adm/sw

which will report Kbytes. Now find some extra space and create a separate lvol about twicw as big as the above report. Mount it under a temp directory, then copy everything as in:

mkdir /dev/vg01/lvol17 /tempdir
cd /var/adm/sw
find . | cpio -pudlmv /tempdir

Now verify the copy with:

find /tmpdir -type d | wc -l
find /var/adm/sw -type d | wc -l

find /tmpdir -type f | wc -l
find /var/adm/sw -type f | wc -l

The counts should be the same. Don't worry about du as it will always be different due to sparse files and expanded directories.

Now umount /tempdir, then remove all the directories and file under /var/adm/sw. Now add an entry to fstab as in:

/dev/vg01/lvol17 /var/adm/sw ...

And test the mount point with:

mount /var/adm/sw

Now, /var will no longer be affected by software installation.


Bill Hassell, sysadmin
FJ Administrator
New Member

Re: /var/adm/sw maintenance

Bill,


I was curious, is the following a command line, posted above, a mistake:
"mkdir /dev/vg01/lvol17 /tempdir"

did you mean:
mount /dev/vg01/lvol17 /tempdir