Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Dec 2013 21:13:09 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Daniel Gerzo <danger@FreeBSD.org>, freebsd-rc@freebsd.org
Subject:   Re: devfs and late file systems
Message-ID:  <529BA665.7040703@infracaninophile.co.uk>
In-Reply-To: <52900DA8.3090102@FreeBSD.org>
References:  <52900DA8.3090102@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On 23/11/2013 02:06, Daniel Gerzo wrote:
> Hello,
> 
> 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:
> 
> devfs /jails/named/var/named/dev devfs rw,late 0 0
> 
> 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.
> 
> 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:
> 
> devfs_set_rulesets="/jails/named/var/named/dev=devfsrules_named"
> 
> However, this fails during system startup because when the devfs rc.d
> script is run, the filesystems marked as late are not mounted yet.
> 
> There are two obvious options to fix this issue:
> - we can either move zfs before mountcritlocal which would also fix this
> issue with having to use the late filesystems in fstab, or
> - we can move mountlate before devfs.
> 
> 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?
> 
> Thank you!
> 
> PS: I am not subscribed to this list so please keep me cc:ed
> 

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="YES"   (applies to all jails)

or

   jail_named_mount_enable="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.
	
	Cheers,

	Matthew


-- 
Dr Matthew J Seaman MA, D.Phil.

PGP: http://www.infracaninophile.co.uk/pgpkey
JID: matthew@infracaninophile.co.uk


[-- Attachment #2 --]
-----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-----

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