Using TMPFS for /tmp and /var/run?
Eric van Gyzen
eric at vangyzen.net
Thu Mar 29 20:53:25 UTC 2012
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
More information about the freebsd-current
mailing list