System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

FileSystem /var It is 97% used

 
SOLVED
Go to solution
Highlighted
Super Advisor

FileSystem /var It is 97% used

Hi,
how can clean the filesystem /var?

Acctuality the filesystem 97% used.

15 REPLIES 15
Highlighted
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...
Highlighted
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
Highlighted
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
Highlighted
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
Highlighted
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 . "
Highlighted
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
Highlighted
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.
Highlighted
Super Advisor

Re: FileSystem /var It is 97% used

James, with the command "cleanup -c 1"

there may be problems running the command?
Highlighted
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...