Operating System - HP-UX
1752796 Members
5696 Online
108789 Solutions
New Discussion юеВ

Re: HP11.11 - /var filling up

 
SOLVED
Go to solution
Mark Parsons
Valued Contributor

HP11.11 - /var filling up

Hi,

 

The /var area on my HP11.11 server is gettjng rather full. It's on an internal disk which is also nearly full up. Upon invesigation I noticed potential duplications of software packages in /var/adm/sw/products and /var/adm/sw/save. Are both needed?

 

Many thanks for your time.

 

Mark P.

2 REPLIES 2
Doug O'Leary
Honored Contributor

Re: HP11.11 - /var filling up

Hey;

 

*Directly* modifying the information in those directories is generally a bad idea.  While it won't mess with the actual bits of the installed products, it'll make it difficult, if not impossible, to use the swdepot utilities on them so upgrading/patching would become a much more entertaining prospect that it really should be.

 

There are numerous posts about how to find out what's sucking up space in /var.  Specific to your case, after ensuring an adequate backup, run:

 

# cleanup -c 1

 

If you're still short of disk space and the /var/adm/sw/save directory is one of the bigger uses of it, *and* you're positive you won't have to remove any patches, you can do the following:

 

cd /var/adm/sw/save

for p in PH*

do

echo swmodify -x patch_commit=true ${p}

done

 

If the output looks right, recall the inline script in your command history, then remove the echo word.

 

HTH;

 

Doug


------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Bill Hassell
Honored Contributor
Solution

Re: HP11.11 - /var filling up

Always analyze mountpoints by directory size. /var/adm/sw will be large and will continue to grow as you install more patches and products. But there is no need to keep this directory in the /var mountpoint. Instead, carve out another lvol with about 2x-3x the current usage, mount it in a temporary directory, then move everything in /var/adm/sw to the temp location. Once verifying the file and directory count, remove everything under /var/adm/sw, then umount the temp location, and remount it under /var/adm/sw.

 

The SD files are critical to your system and once corrupted by removing and of the files, can leave your system crippled with no possibility to add/remove any patch or product.

 

Look at the largest directories in /var like this:

 

du -kx /var | sort -rn | head -20

This will sort the directories by size. Examine the contents of the largest directories to see what needs to be trimmed. /var/adm is where most log files hang out. /var/mail is where email is stored. /var/spool/lp/request is where printer files are temporarily stored -- unless the printer(s) have problems. /var/tmp is for temp files and directories.

 

Managing disk space, particularly /var, is a mandatory job for sysadmins.



Bill Hassell, sysadmin