D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Systemd NFS mount via fstab.

 

On 22/07/18 08:38, Julian Hall wrote:
On 22/07/18 02:52, mr meowski wrote:
On 22/07/18 02:39, Julian Hall wrote:

julian@Cerce ~ $ systemctl --failed
    UNIT                         LOAD   ACTIVE SUB DESCRIPTION
● media-julian-DEMETER.mount   loaded failed failed DEMETER
● systemd-modules-load.service loaded failed failed Load Kernel Modules
Yeah systemd still thinks something is wrong (which it probably is).
Let's try and find out what:

sudo journalctl -u media-julian-DEMETER.mount

Might just be a typo somewhere or more likely a fragment of old config
conflicting somehow.
julian@Cerce ~ $ sudo journalctl -u media-julian-DEMETER.mount
[sudo] password for julian:
-- Logs begin at Sun 2018-07-22 08:26:58 BST, end at Sun 2018-07-22 08:35:02 BST. --
Jul 22 08:27:05 Cerce systemd[1]: Mounting DEMETER...
Jul 22 08:27:05 Cerce mount[1267]: mount.nfs: Network is unreachable
Jul 22 08:27:05 Cerce systemd[1]: media-julian-DEMETER.mount: Mount process exited, code=exited status=32
Jul 22 08:27:05 Cerce systemd[1]: Failed to mount DEMETER.
Jul 22 08:27:05 Cerce systemd[1]: media-julian-DEMETER.mount: Unit entered failed state.
julian@Cerce ~ $

I don't understand 'Network unreachable' as it dooesn't mount when the NAS and network are both up and ready. That's obviously the problem though.

Julian
I have tried telling Network Manager not to do anything until the network is up, no joy. Then I found a site with instructions for putting that in the mount file. media-julian-DEMETER.mount now looks like this:

[Unit]
Description=DEMETER
After=network-online.target
Wants=network-online.target

[Mount]
What=192.168.1.3:/volume1/DEMETER
Where=/media/julian/DEMETER
Type=nfs
Options=_netdev,auto

[Install]
WantedBy=multi-user.target

The website didn't specify which section to put the After and Wants line, so I don't know if they're correct but just in the wrong place.

Kind regards,

Julian

--
The Mailing List for the Devon & Cornwall LUG
https://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq