Stop job closing sessions and multiple sessions running

Hi Karl,
I see the well meaning suggestions but I agree with you I need to get to the root cause of the problem.
I can run a command as route but with which command should I start?

Did you mean this which I ran as root:-

HP-Z640-1:~ # journalctl -b -1 -g timeout --no-pager
Nov 15 21:48:35 HP-Z640-1 (udev-worker)[1793]: nfsv4: Process '/sbin/sysctl -q --pattern ^fs.nfs.(nfs_callback_tcpport|idmap_cache_timeout) --system' failed with exit code 255.
Nov 15 22:06:01 HP-Z640-1 dbus-daemon[1311]: [system] Failed to activate service 'org.bluez': timed out (service_start_timeout=25000ms)
Nov 15 22:06:01 HP-Z640-1 kded5[2241]: kf.bluezqt: PendingCall Error: "Failed to activate service 'org.bluez': timed out (service_start_timeout=25000ms)"
Nov 15 23:41:10 HP-Z640-1 dbus-daemon[1311]: [system] Failed to activate service 'org.bluez': timed out (service_start_timeout=25000ms)
Nov 15 23:41:10 HP-Z640-1 kded5[4109]: kf.bluezqt: PendingCall Error: "Failed to activate service 'org.bluez': timed out (service_start_timeout=25000ms)"
Nov 16 17:12:58 HP-Z640-1 systemd[1]: session-7.scope: Failed with result 'timeout'.
Nov 16 17:12:58 HP-Z640-1 systemd[1]: session-3.scope: Failed with result 'timeout'.
HP-Z640-1:~ # 

Did you see the inconsistencies you mentioned above (15)?

Great!

The trouble presumably comes from nfs:

Nov 15 21:48:35 HP-Z640-1 (udev-worker)[1793]: nfsv4: Process '/sbin/sysctl -q --pattern ^fs.nfs.(nfs_callback_tcpport|idmap_cache_timeout) --system' failed with exit code 255.

Post /etc/fstab. Showing the lines pertaining to nfs will suffice. As erlangen doesn’t use nfs the example shows cifs:

karl@erlangen:~> grep cifs /etc/fstab 
//fritz.box/FRITZ.NAS                      /fritz.box              cifs   noauto,username=mistel        0  0
karl@erlangen:~> 

Here it is:-

alastair@HP-Z640-1:~> grep nfs /etc/fstab
192.168.169.134:/multimedia/AV_multimedia  /home/alastair/NFS_links_ibmserv_134_mastermedia  nfs    nfsvers=4                     0  0
alastair@HP-Z640-1:~>

This is a static mount at boot time, which is not recommended unless absolutely necessary. You may try to switch to on-demand mounting. Steps to perform:

  1. Unmount nfs.

  2. Add systemd mount options, e.g.: x-systemd.automount,x-systemd.idle-timeout=10

  3. Run systemctl daemon-reload.

Infamous host erlangen uses on-demand mounting:

erlangen:~ # grep -E 'noauto|systemd' /etc/fstab
UUID=68BA-53B2                             /GARMIN                 vfat   user,noauto                   0  0
UUID=0267-906F                             /GARMIN-KART            vfat   user,noauto                   0  0
LABEL=FR735                                /FR735                  vfat   user,noauto                   0  0
UUID=2f0030b8-7257-4cba-be3e-b33154cda052  /WD25                   ext4   user,noauto                   0  0
//fritz.box/FRITZ.NAS                      /fritz.box              cifs   noauto,username=mistel        0  0
UUID=0e58bbe5-eff7-4884-bb5d-a0aac3d8a344  /Btrbk                  btrfs  subvolid=5,x-systemd.automount,x-systemd.idle-timeout=10 0  0
UUID=8a723ba5-c46f-45df-b708-0cf9c541da27  /Backup                 btrfs  subvolid=5,x-systemd.automount,x-systemd.idle-timeout=10 0  0
UUID=47e6d9ee-e910-4ea4-8c8f-7ac75f49a4d3  /Crucial                btrfs  subvolid=5,x-systemd.automount,x-systemd.idle-timeout=10 0  0
UUID=2260f160-cc05-47cc-9893-cc32c050177d  /Seagate                btrfs  subvolid=5,x-systemd.automount,x-systemd.idle-timeout=10 0  0
UUID=78383e24-1ed7-45ad-9a6b-65b8b98b93c2  /Sandisk                btrfs  subvolid=5,x-systemd.automount,x-systemd.idle-timeout=10 0  0
erlangen:~ # 

