/tmp filesystem full
RW
rwmaillists at googlemail.com
Wed Aug 22 22:21:17 UTC 2012
On Wed, 22 Aug 2012 14:14:17 -0700
Michael Sierchio wrote:
> This will happen automatically if you go to multiuser without a
> writeable /tmp. See /etc/rc.d/tmp
It doesn't, the default is an old-fashioned md device, not tmpfs.
> 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.
It defaults to 20MB. There's no such thing as an unlimited md-backed
device
> "Bad things" can occur as
> you approach the memory limit (like a kernel panic) otherwise.
Provided that you have swap you can have a /tmp that's much bigger
than memory with either md or tmpfs.
> I'd prefer something like this:
>
> _mdunit=`mdconfig -a -n -t malloc -o reserve -s ${tmpsize}`
It's a bad idea to use a malloc device as it uses wired kernel memory, the default allows the files to be written out
to swap rather than panic the kernel.
> 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.
More information about the freebsd-questions
mailing list