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

From: Chris Rees <utisoft_at_gmail.com>
Date: Sat, 28 Apr 2012 18:13:04 +0000
On 28 Apr 2012 19:04, "Luke Dean" <LukeD_at_pobox.com> wrote:
>
>
>
> On Fri, 30 Mar 2012, Chris Rees wrote:
>
>> On 30 Mar 2012 14:26, <sthaug_at_nethelp.no> 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.
>>>>>
>>>>>
>>>> This is a mistake.
>>>>
>>>> The default should be clear_tmp_enable="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 would very much like an example of where /tmp is expected to persist.
>>
>> Chris
>
>
> Yes, I'm a month behind on my mailing list reading and this conversation
is probably over, but I do have a personal example.
>
> In my periodic.conf, I have:
> daily_clean_tmps_enable="YES"
> daily_clean_tmps_days="30"
>
> I tend to have many distractions and work on many projects at the same
> time.  I don't always know when I'm finished.  Sometimes I just lose
> interest.  I often don't remember to clean up after myself.
>
> These settings in periodic.conf allow me to set up temporary workspaces
in /tmp.  If I keep working on a project, my files remain.  If I forget
about it for a month, periodic will clean up my mess.
>
> If someday the default behavior were changed to make /tmp a
memory-mounted filesystem or to clean it out on every reboot, I think I
could set daily_clean_tmps_dirs to another directory and move my sandbox
someplace else.  I would very much appreciate some warning, but this would
not be a problem for me.

You should use /var/tmp for that, or another custom directory if you want
your files safe.

Chris
Received on Sat Apr 28 2012 - 16:13:06 UTC

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