/tmp filesystem full

Michael Sierchio kudzu at tenebras.com
Wed Aug 22 21:14:19 UTC 2012


This will happen automatically if you go to multiuser without a
writeable /tmp.  See /etc/rc.d/tmp
I have a problem with the semantics of the rc scripts for this and
var, though - if you are going to use a memory-backed filesystem, you
should reserve all the space at the outset.  "Bad things" can occur as
you approach the memory limit (like a kernel panic) otherwise.

I'd prefer something like this:

        _mdunit=`mdconfig -a -n -t malloc -o reserve -s ${tmpsize}`
        newfs /dev/md${_mdunit} > /dev/null 2>&1
        mount -o ${tmpmfs_flags} /dev/md${_mdunit} /tmp

But that's just me. mount_md doesn't quite do this.

-M

On Wed, Aug 22, 2012 at 12:48 PM, Sergio de Almeida Lenzi
<lenzi.sergio at gmail.com> wrote:
> If you use zfs, that is easy...  zfs set quota=NNG  pool/tmp
>
> if not....
> try to mount tmp in memory...
> in /etc/rc.conf....
>
> tmpmfs="YES"
> tmpsize="400m"
>
> reboot
> this would create a /tmp in memory (swap)
> size=400 Megabytes....
>
> Sergio
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"


More information about the freebsd-questions mailing list