Shutdown is always fast:

erlangen:~ # journalctl -b -1 -g Unmounting -o short-monotonic 
[ 1515.569967] erlangen systemd[1]: Unmounting /.snapshots...
[ 1515.570448] erlangen systemd[1]: Unmounting /boot/efi...
[ 1515.570980] erlangen systemd[1]: Unmounting /boot/grub2/i386-pc...
[ 1515.571371] erlangen systemd[1]: Unmounting /boot/grub2/x86_64-efi...
[ 1515.571754] erlangen systemd[1]: Unmounting /home...
[ 1515.572168] erlangen systemd[1]: Unmounting /home-SSD...
[ 1515.572580] erlangen systemd[1]: Unmounting /opt...
[ 1515.573015] erlangen systemd[1]: Unmounting /root...
[ 1515.573511] erlangen systemd[1]: Unmounting /srv...
[ 1515.573956] erlangen systemd[1]: Unmounting Temporary Directory /tmp...
[ 1515.574374] erlangen systemd[1]: Unmounting /usr/local...
erlangen:~ # 

Total time to unmount is 1515.574374 - 1515.569967 = 4.407 milliseconds.

More: On-Demand NFS and Samba Connections in Linux with Systemd Automount - Ray Against the Machine

Hi Karl,
Many thanks for this. The link was helpful and easier to follow than the opensuse manual and I now have the multimedia files automounted so I can see them. However I cannot see any nfs line in /etc/fstab which I do not understand.

I prefer the automount arrangement as it seems more reliable and is working on reboot without any problems but some follow up questions please:-

  1. I followed the instructions from your link and the nfs share is mounted at /mnt/nfs/nfsshare. How do I have the share shown in my home directory where I have a directory /home/alastair/NFS_links_ibmserv_134_mastermedia.

  2. I had been using two different shares from the same server. How should I rename the mounts so that I can have several nfs shares working and shown in my home directory?

  3. With the new automount system for my nfs share I still get the 90 second delay when shutting down or rebooting so it seems something else is causing a problem.

Many thanks again,

Show the following mount points:

findmnt  /mnt/nfs/nfsshare
findmnt  /home/alastair/NFS_links_ibmserv_134_mastermedia

Example btrfs automount

Fstab entry

erlangen:/Btrbk # grep /Btrbk /etc/fstab 
UUID=0e58bbe5-eff7-4884-bb5d-a0aac3d8a344  /Btrbk                  btrfs  subvolid=5,x-systemd.automount,x-systemd.idle-timeout=10 0  0
erlangen:/Btrbk # 

Units generated from fstab:

erlangen:/Btrbk # systemctl cat Btrbk.automount 
# /run/systemd/generator/Btrbk.automount
# Automatically generated by systemd-fstab-generator

[Unit]
SourcePath=/etc/fstab
Documentation=man:fstab(5) man:systemd-fstab-generator(8)

[Automount]
Where=/Btrbk
TimeoutIdleSec=10s
erlangen:/Btrbk # systemctl cat Btrbk.mount 
# /run/systemd/generator/Btrbk.mount
# Automatically generated by systemd-fstab-generator

[Unit]
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
SourcePath=/etc/fstab
Before=local-fs.target
After=blockdev@dev-disk-by\x2duuid-0e58bbe5\x2deff7\x2d4884\x2dbb5d\x2da0aac3d8a344.target

[Mount]
What=/dev/disk/by-uuid/0e58bbe5-eff7-4884-bb5d-a0aac3d8a344
Where=/Btrbk
Type=btrfs
Options=subvolid=5,x-systemd.automount,x-systemd.idle-timeout=10
erlangen:/Btrbk # 

