Bug 224353 - NFS mounts should count as local in a diskless system.
Summary: NFS mounts should count as local in a diskless system.
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 11.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-15 01:54 UTC by Duane
Modified: 2017-12-15 19:56 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Duane 2017-12-15 01:54:03 UTC
In a diskless system the root NFS share is loaded before anything (necessarily) and then the `rc.initdiskless` script runs to set up memory filesystems, but there is no way to load any other NFS shares before "FILESYSTEMS" and this causes problems if you want a read-only root and a second read/write share mounted somewhere else.

I propose that in the case of a diskless system, NFS filesystems should be counted as local and not remote, and so handled by `mountcritlocal`.  This can simply be managed by removing "nfs:NFS" from the "netfs_types" variable if the `vfs.nfs.diskless_valid` sysctl is set and non-zero.
Comment 1 amvandemore 2017-12-15 19:47:15 UTC
I understand the current infrastructure may be lacking for the this use case, but surely there is some better way to address than a glaring POLA violation.
Comment 2 Duane 2017-12-15 19:56:18 UTC
(In reply to amvandemore from comment #1)

I don't know what POLA means, could you please explain what you mean by that?

The other solution I considered was adding mount behaviour to the `rc.initdiskless` script through some modification of the `conf` mechanism but this seemed more complicated and likely to lead to duplication of effort.  I was also concerned that thr more "special" the behaviour is the more likely it is to "rot" through disuse as time goes on.