D&C GLug - Home Page

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

Re: [LUG] Linux Mint 20 and autofs [trying to mount NFS shares on NAS]

 

On 17/07/2020 17:46, comrade meowski wrote:
On 17/07/2020 14:21, Julian Hall wrote:

I knew there was something I hadn't done. I also installed openssh-server on the laptop to make administering it easier.

ulian@192.168.1.136's password:
julian@APHRODITE ~ $ sudo systemctl daemon-reload
julian@APHRODITE ~ $ sudo systemctl enable /etc/systemd/system/media-julian-DEMETER.mount julian@APHRODITE ~ $ sudo systemctl enable /etc/systemd/system/media-julian-HESTIA.mount julian@APHRODITE ~ $ sudo systemctl enable /etc/systemd/system/media-julian-PERSEPHONE.mount

All good so far. Daemon reloaded and all three mounts enabled.

julian@APHRODITE ~ $ sudo systemctl start /etc/systemd/system/media-julian-DEMETER.mount Failed to start etc-systemd-system-media\x2djulian\x2dDEMETER.mount.mount: Unit etc-systemd-system-media\x2djulian\x2dDEMETER.mount.mount not found.

I spoke too soon. For the moment I'll assume '\x2d' is a control code for '-'. Why it now says it cannot find the mount point it only just enabled is a mystery, the final hurdle though I hope! Is it saying 'mount.mount' for some oddball reason?


So close yet so far! The devil is in the details.

You've enabled the mount units, not the automount units (which are the ones you want). It doesn't look like you swiped those across from the working machine either when you were copying the mount units.

Also you don't enable systemd units by path, just by name. So you want to disable those three units again ('incorrectly' by path again, so just rerun the same three enable commands but change enable to disable) and then you'd enable them correctly with:

sudo systemctl enable media-julian-DEMETER.mount (etc)

But you don't want to do that, because you then want to create (or copy from the other machine) the automount units as well and then enable _them_.

I keep saying this but the Arch wiki as ever is terse, up to date and correct:

https://wiki.archlinux.org/index.php/NFS#automount

Use that as a reference if in doubt.

Don't forget that your shell history is one of your most valuable resources - presumably you've done all this previously (and successfully) on the other machine so if you ssh to it and use the history command you can root through your previous attempts to find all the working invocations you eventually used. Pipe history through grep (repeatedly) to narrow things down, it's a life saver.

history | grep systemctl | grep enable | grep mount

Lazier (after installing agrep):

history | agrep 'systemctl;enable;mount'

So far so good. After a couple of false starts I reread the above /properly/. The automount files had been copied over originally. Incidentally I found copies of all files on the laptop Home partition. I then enabled and started the automount files, but it's still not seeing the shares. I'll have another try later, sometimes it 'just works' on the second or third reboot.

Kind regards,

Julian

--
“The great tragedy of Science — the slaying of a beautiful hypothesis by an ugly 
fact.”

― Thomas Henry Huxley


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