On-demand mount

erlangen:/Btrbk # findmnt /Btrbk 
TARGET SOURCE         FSTYPE OPTIONS
/Btrbk systemd-1      autofs rw,relatime,fd=56,pgrp=1,timeout=10,minproto=5,maxproto=5,direct,pipe_ino=6293
/Btrbk /dev/nvme0n1p2 btrfs  rw,relatime,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/
erlangen:/Btrbk # 

Leaving directory /Btrbk

erlangen:/Btrbk # cd
erlangen:~ # findmnt /Btrbk 
TARGET SOURCE    FSTYPE OPTIONS
/Btrbk systemd-1 autofs rw,relatime,fd=56,pgrp=1,timeout=10,minproto=5,maxproto=5,direct,pipe_ino=6293
erlangen:~ # 

/Btrbk readily mounts on demand and unmounts when inactive:

erlangen:~ # journalctl -b -u Btrbk.automount -u Btrbk.mount
Nov 19 06:05:28 erlangen systemd[1]: Set up automount Btrbk.automount.
Nov 19 11:44:57 erlangen systemd[1]: Btrbk.automount: Got automount request for /Btrbk, triggered by 3004 (bash)
Nov 19 11:44:57 erlangen systemd[1]: Mounting /Btrbk...
Nov 19 11:44:57 erlangen systemd[1]: Mounted /Btrbk.
Nov 19 11:53:55 erlangen systemd[1]: Unmounting /Btrbk...
Nov 19 11:53:55 erlangen systemd[1]: Btrbk.mount: Deactivated successfully.
Nov 19 11:53:55 erlangen systemd[1]: Unmounted /Btrbk.
erlangen:~ # 

Out of curiosity I export /home/karl on host 6700k and mount it on demand at infamous host erlangen:

erlangen:~ # grep nfs /etc/fstab 
6700k:/home/karl /home_karl_6700k nfs4 rw,noauto 0 0
erlangen:~ # 

Create automount unit:

erlangen:~ # systemctl cat home_karl_6700k.automount
# /etc/systemd/system/home_karl_6700k.automount
[Automount]
Where=/home_karl_6700k
TimeoutIdleSec=10s

[Install]
WantedBy=multi-user.target
erlangen:~ # 

Enable and start unit:

erlangen:~ # systemctl enable --now home_karl_6700k.automount
Created symlink /etc/systemd/system/multi-user.target.wants/home_karl_6700k.automount → /etc/systemd/system/home_karl_6700k.automount.
erlangen:~ # 

Test and verify:

karl@erlangen:~> findmnt /home_karl_6700k 
TARGET           SOURCE    FSTYPE OPTIONS
/home_karl_6700k systemd-1 autofs rw,relatime,fd=58,pgrp=1,timeout=10,minproto=5,maxproto=5,direct,pipe_ino=480732

karl@erlangen:~> cd /home_karl_6700k/

karl@erlangen:/home_karl_6700k> findmnt /home_karl_6700k 
TARGET           SOURCE           FSTYPE OPTIONS
/home_karl_6700k systemd-1        autofs rw,relatime,fd=58,pgrp=1,timeout=10,minproto=5,maxproto=5,direct,pipe_ino=480732
/home_karl_6700k 6700k:/home/karl nfs4   rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp6,timeo=600,retrans=2,sec=sys,clientaddr=2001:....................,local_lock=none,addr=2001:.........................

karl@erlangen:/home_karl_6700k> cd

karl@erlangen:~> findmnt /home_karl_6700k 
TARGET           SOURCE    FSTYPE OPTIONS
/home_karl_6700k systemd-1 autofs rw,relatime,fd=58,pgrp=1,timeout=10,minproto=5,maxproto=5,direct,pipe_ino=480732
karl@erlangen:~> 

Check journal:

