devfs and late file systems

Daniel Gerzo danger at FreeBSD.org
Sat Nov 23 02:14:15 UTC 2013


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

-- 
Kind regards
   Daniel Gerzo


More information about the freebsd-rc mailing list