Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Mar 2012 19:42:18 +0000
From:      Chris Rees <crees@freebsd.org>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        freebsd-current@freebsd.org, "C. P. Ghost" <cpghost@cordula.ws>, sthaug@nethelp.no
Subject:   Re: Using TMPFS for /tmp and /var/run?
Message-ID:  <CADLo839w4sWyqVh0bG1bXHQ41T48EM-Yry8AnH8rqOdYydCC2A@mail.gmail.com>
In-Reply-To: <CAJ-VmonpQ7hBxd3k8RmxKmQ0s=EKmvcjmA1Yji6bp24Uc0Cvgg@mail.gmail.com>
References:  <4F746F1E.6090702@mail.zedat.fu-berlin.de> <4F74BCE8.2030802@vangyzen.net> <CACM2%2B-7Ahn6J=CTASe0g48%2BSD2vvLVd_hG3DRZmvO31QszG5Xw@mail.gmail.com> <20120330.151848.41706133.sthaug@nethelp.no> <CADGWnjXj5W_UCHPExNjxHgq3EZHP1GwocnK4kOHLch5y3gNG0A@mail.gmail.com> <CADLo83-c3jNd9XAyCMhqrEP3x9nvX1=Q9j7foEB37zRy3QZWDA@mail.gmail.com> <CAJ-VmonpQ7hBxd3k8RmxKmQ0s=EKmvcjmA1Yji6bp24Uc0Cvgg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 30 March 2012 19:36, Adrian Chadd <adrian@freebsd.org> wrote:

> On 30 March 2012 10:56, Chris Rees <crees@freebsd.org> wrote:
>> On 30 March 2012 17:31, C. P. Ghost <cpghost@cordula.ws> wrote:
>>> On Fri, Mar 30, 2012 at 3:18 PM, =A0<sthaug@nethelp.no> wrote:
>>>>> > However, if you always want to use tmpfs instead of stable storage,
>>>>> please do not. =A0Some people expect /tmp to be persistent. =A0This i=
s why
>>>>> /etc/defaults/rc.conf has clear_tmp_enable=3D"NO". =A0Changing this w=
ould break
>>>>> the POLA.
>>>>> >
>>>>> This is a mistake.
>>>>>
>>>>> The default should be clear_tmp_enable=3D"YES"
>>>>> if only to uncover those broken configurations that expect /tmp to be
>>>>> persistent.
>>>>
>>>> If you want to break POLA and make a lot of people angry, sure.
>>>> Otherwise no.
>>>
>>> I couldn't agree more. Not clearing /tmp on reboot has been
>>> the norm for way too long and it is too late to change now.
>>> It's not just POLA, it also involves deleting data of unaware
>>> users, and that should be avoided.
>>>
>>> Anyone willing to change policy w.r.t. /tmp can do so on their
>>> own machines. Nothing is preventing them from doing so.
>>> But by changing defaults, one should err on the side of
>>> caution and remain conservative, IMHO.
>>
>> >From man hier:
>>
>> /tmp/ =A0 =A0 =A0temporary files that are not guaranteed to persist acro=
ss
>> system reboots
>>
>> This assumption that people often make 'People will be astonished by
>> this'-- I would like to have someone speak up and actually say "Yes, I
>> use *temporary* directories for long-term storage" rather than the
>> assumption that they are around.
>>
>> Software that assumes this should be fixed, and it won't be until the
>> bug is exposed (I'll look at eaccelerator-- it probably should store
>> its cache in /var/db).
>>
>> Maintaining the status quo because of some hypothetical scenario isn't
>> really productive.
>>
> Let me tell you a story.
>
> Someone decided that ext4 could have a decent speed up if it
> implemented the posix standard for not flushing files on close().
> After all, if you needed it to be guaranteed to be written to disk,
> you would call a flush routine first, before you called close().
>
> So they did this.
>
> Then people testing out ext4 discovered that upon crash, their
> kde/gnome profiles were corrupted.
>
> Why? Because KDE/Gnome authors hadn't ever called flush before
> close(), and they weren't the only ones. They didn't read the
> standard, they only used the system and fixed bugs whenever their
> system behaved against their expectations. They didn't notice that the
> system was being different from the standard.
>
> Guess what ext4 did? :)
>
> Don't mis-estimate POLA.

Well, having thought about what this conversation was *really* about,
I may have unintentionally derailed it a little.

My original intention was to say to Oliver, please, don't be
discouraged from using tmpfs for /tmp, and make sure you send PRs to
the upstream of any programs that misbehave as such.

Let's not make judgement on people who treat /tmp as persistent quite yet ;=
)

Chris



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