karl@erlangen:~> journalctl -b -u home_karl_6700k*
Nov 19 12:55:24 erlangen systemd[1]: Set up automount home_karl_6700k.automount.
Nov 19 12:57:24 erlangen systemd[1]: home_karl_6700k.automount: Got automount request for /home_karl_6700k, triggered by 5761 (bash)
Nov 19 12:57:24 erlangen systemd[1]: Mounting /home_karl_6700k...
Nov 19 12:57:24 erlangen systemd[1]: Mounted /home_karl_6700k.
Nov 19 12:57:48 erlangen systemd[1]: Unmounting /home_karl_6700k...
Nov 19 12:57:48 erlangen systemd[1]: home_karl_6700k.mount: Deactivated successfully.
Nov 19 12:57:48 erlangen systemd[1]: Unmounted /home_karl_6700k.
karl@erlangen:~> 

Hi Karl,
Starting with the mount points you suggest I have:-

alastair@HP-Z640-1:~> findmnt /mnt/nfs/nfsshare
TARGET            SOURCE                                    FSTYPE OPTIONS
/mnt/nfs/nfsshare systemd-1                                 autofs rw,relatime,fd=57,pgrp=1,timeout=0,minprot
/mnt/nfs/nfsshare 192.168.169.134:/multimedia/AV_multimedia nfs4   rw,relatime,vers=4.2,rsize=1048576,wsize=1
alastair@HP-Z640-1:~> findmnt /home/alastair/NFS_links_ibmserv_134_mastermedia
alastair@HP-Z640-1:~> grep nfs /etc/fstab
alastair@HP-Z640-1:~> 

I have the first line OK but would not expect to see anything in my home directory because I did not configure this. I have no idea why I have no nfs in /etc/fstab.

I do appreciate your examples but do not properly follow what you are doing. I had only followed the instructions in the link you sent exactly as I was not sure what parts were mandatory and what parts were for me to chose. This is what I did first:-

alastair@HP-Z640-1:~> cat /etc/systemd/system/mnt-nfs-nfsshare.mount
[Unit]
Description = nfs mount for nfsfiles

[Mount]
What=192.168.169.134:/multimedia/AV_multimedia
Where=/mnt/nfs/nfsshare
Type=nfs
Options=defaults
TimeoutSec=5

[Inst192.168.169.134:/multimedia/AV_multimediaall]
WantedBy=multi-user.target
alastair@HP-Z640-1:~> 

and:-

alastair@HP-Z640-1:~> cat /etc/systemd/system/mnt-nfs-nfsshare.automount
[Unit]
Description=nfs automount for nfsfiles

[Automount]
Where=/mnt/nfs/nfsshare
TimeoutIdleSec=0

[Install]
WantedBy=multi-user.target
alastair@HP-Z640-1:~> 

How should I edit these to have the share shown in my home tree?

Do you really want to have double mounts? Why not use a single mount with Where=/home/alastair/NFS_links_ibmserv_134_mastermedia?

No but what I have now doesn’t work:-

alastair@HP-Z640-1:~> cat /etc/systemd/system/mnt-nfs-nfsshare.mount
[Unit]
Description = nfs mount for nfsfiles

[Mount]
What=192.168.169.134:/multimedia/AV_multimedia
Where=/home/alastair/NFS_links_ibmserv_134_mastermedia/
Type=nfs
Options=defaults
TimeoutSec=5

[Inst192.168.169.134:/multimedia/AV_multimediaall]
WantedBy=multi-user.target
alastair@HP-Z640-1:~>

and:-

alastair@HP-Z640-1:~> cat /etc/systemd/system/mnt-nfs-nfsshare.automount
[Unit]
Description=nfs automount for nfsfiles

[Automount]
Where=/home/alastair/NFS_links_ibmserv_134_mastermedia⁄
TimeoutIdleSec=0

[Install]
WantedBy=multi-user.target
alastair@HP-Z640-1:~> 

Clearly I have made a mistake and will check again.

This is what I have now:-

alastair@HP-Z640-1:~> cat /etc/systemd/system/mnt-nfs-nfsshare.mount
[Unit]
Description = nfs mount for nfsfiles

