mfs is getting full (/etc/rc.diskless2)
Bill Vermillion
bv at wjv.com
Thu Nov 27 18:32:50 PST 2003
Earlier in the linear time track, on approximately Thu, Nov 27, 2003 at 18:26 ,
Vincent Goupil divulged this public information:
> I've setup a firewall with a compact flash instead of a hard-drive. This is
> the output of mount:
> /dev/ad0s2a on / (ufs, local, read-only)
> mfs:17 on /var (mfs, asynchronous, local)
> procfs on /proc (procfs, local)
> mfs:36 on /dev (mfs, asynchronous, local)
> As you see, I mount the compact flash as read-only and I setup a memory
> filesystem for /var
> In my rc.conf file:
> diskless_mount="/etc/rc.diskless2"
> varsize="131072"
> Output of: df
> Filesystem 1K-blocks Used Avail Capacity Mounted on
> /dev/ad0s2a 229942 197570 13978 93% /
> mfs:17 63471 56584 1810 97% /var
> procfs 4 4 0 100% /proc
> mfs:36 1503 66 1317 5% /dev
>
> Output of: df -h
> Filesystem Size Used Avail Capacity Mounted on
> /dev/ad0s2a 225M 193M 14M 93% /
> mfs:17 62M 55M 1.8M 97% /var
> procfs 4.0K 4.0K 0B 100% /proc
> mfs:36 1.5M 66K 1.3M 5% /dev
>
> Output of: du -h -d 1 /var
> 364K /var/db
> 1.0K /var/account
> 3.0K /var/at
> 1.0K /var/backups
> 1.0K /var/crash
> 2.0K /var/cron
> 1.0K /var/empty
> 5.0K /var/games
> 1.0K /var/heimdal
> 3.2M /var/log
> 31K /var/mail
> 2.0K /var/msgs
> 1.0K /var/preserve
> 47K /var/run
> 1.0K /var/rwho
> 16K /var/spool
> 3.0K /var/tmp
> 1.0K /var/yp
> 1.6M /var/mrtg
> 2.0K /var/ucd-snmp
> 5.3M /var
>
> Output of: du -d 1 /var
> 364 /var/db
> 1 /var/account
> 3 /var/at
> 1 /var/backups
> 1 /var/crash
> 2 /var/cron
> 1 /var/empty
> 5 /var/games
> 1 /var/heimdal
> 3299 /var/log
> 31 /var/mail
> 2 /var/msgs
> 1 /var/preserve
> 47 /var/run
> 1 /var/rwho
> 16 /var/spool
> 3 /var/tmp
> 1 /var/yp
> 1670 /var/mrtg
> 2 /var/ucd-snmp
> 5456 /var
> It seems to have a big difference between
> the output of df and du (I know, I read
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#
> DU-VS-DF ), but it's now explaining everything. I could be the
> way I setup it.
> My problem is, my /var partition is getting filled very quickly
> and I don't know why ? I don't know what to clean. I've already
> deleted some log, but I saved only 2% of free space or 1000
> block.
> I don't know what is taking all this space ? Any ideas ?
It sounds like you deleted some log file that the system keeps
open. So it will keep using up disk space even though the name is
gone. A file is not deleted until the last link is gone and if the
file is opened for loging by a program that never releases the file
that is your problem.
At that point the easiest way is to reboot. Then find out what
you are logging and stop the things you don't need. When a log
gets full DO NOT remove it. Null it out.
Just doing > <logfilename> should empty the log and reset
the pointer back to the first of the file and release all blocks in
use.
Bill
--
Bill Vermillion - bv @ wjv . com
More information about the freebsd-fs
mailing list