Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Apr 2012 18:13:04 +0000
From:      Chris Rees <utisoft@gmail.com>
To:        Luke Dean <LukeD@pobox.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Using TMPFS for /tmp and /var/run?
Message-ID:  <CADLo83-0Zu1cNARMbk3YMHU54O1xzMfNqGvcHdxL5xFKV6z-Zw@mail.gmail.com>
In-Reply-To: <alpine.BSF.2.00.1204281042030.37187@tower.lukas.is-a-geek.org>
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> <CADLo839bF5Q%2BiZ-ExQi8VhpuAmxu%2BXhvZT7hVW35FCFq_V1huA@mail.gmail.com> <alpine.BSF.2.00.1204281042030.37187@tower.lukas.is-a-geek.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 28 Apr 2012 19:04, "Luke Dean" <LukeD@pobox.com> wrote:
>
>
>
> On Fri, 30 Mar 2012, Chris Rees wrote:
>
>> On 30 Mar 2012 14:26, <sthaug@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo83-0Zu1cNARMbk3YMHU54O1xzMfNqGvcHdxL5xFKV6z-Zw>