[Mount]
What=192.168.169.134:/multimedia/AV_multimedia
Where=/home/alastair/NFS_links_ibmserv_134_mastermedia/
Type=nfs
Options=defaults
TimeoutSec=5

[Install]
WantedBy=multi-user.target
alastair@HP-Z640-1:~> cat /etc/systemd/system/mnt-nfs-nfsshare.automount
[Unit]
Description=nfs automount for nfsfiles

[Automount]
Where=/home/alastair/NFS_links_ibmserv_134_mastermedia⁄
TimeoutIdleSec=0

[Install]
WantedBy=multi-user.target
alastair@HP-Z640-1:~> 

I have corrected the error which crept into my previous mount but what I have now does still does not work. Could it be the trailing slash in my directories causing the problem?

This is the problem:-

alastair@HP-Z640-1:~> sudo systemctl status mnt-nfs-nfsshare.mount
○ mnt-nfs-nfsshare.mount - nfs mount for nfsfiles
     Loaded: bad-setting (Reason: Unit mnt-nfs-nfsshare.mount has a bad unit file setting.)
     Active: inactive (dead)
TriggeredBy: ○ mnt-nfs-nfsshare.automount
      Where: /home/alastair/NFS_links_ibmserv_134_mastermedia
       What: 192.168.169.134:/multimedia/AV_multimedia

Nov 19 13:28:52 HP-Z640-1 systemd[1]: mnt-nfs-nfsshare.mount: Where= setting doesn't match unit name. Refusi>
Nov 19 13:44:59 HP-Z640-1 systemd[1]: mnt-nfs-nfsshare.mount: Where= setting doesn't match unit name. Refusi>
alastair@HP-Z640-1:~> 

Ran into the same error:

erlangen:~ # journalctl -b -u home_karl_6700k.automount
Nov 19 12:43:39 erlangen systemd[1]: home_karl_6700k.automount: Where= setting doesn't match unit name. Refusing.
Nov 19 12:45:46 erlangen systemd[1]: Set up automount home_karl_6700k.automount.
Nov 19 12:46:19 erlangen systemd[1]: home_karl_6700k.automount: Got automount request for /home_karl_6700k, triggered by 5761 (bash)
Nov 19 12:49:36 erlangen systemd[1]: home_karl_6700k.automount: Got automount request for /home_karl_6700k, triggered by 5761 (bash)
Nov 19 12:55:20 erlangen systemd[1]: home_karl_6700k.automount: Deactivated successfully.
Nov 19 12:55:20 erlangen systemd[1]: Unset automount home_karl_6700k.automount.
Nov 19 12:55:24 erlangen systemd[1]: Set up automount home_karl_6700k.automount.
Nov 19 12:57:24 erlangen systemd[1]: home_karl_6700k.automount: Got automount request for /home_karl_6700k, triggered by 5761 (bash)
Nov 19 13:05:37 erlangen systemd[1]: home_karl_6700k.automount: Got automount request for /home_karl_6700k, triggered by 5761 (bash)
Nov 19 19:22:08 erlangen systemd[1]: home_karl_6700k.automount: Deactivated successfully.
Nov 19 19:22:08 erlangen systemd[1]: Unset automount home_karl_6700k.automount.
Nov 19 19:24:00 erlangen systemd[1]: Set up automount home_karl_6700k.automount.
Nov 19 19:24:03 erlangen systemd[1]: home_karl_6700k.automount: Got automount request for /home_karl_6700k, triggered by 5364 (findmnt)
Nov 19 19:24:18 erlangen systemd[1]: home_karl_6700k.automount: Got automount request for /home_karl_6700k, triggered by 4709 (bash)
Nov 19 19:24:30 erlangen systemd[1]: home_karl_6700k.automount: Got automount request for /home_karl_6700k, triggered by 5428 (bash)
erlangen:~ # 

Fixed that by relaoding:

erlangen:~ # systemctl daemon-reload
erlangen:~ # 

Now I have:

