Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need free space on my server

Status
Not open for further replies.

ninhovid

Technical User
Jul 1, 2003
29
MX
Hi...

my server is currently about to get filled up..
/var is 70% full
/user is 50% full

what can i delete? i've already deleted all *.gz files
we use it as our firewall (PF)... nothing else...
thanks a lot...
 
Not entirely sure about OpenBSD (never having used it), but there are several log files under /var which can be zeroed by cat /dev/null > filename if you need to free up space. It might be worth doing a:

find /var -size +1000 -print

to find out the name of the larger files and post them here for further advice. HTH.
 
ok, i'll do what you said Ken...
and i'll post the results as soon as i can

thanks.
 
OK. Just a thought, if your drives aren't too large you may need to adjust the -size +1000 argument to something more sensible, say +500 or even +200.

When you mention /user above, do you really mean /user or /usr (as far as I know this is the more common version)? Regards.

 
/usr = capacity 45%
size=992M

/var = capacity 45%
size=97M

we use this server ONLY as our firewall (PF).
the results from find /var -size +500 -print are:
/var/db/locate.database
/var/db/kvm_bsd.db
/var/log/lastlog
/var/log/maillog
/var/mail/root

the results from find /usr -size +1000 -print are too many, so i changed it to +2000:
/usr/bin/gdb
/usr/lib/gcc-lib/i386-unknown-openbsd3.1/2.95.3/cc1
/usr/lib/gcc-lib/i386-unknown-openbsd3.1/2.95.3/cc1obj
/usr/lib/gcc-lib/i386-unknown-openbsd3.1/2.95.3/cc1plus
/usr/lib/gcc-lib/i386-unknown-openbsd3.1/2.95.3/f771
/usr/lib/libc_r_p.a
/usr/lib/libcrypto_p.a
/usr/lib/libcrypto_pic.a
/usr/lib/libperl.a
/usr/lib/libperl_p.a
/usr/lib/libperl_pic.a
/usr/share/dict/web2
/usr/share/dict/words
/usr/share/misc/termcap.db
/usr/share/misc/terminfo.db
/usr/src/games/fortune/datfiles/fortunes2
/usr/src/gnu/usr.bin/cvs/doc/cvs.ps
/usr/src/gnu/usr.bin/perl/Changes
/usr/src/gnu/usr.bin/perl/Changes5.005
/usr/src/share/dict/web2

what can i delete?
thanks...
 
Hi. Basically, I wouldn't touch /usr at all - it looks fine to me and isn't likely to grow in any significant way in the forseeable future.

/var is another matter, but 45% isn't too much of a problem. That said, you should be able to issue the following to clear down some of the logs, retaining the emptied files. It would be an idea to do this on a fairly regular basis.

cat /dev/null > /var/log/lastlog

cat /dev/null > /var/log/maillog

If you're happy that you've read all of root's mail and acted on it, just opt to read the mail and delete each entry. If there are hundreds of root emails, just reset the file as above, ie

cat /dev/null > /var/mail/root

Also check for any other large mail files in /var/mail and zeroise them in this way.

Hope this helps.
 
thanks Ken.. it worked
i won't delete anything in /usr =)

i did the following:
cat /dev/null > /var/log/lastlog
cat /dev/null > /var/log/maillog
cat /dev/null > /var/mail/root

and now
/var capacity = 36%

i'll do this on a regular basis...
thanks again!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top