auto-mount NFS shares on boot

Jonas Meurer jonas at freesources.org
Tue Jul 7 12:03:24 BST 2015


Hi,

Am 2015-06-28 12:54, schrieb Michael Biebl:
>>> I suggest to add this simple fix to Jessie by uploading it to
>>> stable-proposed-updates. What do you think? Also, do you think that
>>> /etc/systemd/system/remote-fs-pre.target.d/nfs.conf belongs to 
>>> systemd
>>> package or to nfs-common? I would say it belongs to nfs-common as 
>>> that
>>> one provides the required tools and services to mount NFS shares on a
>>> client.
>> 
>> For Jessie:
>> 
>>  - nfs-common is still an init script, so one cannot simply add
>>    Before=remote-fs-pre.target to that. But there are two other
>>    options:
>> 
>>  - just for Jessie: update systemd to change the original unit file
>>    remote-fs-pre.target to include After=nfs-common.service
>> 
>>  - or alternatively, package a drop-in in /lib in the nfs-common
>>    package, i.e.
>>    /lib/systemd/system/nfs-common.service.d/systemd-ordering.conf:
>>    [Unit]
>>    Before=remote-fs-pre.target
>> 
>> (IMHO at least, I'll defer to the maintainers of the respective
>> packages as to what they think is appropriate.)
> 
> Certainly, the preferred fix is, that packages ship native service 
> files
> which override/replace the sysv init scripts.
> In case of nfs-common/rpcbind, Ubuntu has done some extensive work to
> properly integrate nfs-common/rpcbind with systemd.
> 
> This hasn't landed in Debian (yet) and is not something which can be
> backported for jessie.
> 
> The drop-in snippet for nfs-common to augment the dependency 
> information
> when being run under systemd is something which seems to be suitable 
> for
> jessie and could be added to the package in sid to give it some testing
> first. Ideally, that drop-in is shipped by the package itself. This
> would mean a stable upload for nfs-common.

I prepared a patch for nfs-utils 1.2.8-9 that adds a systemd drop-in for
nfs-common at 
/lib/systemd/system/nfs-common.service.d/remote-fs-pre.conf.
It places the nfs-common service before the remote-fs-pre target. This
results in the rpc.gssd service beeing started before NFS shares are
mounted during the boot process.

The patch is tested on my system and works for me. I suggest to upload
nfs packages with this patch to Jessie (through stable-proposed-updates)
in order to fix auto-mounting Kerberos-secured NFS mounts at boot in
Jessie.

Do nfs-utils maintainers take care of this upload? Otherwise I can do
the upload (and ask RMs for approval first) myself. A short comment
would be helpful.

Cheers,
  jonas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nfs-utils_1.2.8-9+deb8u1.debdiff
Type: text/x-diff
Size: 2060 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-systemd-maintainers/attachments/20150707/e59cceee/attachment.diff>


More information about the Pkg-systemd-maintainers mailing list