[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

systemd nfs mount blocked until first entered

Hi all,

I have a directory that is mounted via NFS from a remote server. The mount is done via an /etc/fstab entry like this: /video       nfs             defaults,x-systemd.automount,x-systemd.requires=network-online.target,x-systemd.device-timeout=10,rsize=8192,wsize=8192,soft,nolock,noatime      0       0

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

 vdr.service - Video Disk Recorder
   Loaded: loaded (/etc/systemd/system/vdr.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/vdr.service.d
   Active: failed (Result: exit-code) since Thu 2021-07-01 23:27:25 CEST; 8h ago
  Process: 523 ExecStartPre=/bin/sh /usr/lib/vdr/merge-commands.sh commands (code=exited, status=0/SUCCESS)
  Process: 533 ExecStartPre=/bin/sh /usr/lib/vdr/merge-commands.sh reccmds (code=exited, status=0/SUCCESS)
  Process: 543 ExecStart=/usr/bin/vdr (code=exited, status=2)
 Main PID: 543 (code=exited, status=2)
Jul 01 23:27:25 vdr systemd[1]: Starting Video Disk Recorder...
Jul 01 23:27:25 vdr vdr[543]: [543] ERROR: can't access /video
Jul 01 23:27:25 vdr vdr[543]: vdr: can't access video directory /video
Jul 01 23:27:25 vdr systemd[1]: vdr.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jul 01 23:27:25 vdr systemd[1]: vdr.service: Failed with result 'exit-code'.
Jul 01 23:27:25 vdr systemd[1]: Failed to start Video Disk Recorder.

The vdr.service has an override of 


to ensure that the filesystem is mounted.

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.

What is systemd doing here that blocks the mount point for the vdr process? Do I need different fstab options?

Best regards,

Reply to: