Re: Using TMPFS for /tmp and /var/run?

From: Eric van Gyzen <eric_at_vangyzen.net>
Date: Thu, 29 Mar 2012 15:52:16 -0500
On 03/29/2012 14:58, David Wolfskill wrote:
> On Thu, Mar 29, 2012 at 02:50:00PM -0500, Eric van Gyzen wrote:
>> ...
>> However, if you always want to use tmpfs instead of stable storage,
>> please do not.  Some people expect /tmp to be persistent.  This is why
>> /etc/defaults/rc.conf has clear_tmp_enable="NO".  Changing this would
>> break the POLA.
>> ...
>
> Errr... I'm not sure why folks might have that misguided expectation;

Because that's how the default installation has behaved for a long time. 
  I'm not saying this expectation is /wise/; I'm just saying some people 
have formed that expectation by observing the behavior of the default 
system, and they would be astonished by this change.

> from hier(7):
>
>       /tmp/      temporary files that are not guaranteed to persist across sys-
>                  tem reboots
>
> Foplks are welcome to do whatever they wish with their own machines,
> but the FreeBSD default is as above.

Respectfully, no.  The default is to store /tmp in UFS, either in its 
own partition (with Auto Defaults) or in / (if no partition was created 
for it), and to refrain from clearing it at boot.  Thus, although /tmp 
is not guaranteed to persist in theory, it is rather persistent in practice.

My only point is:  carefully consider the change in behavior of the 
default installation before breaking the POLA.

Eric
Received on Thu Mar 29 2012 - 18:53:25 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:25 UTC