erlangen:~ # systemctl cat home_karl_6700k.mount 
# /run/systemd/generator/home_karl_6700k.mount
# Automatically generated by systemd-fstab-generator

[Unit]
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
SourcePath=/etc/fstab
Before=remote-fs.target

[Mount]
What=6700k:/home/karl
Where=/home_karl_6700k
Type=nfs4
Options=rw,noauto
erlangen:~ # systemctl cat home_karl_6700k.automount 
# /etc/systemd/system/home_karl_6700k.automount
[Automount]
Where=/home_karl_6700k
TimeoutIdleSec=10s

[Install]
WantedBy=multi-user.target
erlangen:~ # 
erlangen:~ # systemctl status home_karl_6700k.mount 
○ home_karl_6700k.mount - /home_karl_6700k
     Loaded: loaded (/etc/fstab; generated)
     Active: inactive (dead) since Sun 2023-11-19 19:24:45 CET; 11min ago
   Duration: 14.021s
TriggeredBy: ● home_karl_6700k.automount
      Where: /home_karl_6700k
       What: 6700k:/home/karl
       Docs: man:fstab(5)
             man:systemd-fstab-generator(8)
        CPU: 9ms

Nov 19 19:24:30 erlangen systemd[1]: Mounting /home_karl_6700k...
Nov 19 19:24:31 erlangen systemd[1]: Mounted /home_karl_6700k.
Nov 19 19:24:45 erlangen systemd[1]: Unmounting /home_karl_6700k...
Nov 19 19:24:45 erlangen systemd[1]: home_karl_6700k.mount: Deactivated successfully.
Nov 19 19:24:45 erlangen systemd[1]: Unmounted /home_karl_6700k.
erlangen:~ # 
erlangen:~ # systemctl status home_karl_6700k.automount 
● home_karl_6700k.automount
     Loaded: loaded (/etc/systemd/system/home_karl_6700k.automount; enabled; preset: disabled)
     Active: active (waiting) since Sun 2023-11-19 19:24:00 CET; 11min ago
   Triggers: ● home_karl_6700k.mount
      Where: /home_karl_6700k

Nov 19 19:24:00 erlangen systemd[1]: Set up automount home_karl_6700k.automount.
Nov 19 19:24:03 erlangen systemd[1]: home_karl_6700k.automount: Got automount request for /home_karl_6700k, triggered by 5364 (findmnt)
Nov 19 19:24:18 erlangen systemd[1]: home_karl_6700k.automount: Got automount request for /home_karl_6700k, triggered by 4709 (bash)
Nov 19 19:24:30 erlangen systemd[1]: home_karl_6700k.automount: Got automount request for /home_karl_6700k, triggered by 5428 (bash)
erlangen:~ #

Hi Karl,
I reverted to the configuration described in the link you sent and it is working correctly so I must have made a mistake with the naming convention. I shall try again with the single mount. I am OK with the Where but created a mount point at

/mnt/nfs/nfsshare

I had assumed that the /mnt/nfs directory was significant and was confused by the instruction that the systemd unit files use a specific naming convention that follows the path of the mount point.

Will keep trying!

Easiest way to initialise is reboot.

I now rely only on manually generated units:

erlangen:~ # systemctl cat home_karl_6700k.mount 
# /etc/systemd/system/home_karl_6700k.mount
[Mount]
What=6700k:/home/karl
Where=/home_karl_6700k
Type=nfs4
Options=rw,noauto
TimeoutSec=5
erlangen:~ # 
erlangen:~ # systemctl cat home_karl_6700k.automount 
# /etc/systemd/system/home_karl_6700k.automount
[Automount]
Where=/home_karl_6700k
TimeoutIdleSec=10s

[Install]
WantedBy=multi-user.target
erlangen:~ # 

Works as expected: Readily mounts. Times out after 5 seconds, if host 6700k is not available.

Hi Karl,
Been busy all week but thought I would return to this as I still do not have it working. Here is what I have set up:-

