D&C GLug - Home Page

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

Re: [LUG] Merry Christmas All.. automount problem with kernel 4.13 on Mint 18.3

 

On 29/12/17 19:10, Julian Hall wrote:
On 29/12/17 17:26, mr meowski wrote:
On 29/12/17 17:01, Peter Walker wrote:
Mount at boot was the behaviour prior to kernel 4.13 and /is/ the desired behaviour.
No worries. I was just confused by the automount terminology and thought you were aiming at something like this 
https://wiki.archlinux.org/index.php/NFS#Mount_using_.2Fetc.2Ffstab_with_systemd
Well, that's definitely what he _should_ be doing but to be fair Mint
might have broken something subtly somewhere, which is kind of the problem.

Julian, can we try doing this the 'proper' systemd way just to test to
see if something else is going wrong there? Backup your fstab and then
modify it to contain the following:

# systemd mount CASSIOPEIA on NAS
192.168.1.3:/volume1/CASSIOPEIA /media/julian/CASSIOPEIA nfs
auto,x-systemd.automount,x-systemd.device-timeout=10 0 0

We'll just do one NFS mount at a time to start with. This'll specify
automatic mount at boot rather than on-demand, hand control to systemd
and specify a maximum wait of 10 seconds in case something does go wrong
during the mount. systemd should automatically take care of the boot
order now it's aware that it's responsible for handling them so we
shouldn't need to set the wait-online.service (but we will if we have to
later).
That is what I did before posting my last reply about it messing up my desktop by putting two icons for every mount and then deleting the duplicates after thirty seconds. I'll do it again though to follow your instructions fully. I used the example line on ArchWiki though so I'll follow yours this time.

OK starting from a clean boot with no shares loaded, fstab set back as it was not loading anything:
Unmount any of your NFS shares first, and make systemd aware of the changes:

sudo systemctl daemon-reload
julian@Cerce ~ $ sudo systemctl daemon-reload
[sudo] password for julian:
julian@Cerce ~ $
Check the new systemd managed mount-point:

sudo systemctl status /media/julian/CASSIOPEIA
julian@Cerce ~ $ sudo systemctl status /media/julian/CASSIOPEIA
â media-julian-CASSIOPEIA.mount - /media/julian/CASSIOPEIA
ÂÂ Loaded: loaded (/etc/fstab; bad; vendor preset: enabled)
ÂÂ Active: failed (Result: exit-code) since Fri 2017-12-29 18:51:55 GMT; 6min ag
ÂÂÂ Where: /media/julian/CASSIOPEIA
ÂÂÂÂ What: 192.168.1.3:/volume1/CASSIOPEIA
ÂÂÂÂ Docs: man:fstab(5)
ÂÂÂÂÂÂÂÂÂÂ man:systemd-fstab-generator(8)

Dec 29 18:51:55 Cerce systemd[1]: Mounting /media/julian/CASSIOPEIA...
Dec 29 18:51:55 Cerce mount[1584]: mount.nfs: Network is unreachable
Dec 29 18:51:55 Cerce systemd[1]: media-julian-CASSIOPEIA.mount: Mount process e
Dec 29 18:51:55 Cerce systemd[1]: Failed to mount /media/julian/CASSIOPEIA.
Dec 29 18:51:55 Cerce systemd[1]: media-julian-CASSIOPEIA.mount: Unit entered fa
Warning: media-julian-CASSIOPEIA.mount changed on disk. Run 'systemctl daemon-re
lines 1-14/14 (END)

Restart the unit and check again:

sudo systemctl restart /media/julian/CASSIOPEIA
sudo systemctl status /media/julian/CASSIOPEIA
*rebooted*

julian@Cerce ~ $ sudo systemctl restart /media/julian/CASSIOPEIA
[sudo] password for julian:
julian@Cerce ~ $ sudo systemctl status /media/julian/CASSIOPEIA
â media-julian-CASSIOPEIA.mount - /media/julian/CASSIOPEIA
ÂÂ Loaded: loaded (/etc/fstab; bad; vendor preset: enabled)
ÂÂ Active: active (mounted) since Fri 2017-12-29 19:03:08 GMT; 20s ago
ÂÂÂ Where: /media/julian/CASSIOPEIA
ÂÂÂÂ What: 192.168.1.3:/volume1/CASSIOPEIA
ÂÂÂÂ Docs: man:fstab(5)
ÂÂÂÂÂÂÂÂÂÂ man:systemd-fstab-generator(8)
 Process: 2969 ExecMount=/bin/mount 192.168.1.3:/volume1/CASSIOPEIA /media/juli

Dec 29 19:03:08 Cerce systemd[1]: Mounting /media/julian/CASSIOPEIA...
Dec 29 19:03:08 Cerce systemd[1]: Mounted /media/julian/CASSIOPEIA.
You should see a successfully loaded unit and have a live filesystem
mounted under /media/julian/CASSIOPEIA - check and see. If there is an
issue the status command will tell you what's wrong. If all is well,
reboot and make sure everything works as expected. If not, report back.
Mounted properly as per instructions, but did not survive a reboot.
Can I also check to make sure you haven't got anything conflicting
lurking around like autofs for example?

dpkg -i | grep autofs
julian@Cerce ~ $ sudo dpkg -i | grep autofs
[sudo] password for julian:
dpkg: error: --install needs at least one package archive file argument

That doesn't seem to want to play.

Kind regards,

Julian


Very quick update.. just come back in and started the computer.. now I have two CASSIOPEIAs on the desktop, a drive icon and a network share icon as in my earlier screenshots.

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