Operating System - HP-UX
1825781 Members
2112 Online
109687 Solutions
New Discussion

FileSystem /var It is 97% used

 
SOLVED
Go to solution
Eli Daniel
Super Advisor

FileSystem /var It is 97% used

Hi,
how can clean the filesystem /var?

Acctuality the filesystem 97% used.

15 REPLIES 15
James R. Ferguson
Acclaimed Contributor

Re: FileSystem /var It is 97% used

Hi:

There are any number of threads in this forum dealing with nearly full filesystems.

For '/var' you could begin by running:

# cleanup -c 1

...which will remove the rollback images of patches that have been committed at least once. If this hasn't been done recently, you will likely find a great deal of space will be returned.

Regards!

...JRF...
Pete Randall
Outstanding Contributor

Re: FileSystem /var It is 97% used

After you run cleanup, begin examining /var more closely by running "du -sk /var/* |sort -n". That will show you the largest sub-directories in ascending order so you can focus your attention on the worst offendors.

You will want to stay away from the software distributor database directories: /var/adm, /var/patches, /var/spool/sw. Manually removing entries from those can ruin your system.

You can use the du command to examine sub-directories further down the line, too. Just change the directory name from /var/* to /var/whatever/* and run it again.


Pete

Pete
SoorajCleris
Honored Contributor

Re: FileSystem /var It is 97% used

Hi,

do you have separate mount point for /var/adm/crash?

could you please check if there is any dump already?

could you please paste the output of bdf?

Regards
Sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
Taifur
Respected Contributor

Re: FileSystem /var It is 97% used

Hi,

Check any core file in /var , if found core file , remove core file .u can also check that issue by rebooting server .
Also check by deleting unnecessary file.

Cheers//
Taifur
Raj D.
Honored Contributor
Solution

Re: FileSystem /var It is 97% used

Daniel,

See the largest files on var:

First check these known files which grows significantly over the course of time :

/var/adm/syslog/syslog.log
/var/adm/syslog/mail.log
/var/opt/resmon/log/*


- Also to check top 30 largest files on /var filesystem:
# cd /var
# find . -type f -xdev -exec ls -l {} \; > /tmp/var_files.txt
# cat var_files.txt | sort +4 -5nr | head -n 30


- Also if you are seeing sudden growth of 95 % from a less used /var filesystem, you may suspect something wrong happened suddenly. suppose your /var FS was 50% and suddenly it is 95% , you may try looking for the files created or modified recently in 1 day or 12 hours.


- If there is nothing to trim/cleanup , you can go ahead and extend the filesystem, depending on the free space on vg00.
# Free Space can be check with:
# vgdisplay vg00 | grep "Free PE"

- also check if you have online JFS:
# swlist -l product | grep OnlineJFS



Hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Eli Daniel
Super Advisor

Re: FileSystem /var It is 97% used

Yes, in the directory /var/opt/OV/tmp exist core

I can delet "core"

/var/opt/OV/tmp> ll
total 18336
-r-xr-xr-x 1 bin bin 4366 Sep 24 2007 OVCtrl
drwxrwx--- 2 bin bin 96 Aug 1 00:01 bbc
-rw------- 1 root bin 9352096 Sep 12 2009 core
-rw-rw-r-- 1 root bin 80 Jul 17 18:22 ovcd.pid
-rw-rw-r-- 1 root bin 4 Jul 17 18:22 ovcd.port
srwxrwxrwx 1 root bin 0 Jul 17 18:22 ovcd.sock
-rw-rw-r-- 1 root bin 4 Jul 17 18:22 ovcddaemon.pid
srwxrwxrwx 1 root bin 0 Jul 17 18:22 ovtrc.server.lock
-rw-rw-r-- 1 root bin 0 Jun 26 2007 xpl.sync.OvCtrlMutex
-rw-r--r-- 1 root bin 0 Jun 26 2007 xpl.sync.OvLog
Dennis Handly
Acclaimed Contributor

Re: FileSystem /var It is 97% used

>I can delete "core"?

Yes, it is almost a year old.
You could also move it elsewhere or you could try to get a stack trace with gdb.
Eli Daniel
Super Advisor

Re: FileSystem /var It is 97% used

James, with the command "cleanup -c 1"

there may be problems running the command?
James R. Ferguson
Acclaimed Contributor

Re: FileSystem /var It is 97% used

Hi (again) Eli:

> James, with the command "cleanup -c 1"
there may be problems running the command?

No, this is a standard Software Distributor (SD) tool. This is the only safe way to reclaim space from '/var/adm/sw'.

You can backup '/var/adm/sw' beforehand if you like. *Never* remove anything from the IPD (Installed Product Database) as held in '/var/adm/sw'. To do so may leave your system un-patchable. Use the standard SD tools, like 'cleanup' instead.

Regards!

...JRF...

Russell Cannon
New Member

Re: FileSystem /var It is 97% used

How about checking /var/.audit (slash var DOT audit). This can grow very large when auditing is enabled.

Russ
Eli Daniel
Super Advisor

Re: FileSystem /var It is 97% used

this which I can delete files without problems?

SAPL907:/tmp> cat var_files | sort +4 -5nr | head -n 30
-rw-r--r-- 1 root other 205516800 May 16 2007 ./adm/sw/save/PHCO_39498/VEA-FILESET/opt/VRTSob/jre_ia.tar
-rw-r--r-- 1 root sys 205516800 Jan 30 2010 ./adm/sw/save_custom/PHCO_39498/jre_old.tar
-rw-r--r-- 1 root sys 204912640 Apr 26 2008 ./adm/sw/save_custom/PHCO_36028/jre_old.tar
-rwx------ 1 root root 167665810 Jul 29 18:27 ./opt/hpsmc/avc/VM00726000-1-1/log/monitorsvcd.bak
-rw-r--r-- 1 root other 152025600 Aug 16 2004 ./adm/sw/save/PHCO_33081/VEA-FILESET/opt/VRTSob/jre_ia.tar
-rw-r--r-- 1 root other 122828800 May 16 2007 ./adm/sw/save/PHCO_39498/VEA-FILESET/opt/VRTSob/jre.tar
-rw-r--r-- 1 root other 106736128 Aug 16 2004 ./adm/sw/save/PHCO_33081/VEA-FILESET/opt/VRTSob/jre.tar
-rwx------ 1 root root 88381354 Aug 3 09:43 ./opt/hpsmc/avc/VM00726000-1-1/log/monitorsvcd.log
-r--r--r-- 1 bin bin 54990224 Mar 26 2004 ./adm/sw/save/PHSS_35055/LANG-64ALIB/usr/lib/hpux64/librwtool_v2.a
-r--r--r-- 1 bin bin 43529790 Mar 26 2004 ./adm/sw/save/PHSS_35055/LANG-MIN/usr/lib/hpux32/librwtool_v2.a
-rw-r--r-- 1 root root 28023504 Aug 3 09:40 ./opt/perf/datafiles/logglob
-rw-r--r-- 1 root root 24737670 Aug 3 09:43 ./opt/perf/datafiles/logproc
-rw-r--r-- 1 root sys 23902988 Jul 17 18:21 ./adm/SGsnmpsuba.log
-r--r--r-- 1 bin bin 22364160 Jun 13 2008 ./opt/wbem/repository.tar
-r--r--r-- 1 bin bin 20476142 Mar 26 2004 ./adm/sw/save/PHSS_35055/LANG-64ALIB/usr/lib/hpux64/libstd_v2.a
-r-xr-xr-x 1 root bin 18602543 May 3 2005 ./opt/mx/opensource/hibernate-2.1.7c.zip
-rw-r--r-- 1 root root 18450456 Aug 3 09:40 ./opt/perf/datafiles/logappl
-rw-r--r-- 1 root root 18311884 Aug 3 09:40 ./opt/perf/datafiles/logdev
-r-xr-xr-x 1 root bin 17973553 Aug 1 2005 ./opt/mx/opensource/jboss-3.2.7-src.zip
-r--r--r-- 1 bin bin 17219438 Mar 26 2004 ./adm/sw/save/PHSS_35055/LANG-MIN/usr/lib/hpux32/libstd_v2.a
-rw------- 1 hpsmdb users 16777216 Jul 17 18:22 ./opt/hpsmdb/pgsql/pg_xlog/0000000000000000
-rw------- 1 sfmdb users 16777216 Aug 2 18:22 ./opt/sfmdb/pgsql/pg_xlog/0000000000000027
-rw------- 1 sfmdb users 16777216 Aug 3 01:09 ./opt/sfmdb/pgsql/pg_xlog/0000000000000025
-rw------- 1 sfmdb users 16777216 Jul 20 01:05 ./opt/sfmdb/pgsql/pg_xlog/0000000000000026
-r-xr-xr-x 1 root bin 15176926 Jun 27 2006 ./opt/mx/opensource/samba-3.0.10.tar.gz
-r-xr-xr-x 1 bin bin 15095352 Dec 7 2007 ./adm/sw/save/PHSS_39093/C-KRN/usr/ccs/bin/ld
-r-xr-xr-x 1 bin bin 14101440 Jan 6 2009 ./adm/sw/save/PHSS_39821/C-KRN/usr/ccs/bin/ld
-r-xr-xr-x 1 bin bin 13695216 Feb 14 2007 ./adm/sw/save/PHSS_38258/DCE-IA64-SHLIB/usr/lib/hpux64/libdcekt.so.1
-r-xr-xr-x 1 bin bin 13695216 Nov 24 2006 ./adm/sw/save/PHSS_36005/DCE-IA64-SHLIB/usr/lib/hpux64/libdcekt.so.1
-r-xr-xr-x 1 bin bin 13519840 Feb 14 2007 ./adm/sw/save/PHSS_38258/DCE-IA64-SHLIB/usr/lib/hpux32/libdcekt.so.1
Dennis Handly
Acclaimed Contributor

Re: FileSystem /var It is 97% used

>which I can delete files without problems?

Have you run cleanup(1m) yet? Most of these are patch save areas.

You might be able to remove all but the latest of:
/var/opt/hpsmdb/pgsql/pg_xlog/*
Eli Daniel
Super Advisor

Re: FileSystem /var It is 97% used

what is the best option?
1 - run cleanup-c 1
2 - delete these files
James R. Ferguson
Acclaimed Contributor

Re: FileSystem /var It is 97% used

Hi (again):

> what is the best option?
1 - run cleanup-c 1
2 - delete these files

Why don't you run 'cleanup' as I have suggested and *see* how much space is returned!

As for "delete these files", I presume you mean '/var/opt/hpsmdb/pgsql/pg_xlog/*' as Dennis mentioned.

Do what you like or do both! You have a very nearly full filesystem that isn't going to improve unless you *do something*.

...JRF...
Eli Daniel
Super Advisor

Re: FileSystem /var It is 97% used

Thanks