I have faced the problem when automounting the file system.
Rc.d "/etc/rc.d/mountcritlocal" script starts earlier than the script rc.d "/etc/rc.d/zfs" which leads to inability to mount file system correctly. Script "/etc/rc.d/zfs" shoud be launched earlier "/etc/rc.d/mountcritlocal".
in script /etc/rc.d/mountcritlocal add zfs value.
# REQUIRE: root hostid_save mdconfig zfs
should be corrected.
I don't know whether this is a good idea or not, but if you want to do this you have to remove REQUIRE: mountcritlocal from etc/rc.d/zfs to avoid a dependency cycle.
# $FreeBSD: releng/10.1/etc/rc.d/zfs 253076 2013-07-09 08:59:39Z avg $
# PROVIDE: zfs
# REQUIRE: mountcritlocal
# $FreeBSD: releng/10.1/etc/rc.d/mountcritlocal 215824 2010-11-25 18:20:28Z dougb $
# PROVIDE: mountcritlocal
# REQUIRE: root hostid_save mdconfig
# KEYWORD: nojail shutdown
I dont see problem cycles.
(In reply to Dmitriy Bartkus from comment #2)
There is no such cycle in head, but adding zfs to mountcritlocal's REQUIRE (as proposed here) will create a cycle.