Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Oct 2017 13:10:44 -0400
From:      Christopher Sean Hilton <chris@vindaloo.com>
To:        Matthew Seaman <matthew@FreeBSD.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Rcorder/rc.conf question on FILESYSTEMS and tmp
Message-ID:  <20171019171044.7ccqyxfr72v52fsp@csh-desktop-vm00.loopone.com>
In-Reply-To: <ccf25cb9-f6ff-c6fb-1b32-0ca9f6aac84a@FreeBSD.org>
References:  <20171018170549.GA3502@anza.vindaloo.com> <ccf25cb9-f6ff-c6fb-1b32-0ca9f6aac84a@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Oct 19, 2017 at 07:13:40AM +0100, Matthew Seaman wrote:
> On 18/10/2017 18:05, Christopher Sean Hilton wrote:

[ ...snip... ]

> FILESYSTEMS requires mountcritlocal.  mountcritlocal mounts all local
> filesystems from /etc/fstab which generally includes mounting /tmp
> 
> Hmmm.... there is a /etc/rc.d/tmp which is different from just using
> tmpfs in /etc/fstab -- and it's the latter which I'd recommend you to
> implement.
> 
> Looks like /etc/rc.d/tmp mounts a tmpmfs, which is a slightly different
> concept and the startup script only does anything if a /tmp does not
> already exist.  In practice that would generally be limited to diskless
> setups and other speciality systems.
> 
> Any other method for mounting /tmp than using /etc/rc.d/tmp will be
> based on /etc/fstab and come under mountcritlocal.  That will mean that
> /tmp is mounted and available well before any daemons get started up.
> That covers the vast majority of systems.  tmp not being mentioned in
> FILESYSTEMS is arguably a bug, but that's something people on
> freebsd-fs@freebsd.org would be much better placed to answer.
> 

To summarize, there are two ways to get /tmp mounted on a memory
backed filesystem. One is specify the options in /etc/fstab, and the
other is to specify something like this:

     tmpmfs="YES"            # Set to YES to always create an mfs /tmp, NO to never
     tmpsize="1g"            # Size of mfs /tmp if created
     tmpmfs_flags="-S -o async,noexec"       # Extra mdmfs options for the mfs /tmp

In /etc/rc.conf. You recommend specifying the options in
/etc/fstab. That will make mountcritlocal force the /tmp filesystem to
be mounted and ready before it exits and then things only need depend
on FILESYSTEMS being done.

Ok, problem solved.

-- Chris

> 	Cheers,
> 
> 	Matthew
> 
> 




-- 
Chris

      __o          "All I was trying to do was get home from work."
    _`\<,_           -Rosa Parks
___(*)/_(*)____.___o____..___..o...________ooO..._____________________
Christopher Sean Hilton                    [chris/at/vindaloo/dot/com]



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