From owner-freebsd-questions@freebsd.org Thu Oct 19 06:13:43 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3CDBE2D224 for ; Thu, 19 Oct 2017 06:13:43 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.117.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 412E580775 for ; Thu, 19 Oct 2017 06:13:42 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from liminal.local (unknown [IPv6:2001:8b0:151:1:e1a9:cc14:47bb:9ffb]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id E080AD5AB for ; Thu, 19 Oct 2017 06:13:40 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none (p=none dis=none) header.from=FreeBSD.org Subject: Re: Rcorder/rc.conf question on FILESYSTEMS and tmp To: freebsd-questions@freebsd.org References: <20171018170549.GA3502@anza.vindaloo.com> From: Matthew Seaman Message-ID: Date: Thu, 19 Oct 2017 07:13:40 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171018170549.GA3502@anza.vindaloo.com> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="RSdMg031ar2GmcgtTe1WRQ8xXWXIV3n8V" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2017 06:13:43 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --RSdMg031ar2GmcgtTe1WRQ8xXWXIV3n8V Content-Type: multipart/mixed; boundary="CAUAfVBPS1GejFWnplUPhJJlLipuMHJSG"; protected-headers="v1" From: Matthew Seaman To: freebsd-questions@freebsd.org Message-ID: 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--