You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Documentation for RequiresMountsFor= with noauto mount points is incorrect #5249
changed the title [-]5d2abc04fc95f5c5f6d0eaf2f9b06c70d504019f is incorrect[/-][+]5d2abc04fc95f5c5f6d0eaf2f9b06c70d504019f is incorrect (noauto + RequiresMountsFor= docs)[/+]on Feb 7, 2017
This comes down to what noauto really means. Does it mean: do not mount automatically, when starting the system, or: do not mount automatically in general, i.e. require an explicit command by the admin to mount. The second interpretation is what the documentation describes, and I think it makes more sense. In particular, it allows noauto to be used as a convenience where the mountpoint is disabled from normal system operation, but an admin can still issue the mount call without manually specifying the options and device name.
The problem with the first interpretation, i.e. adding a mount point as a dependency through RMF= but not through fstab-generator is that it seems much less predictable. Just by looking at fstab it's not possible to say if the mount point will be mounted or not, you also need to check if anything has automatically generated requires on the mount point.
Dunno... I like the second interpretation better, for conceptual reasons, but only weakly, and I can see how both sides make sense. Either way works, but we need to make the code and documentation of RMF= and noauto consistent.
the current code, afaics implements the logic that "auto" means: mount the dir at boot time, regardless if anyone asks for it or not. "auto" hence adds it to the initial transaction. It does not mean however, that it wouldn't end up in there for other reasons too.
I mean, this is like a service foo.service requiring a service bar.service: if you have Requires= then this means bar.service is pulled in as soon as foo.service is requested, regardless if bar.service is enabled or not (and in fact, also regardless whether foo.service is enabled or not).
Also note: the dependency is called "RequiresMountsFor=", i.e. it carries the "Requires" in its name, indicating that it is closely related to "Requires=", and I think it really should be meaning that it pulls in whatever is listed, regardless of "auto" is specified or not.
I mean, the reason we originally added "RequiresMountsFor=" is simply to make sure that specific mounts are definitely pulled in before a specific service is activated, independently of what the boot otherwise says.
So, I am pretty sure the docs should be fixed to match the code, not the other way round.
changed the title [-]5d2abc04fc95f5c5f6d0eaf2f9b06c70d504019f is incorrect (noauto + RequiresMountsFor= docs)[/-][+]Documentation for RequiresMountsFor= with `noauto` mount points is incorrect[/+]on Feb 9, 2017
Activity
poettering commentedon Feb 6, 2017
Hmm, github doesn't make link from this:
5d2abc0
[-]5d2abc04fc95f5c5f6d0eaf2f9b06c70d504019f is incorrect[/-][+]5d2abc04fc95f5c5f6d0eaf2f9b06c70d504019f is incorrect (noauto + RequiresMountsFor= docs)[/+]keszybz commentedon Feb 7, 2017
This comes down to what
noautoreally means. Does it mean: do not mount automatically, when starting the system, or: do not mount automatically in general, i.e. require an explicit command by the admin to mount. The second interpretation is what the documentation describes, and I think it makes more sense. In particular, it allowsnoautoto be used as a convenience where the mountpoint is disabled from normal system operation, but an admin can still issue the mount call without manually specifying the options and device name.The problem with the first interpretation, i.e. adding a mount point as a dependency through
RMF=but not throughfstab-generatoris that it seems much less predictable. Just by looking atfstabit's not possible to say if the mount point will be mounted or not, you also need to check if anything has automatically generated requires on the mount point.Dunno... I like the second interpretation better, for conceptual reasons, but only weakly, and I can see how both sides make sense. Either way works, but we need to make the code and documentation of
RMF=andnoautoconsistent.poettering commentedon Feb 8, 2017
the current code, afaics implements the logic that "auto" means: mount the dir at boot time, regardless if anyone asks for it or not. "auto" hence adds it to the initial transaction. It does not mean however, that it wouldn't end up in there for other reasons too.
I mean, this is like a service foo.service requiring a service bar.service: if you have Requires= then this means bar.service is pulled in as soon as foo.service is requested, regardless if bar.service is enabled or not (and in fact, also regardless whether foo.service is enabled or not).
Also note: the dependency is called "RequiresMountsFor=", i.e. it carries the "Requires" in its name, indicating that it is closely related to "Requires=", and I think it really should be meaning that it pulls in whatever is listed, regardless of "auto" is specified or not.
I mean, the reason we originally added "RequiresMountsFor=" is simply to make sure that specific mounts are definitely pulled in before a specific service is activated, independently of what the boot otherwise says.
So, I am pretty sure the docs should be fixed to match the code, not the other way round.
Does that make sense?
[-]5d2abc04fc95f5c5f6d0eaf2f9b06c70d504019f is incorrect (noauto + RequiresMountsFor= docs)[/-][+]Documentation for RequiresMountsFor= with `noauto` mount points is incorrect[/+]man: revert documentation about RequiresMountsFor= honoring noauto
nfs-server-generator: handle 'noauto' mounts correctly