From owner-freebsd-rc@FreeBSD.ORG Sun Dec 1 21:13:22 2013 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C204DA7A; Sun, 1 Dec 2013 21:13:22 +0000 (UTC) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4D0CB1ABC; Sun, 1 Dec 2013 21:13:22 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.2.117.99]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.7/8.14.7) with ESMTP id rB1LDHlX076565 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 1 Dec 2013 21:13:17 GMT (envelope-from m.seaman@infracaninophile.co.uk) DKIM-Filter: OpenDKIM Filter v2.8.3 smtp.infracaninophile.co.uk rB1LDHlX076565 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1385932397; bh=XQe4f1NxJAd/ajWh0qW2FZleK1odyVHMwsUsc/JNerM=; h=Date:From:To:Subject:References:In-Reply-To; z=Date:=20Sun,=2001=20Dec=202013=2021:13:09=20+0000|From:=20Matthew =20Seaman=20|To:=20Daniel=20Gerzo =20,=20freebsd-rc@freebsd.org|Subject:=20Re:=2 0devfs=20and=20late=20file=20systems|References:=20<52900DA8.30901 02@FreeBSD.org>|In-Reply-To:=20<52900DA8.3090102@FreeBSD.org>; b=Ezk5Jea7R4lksMzyTa8uP2cTnFkhXBEH2knAtl8vKznMPHLgArAs776M1VXf2+xfF JMymL/xoFXVHdywFb9ZeZD4zWTEBROr+inl25zq8TZK/FT9L+vjd5kXgsA/yUFEFzt GpVp4o65LtczdnfbKNN60ICzNHr1kHIfuW50syso= Message-ID: <529BA665.7040703@infracaninophile.co.uk> Date: Sun, 01 Dec 2013 21:13:09 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Daniel Gerzo , freebsd-rc@freebsd.org Subject: Re: devfs and late file systems References: <52900DA8.3090102@FreeBSD.org> In-Reply-To: <52900DA8.3090102@FreeBSD.org> X-Enigmail-Version: 1.6 OpenPGP: id=E7F39EBF Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ijglIrJfjr9lWO5l1tchxdHPBI060RbXM" X-Virus-Scanned: clamav-milter 0.98 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Dec 2013 21:13:22 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ijglIrJfjr9lWO5l1tchxdHPBI060RbXM Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 23/11/2013 02:06, Daniel Gerzo wrote: > Hello, >=20 > I am using a root on zfs setup with mounts handled by zfs itself (i.e. > not legacy mountpoints through fstab). Furthermore I am using service > jails to separate things. I am running named in one of such jails. > Obviously I need devfs, and therefore I have added this to my fstab: >=20 > devfs /jails/named/var/named/dev devfs rw,late 0 0 >=20 > I had to add the late keyword to fstab because without it the system > wouldn't boot because fstab mounts (mountcritlocal rc.d script) are > handled just before zfs and as such the system wouldn't have such path > available yet. >=20 > Moreover, named needs only a few dev entries and as such I wanted to > apply my devfs ruleset, so I added this to rc.conf: >=20 > devfs_set_rulesets=3D"/jails/named/var/named/dev=3Ddevfsrules_named" >=20 > However, this fails during system startup because when the devfs rc.d > script is run, the filesystems marked as late are not mounted yet. >=20 > There are two obvious options to fix this issue: > - we can either move zfs before mountcritlocal which would also fix thi= s > issue with having to use the late filesystems in fstab, or > - we can move mountlate before devfs. >=20 > I guess the second option is safer (just add mountlate to REQUIRE: line= > of devfs) but I may be missing something. Can someone fix this in src, > or should I? >=20 > Thank you! >=20 > PS: I am not subscribed to this list so please keep me cc:ed >=20 Assming your jail is tagged as 'named' in rc.conf, create a file /etc/fstab.named with your devfs mount details in there. Then add jail_mount_enable=3D"YES" (applies to all jails) or jail_named_mount_enable=3D"YES" (just for that jail) /etc/rc.d/jail will mount the contents of /etc/fstab.named at jail startup time, which is well after all the zfs mounts have happened. See rc.conf(5) for details. =09 Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey JID: matthew@infracaninophile.co.uk --ijglIrJfjr9lWO5l1tchxdHPBI060RbXM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.20 (Darwin) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQJ8BAEBCgBmBQJSm6ZtXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATOrAQAI5zFzTf7Oc5yyy54m1oiR3H eUkIrDl4bQFZJ0CeDeUiDmtIeLbXBCWs7BOS8Y7DQaVULnGgZa22G7/QKSVQILx6 nCYV2ktCWFzhJ0ccTBSGdEYtlqPiOhbsi9brvgZ/TgGrYrXiOMjCxk0OT2l4eIgb QbmHewYgXOn/3mXlWCGYKy+I9MSdgkaKmefbhxZi9hcErlvtCeN9QXq5GsrzoQUW dXqCBhtC9gpoKuTTPJMMvBGL1eqfMJNGxu3tJxzyMP7M3S7ITPtyt0PnAKqvST3L SSoEMXkIITLoScgE0wXOjrMqbD89U+lxdMlPsYbFrBDS/tV6arGM/c4OW7izhArn kDD70VCg8yqPge7439eIiMTzCJWKAOp0b6MwXlJazdDN139JErWzqMjJ4pP0ZXmP dLylAdKF/NOGnCS2HqtQ0x3d8Cj7SwYPp43cxwM3Rq+gciv83Bo+V41FSr0UjKaR NSU+eaWgZmaUm2cK6YxMmuPaaiuKgxQpte28LpbkYQP0npho/fXVftE6kVdCrPBk Xt2Am4dtRmoPZjc1RUcXp7TSCA/imoNAo3ECXUBk8jkt0Sas/3/xPzdBo2pLJMlu oyWwozOVMbIRwskdgBMRLeG8OtWQwlhkTor7LYF4vObQKBwKI8mbHUoVWdSr16LO tbt9i0mZkTFjptlAalAf =JIia -----END PGP SIGNATURE----- --ijglIrJfjr9lWO5l1tchxdHPBI060RbXM--