1753876 Members
7569 Online
108809 Solutions
New Discussion юеВ

/var filesystem full

 
SOLVED
Go to solution
Swetha Lakshmi
Occasional Advisor

/var filesystem full

Hi,

May i know the resolution steps if /var filesystem is full ??


Thanks & Regards
Swetha
13 REPLIES 13
Anshumali
Esteemed Contributor

Re: /var filesystem full

/var/adm/syslog move it to some other location or null it, same for other log files there.
>syslog.log
/var/mail/ clear the mailboxes of the persons if they are not using it.
you can do a du -xk /var|sort -k1nr and check for the space consuming files.
Dreams are not which you see while sleeping, Dreams are which doesnt allow you to sleep while you are chasing for them!!
George_Dodds
Honored Contributor

Re: /var filesystem full

you can also null var/adm/wtmp & var/adm/btmp.

If you do copy your /var/adm/syslog/syslog.log file to another directory before you null the original you can always compress it to save disk space.
Sridhar R
Regular Advisor

Re: /var filesystem full

Swetha,

Also look at the /var/adm/crash directory which may contains big sized crash dump files.

Purge your /var/adm/wtmps files regurlarly, at least once in a month.

You can achieve this via a cron schedule.



Deepak Kr
Respected Contributor
Solution

Re: /var filesystem full

Hi,

First run following:

cd /var
bdf . ====status

sorted list of all dir and files in var
du -sk *|sort -krn

Find out large size files:

find . -xdev -type f -size +100000 -exec ls -lrt {} \+

analyse if you see biggest file related to any logs or any unused data that you can compress or move to some other location.

You can try nullifying

/var/mail/users_files
"There is always some scope for improvement"
James R. Ferguson
Acclaimed Contributor

Re: /var filesystem full

Hi Swetha:

# du -kx /var|sort -k1rn|more

...will produce a descendingly sorted list of the largest directories and files. Do *NOT* manually manage the 'var/adm/sw' directory or its contents! This is your IPD (Installed Product Database). Corruption or deletion of entries herein will render you server unpatchable.

Instead, use:

# cleanup -c 1

...to regain space. See the 'cleanup' man-pages for more information.

Aside from trimming log files like 'wtmp' ('> /var/adm/wtmp'), you can remove old '/var/adm/crash' dumps (if any) and look for old, unused 'vi' recovery files in '/var/preserve'.

Regards!

...JRF...
Sajjad Sahir
Honored Contributor

Re: /var filesystem full



Dear Swehta

u have to trim log files regularly

for that u can use >logfile

for example

/var/adm/sulog/sulog.log
>/var/adm/sulog/sulog.log

this is the way to trim the log files
/var dir contains log files u have to monitore that one
don't delete any log files just trim thats all
second thing u have to check any dir under var is consuming more space
u can use du -sk /var/* etc...

third u can check any core file is there or not
if core file is there u can easily remove it

thanks and regard

Sajjad Sahir
Aneesh Mohan
Honored Contributor

Re: /var filesystem full

Hi Swetha ,

The above replies explains clearly about how to house keep the /var filesystem,still it is not under threshold then you may need to plan for extending the filesystem.


Thanks,
Aneesh
arun khatwani
Frequent Advisor

Re: /var filesystem full

Dear Swehta

u have to trim log files regularly

for that u can use >logfile

for example

/var/adm/sulog/sulog.log
>/var/adm/sulog/sulog.log

this is the way to trim the log files
/var dir contains log files u have to monitore that one
don't delete any log files just trim thats all
second thing u have to check any dir under var is consuming more space
u can use du -sk /var/* etc...

third u can check any core file is there or not
if core file is there u can easily remove it

thanks and regard
arun k
G.Sivakumar
Occasional Advisor

Re: /var filesystem full

Hi

cd /var ; du -sk * |sort -n to short list files and dirs by size.

use the below find command to find the largest files you can purge it.
find . -xdev -type f -size +100000 -exec ls -lrt {} \+

You can also remove files from /var/spool/mqueue.
If your compressing the syslog's then after check the daemon the syslog is getting updated or not, if not then you have to restart the syslogd daemon.