Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Oct 2017 07:13:40 +0100
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Rcorder/rc.conf question on FILESYSTEMS and tmp
Message-ID:  <ccf25cb9-f6ff-c6fb-1b32-0ca9f6aac84a@FreeBSD.org>
In-Reply-To: <20171018170549.GA3502@anza.vindaloo.com>
References:  <20171018170549.GA3502@anza.vindaloo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--RSdMg031ar2GmcgtTe1WRQ8xXWXIV3n8V
Content-Type: multipart/mixed; boundary="CAUAfVBPS1GejFWnplUPhJJlLipuMHJSG";
 protected-headers="v1"
From: Matthew Seaman <matthew@FreeBSD.org>
To: freebsd-questions@freebsd.org
Message-ID: <ccf25cb9-f6ff-c6fb-1b32-0ca9f6aac84a@FreeBSD.org>
Subject: Re: Rcorder/rc.conf question on FILESYSTEMS and tmp
References: <20171018170549.GA3502@anza.vindaloo.com>
In-Reply-To: <20171018170549.GA3502@anza.vindaloo.com>

--CAUAfVBPS1GejFWnplUPhJJlLipuMHJSG
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: quoted-printable

On 18/10/2017 18:05, Christopher Sean Hilton wrote:
> In my other question I asked if I should use a swap backed, /dev/md
> based tmpfs for /tmp. The actual problem that brings up the issue is
> this: When I reconfigured my system from zfs based /tmp to swap back
> /dev/md based tmpfs, I screwed up the permissions on the "/tmp"
> directory. This caused slapd to fail at startup time because it
> couldn't create some file or something in /tmp. I've fixed the problem
> and moved on but this leaves a question:
>=20
>      1) Shouldn't /etc/rc.d/FILESYSTEMS require "tmp" before it starts
>         up?
>=20
> My usage requires slapd so I can patch this for now by adding "tmp" to
> slapd's requirements but I'm very interested in the answer to the
> reasons behind this question if the answer is "no". If the answer is
> yes, then I just owe you a well written bug report.
>=20

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.

	Cheers,

	Matthew



--CAUAfVBPS1GejFWnplUPhJJlLipuMHJSG--

--RSdMg031ar2GmcgtTe1WRQ8xXWXIV3n8V
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJ8BAEBCgBmBQJZ6EKUXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC
QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATAr8QAJf8piNRdr3NoiXFefrgiVRO
6vZUhW4vIHzGOquAiwDhVZWqEC+frHyngcXXOzof2wwECSHz+Kj5byY/aQmdar6g
wkcXvfTL0eQ7B+NQ7X3odoZQToYrDqjQ4vxLCLMY642mJFKSRCzNiDEXKmlXlxMf
C4KjJy0qu34DKOXhR+WcLbp87uJQBB1swvnfo2Ph0MsX7IlT8aQov1Os1f2j1ik1
cp0ZsCqAxKANrsGXW2+rrTuIYZ0dwINEUG+QRLsmPruB0E748eQcd4yH7lb4xcIb
iCs/nc7qHsrhcexdldwrE/sQeSG6/QBTVNA7ULaiVti/Z0PDtTsUss1Dof3V1RqR
rSyMG8yES3lq6WkDu5LxwOlQ2FTXQ0GbqQcxBaIu/64BqSOv05a3OO5SFY6nC7Hb
CAnFcPfAa4B1d3UqaPHaaVrYD4M5BHC5D9h8dzDnEPGuXEsw8TszOpDpnbXRbZC3
xQVQxqDFRJE8C1UpuNHMJb2iXLz6xaS1Ko2qjJ8wd9//IBzMBO2Bburw2Xfj3M38
rFqiJhi451SMHcZWtjkb82TRoHWGUE6cWVi8FFoRa/4Dl+zE0hNIdtjbRa7QB9aw
wy3pM/3/KkikxpSD1YLBGam1obo9b+mgBSHAIoJjqJUXmWafA0kTwtNfKD+8wCim
YKnvSK5lPiomqRlWZCxR
=MvfE
-----END PGP SIGNATURE-----

--RSdMg031ar2GmcgtTe1WRQ8xXWXIV3n8V--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ccf25cb9-f6ff-c6fb-1b32-0ca9f6aac84a>