Rcorder/rc.conf question on FILESYSTEMS and tmp
Christopher Sean Hilton
chris at vindaloo.com
Thu Oct 19 17:10:58 UTC 2017
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
> 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 at 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.
__o "All I was trying to do was get home from work."
_`\<,_ -Rosa Parks
Christopher Sean Hilton [chris/at/vindaloo/dot/com]
More information about the freebsd-questions