alastair@HP-Z640-1:~> systemctl cat home-alastair-NFS_from_ibmserv_134_alastair.mount
# /etc/systemd/system/home-alastair-NFS_from_ibmserv_134_alastair.mount
[Unit]
Description = nfs mount for nfsfiles

[Mount]
What=192.168.169.134:/home/alastair/NFS_from_ibmserv_134_alastair
Where=/home/alastair/NFS_from_ibmserv_134_alastair
Type=nfs4
Options=rw,noauto
TimeoutSec=5

[Install]
WantedBy=multi-user.target
alastair@HP-Z640-1:~> 
alastair@HP-Z640-1:~> 
alastair@HP-Z640-1:~> systemctl cat home-alastair-NFS_from_ibmserv_134_alastair.automount
# /etc/systemd/system/home-alastair-NFS_from_ibmserv_134_alastair.automount
[Unit]
Description=nfs automount for nfsfiles

[Automount]
Where=/home/alastair/NFS_from_ibmserv_134_alastair
TimeoutIdleSec=0

[Install]
WantedBy=multi-user.target
alastair@HP-Z640-1:~> 

Can you see my mistake?

I think I had it wrong before but I still seem to have it wrong:-

alastair@HP-Z640-1:~> systemctl cat home-alastair.mount
# /etc/systemd/system/home-alastair.mount
[Unit]
Description = nfs mount for nfsfiles

[Mount]
What=192.168.169.134:/home/alastair
Where=/home/alastair/NFS_from_ibmserv_134_alastair
Type=nfs4
Options=rw,noauto
TimeoutSec=5

[Install]
WantedBy=multi-user.target
alastair@HP-Z640-1:~> 
alastair@HP-Z640-1:~> 
alastair@HP-Z640-1:~> systemctl cat home-alastair.automount
# /etc/systemd/system/home-alastair.automount
[Unit]
Description=nfs automount for nfsfiles

[Automount]
Where=/home/alastair/NFS_from_ibmserv_134_alastair
TimeoutIdleSec=0

[Install]
WantedBy=multi-user.target
alastair@HP-Z640-1:~> 

Still not working after reboot.

Beware of the dashes in the name of the mount and automount units. Escaping them is tedious, for me at least. Use underscore instead e.g. home_karl_6700k.automount.

Hi Karl,
I have followed the link you gave and clearly am not following the instructions concerning the naming convention. I had used the hyphen as shown in the example but have no idea why this has been done.

As a matter of practice I tend to use underscore everywhere as I did for my file naming for the mount point. If I substitute an underscore where the example had inserted a hyphen that should have worked but now the line in my mount and automount seems confusing as it fails to discriminate between the path line and the file name. Whatever the reasons it still does not work on re-booting but this is what I have:-

alastair@HP-Z640-1:~> systemctl cat home_alastair.mount
# /etc/systemd/system/home_alastair.mount
[Unit]
Description = nfs mount for nfsfiles

[Mount]
What=192.168.169.134:/home/alastair
Where=/home/alastair/NFS_from_ibmserv_134_alastair
Type=nfs4
Options=rw,noauto
TimeoutSec=5

[Install]
WantedBy=multi-user.target
alastair@HP-Z640-1:~> 
alastair@HP-Z640-1:~> 
alastair@HP-Z640-1:~> systemctl cat home_alastair.automount
# /etc/systemd/system/home_alastair.automount
[Unit]
Description=nfs automount for nfsfiles

[Automount]
Where=/home/alastair/NFS_from_ibmserv_134_alastair
TimeoutIdleSec=0

[Install]
WantedBy=multi-user.target
alastair@HP-Z640-1:~> 

What next?

I had this last time as well:-

alastair@HP-Z640-1:~> systemctl status home_alastair.mount
○ home_alastair.mount - nfs mount for nfsfiles
     Loaded: bad-setting (Reason: Unit home_alastair.mount has a bad unit file setting.)
     Active: inactive (dead)
      Where: /home/alastair/NFS_from_ibmserv_134_alastair
       What: 192.168.169.134:/home/alastair
alastair@HP-Z640-1:~>