Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Aug 2012 14:14:17 -0700
From:      Michael Sierchio <kudzu@tenebras.com>
To:        Sergio de Almeida Lenzi <lenzi.sergio@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: /tmp filesystem full
Message-ID:  <CAHu1Y72xwNevgKQ8eVYYOzGC80-511DtDe8kJMWbYJm5Tq28CA@mail.gmail.com>
In-Reply-To: <1345664911.2501.8.camel@z6000.lenzicasa>
References:  <201208221934.q7MJYfwM063804@mail.r-bonomi.com> <1345664911.2501.8.camel@z6000.lenzicasa>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHu1Y72xwNevgKQ8eVYYOzGC80-511DtDe8kJMWbYJm5Tq28CA>