Date: Sun, 21 Nov 2021 23:09:23 +0000 From: Rick Macklem <rmacklem@uoguelph.ca> To: FreeBSD Current <freebsd-current@freebsd.org> Cc: "dfr@freebsd.org" <dfr@freebsd.org> Subject: Anyone know why /etc/rc.d/lockd REQUIRES nfsd? Message-ID: <YQXPR0101MB0968A4FABD7866ABF9175BE1DD9E9@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM>
index | next in thread | raw e-mail
Hi,
PR#254282 reports a problem where nullfs mounts cannot be
exported via mountd for FreeBSD 13.0.
The problem seems to be that, to do the nullfs mounts in
/etc/fstab, they require the "late" mount option, so that the
underlying filesystem is mounted (ZFS for the PR).
Adding "mountlate" to the REQUIRE list in /etc/rc.d/mountd
fixes the problem, but that results in a dependency cycle
because /etc/rc.d/lockd specifies:
# REQUIRE: nfsd
# BEFORE: DAEMON
--> which forces mountd to preceed DAEMON.
I think I know why lockd specifies:
# BEFORE: DAEMON
--> I suspect that some daemon requires file locking and that
requires lockd to be running, for an NFS mounted root fs.
However, I cannot think of any reason that nfsd must be running
before lockd is started. The "REQUIRE: nfsd" seems to have been
inherited from NetBSD when first imported to FreeBSD about 20
years ago.
So, can anyone see why lockd might need nfsd running first?
(Without "# REQUIRE: nfsd" in lockd and statd, "# REQUIRE: mountlate"
can be added to /etc/rc.d/mountd without creating a dependency cycle
and seems to fix the problem in the PR during limited testing.)
rick
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YQXPR0101MB0968A4FABD7866ABF9175BE1DD9E9>
