Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #236769

Re: systemd nfs mount blocked until first entered

From Reco <recoverym4n@enotuniq.net>
Newsgroups linux.debian.user
Subject Re: systemd nfs mount blocked until first entered
Date 2021-07-02 19:20 +0200
Message-ID <CwuZz-7cF-3@gated-at.bofh.it> (permalink)
References <CwumR-6KQ-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


	Hi.

On Fri, Jul 02, 2021 at 06:12:58PM +0200, Reiner Buehl wrote:
> I have a directory that is mounted via NFS from a remote server.

Actually, you have an autofs mountpoint, because you set
x-systemd.automount option in fstab.
Only if something starts using that mountpoint an NFS filesystem should
be mounted there.

In another words - you do not require your NFS filesystem to be mounted
at boot time, and thus remote-fs.target does not include your NFS
filesystem.


> If I boot the vdr daemon fails during startup with the error message

In other words, vdr fails to trigger automounting of the filesystem in
question. As usual with journald, the actual reason of this is not
present in this log.


> The vdr.service has an override of
> 
> [Unit]
> After=remote-fs.target
> Requires=remote-fs.target
> 
> to ensure that the filesystem is mounted.

These dependencies are useless for your service given the current state
of your fstab.
The reason being - "autofs" filesystems belong to local-fs.target, not
remote-fs.target, and explicitly depending on local-fs.target is useless
anyway (it's one of the default dependencies for the most units).
What you probably need here is a dependency for a .mount unit
corresponding to your NFS filesystem.


> If I try to restart vdr.service, it fails again with the same error but if
> I just cd to the directory and then try to restart it, it starts and works
> fine.

Can you show the result of "systemctl cat vdr" please?

> What is systemd doing here that blocks the mount point for the vdr process?

Many things are possible here. You have ProtectSystem=full set in unit,
or you have PrivateMounts=true set in there.

> Do I need different fstab options?

It depends. x-systemd.automount is useful, because it does not require
your NFS server to be present at boot time.
I'll refrain from suggesting certain hacks for now, I'd like to see your
unit in full first.

Reco

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

systemd nfs mount blocked until first entered Reiner Buehl <reiner.buehl@gmail.com> - 2021-07-02 18:40 +0200
  Re: systemd nfs mount blocked until first entered Greg Wooledge <greg@wooledge.org> - 2021-07-02 19:10 +0200
  Re: systemd nfs mount blocked until first entered Reco <recoverym4n@enotuniq.net> - 2021-07-02 19:20 +0200
    Re: systemd nfs mount blocked until first entered Reiner Buehl <reiner.buehl@gmail.com> - 2021-07-02 19:50 +0200
      Re: systemd nfs mount blocked until first entered Reiner Buehl <reiner.buehl@gmail.com> - 2021-07-02 20:10 +0200
        Re: systemd nfs mount blocked until first entered Greg Wooledge <greg@wooledge.org> - 2021-07-02 20:30 +0200

csiph-web