You are not logged in.
Pages: 1
Topic closed
Hi,
I have the following line in /etc/fstab:
//192.168.16.21/home /home/wolf/ds01_wolf cifs auto,nofail,x-systemd.automount,x-systemd.requires=network-online.target,x-systemd.device-timeout=10,workgroup=workgroup,credentials=/etc/smbcreds2,sec=ntlmv2 0 0
Which I can mount with
sudo mount ds01_wolf
but it doesn't mount at boot.
I believe the share should be mounting at boot based on the above, but am I missing something?
Also, automount should mount on access, but if I run
ls ds01_wolf
I see an empty directory which suggests that isn't working either?
I've done some research about fstab, systemd.mount/automount and am prepared to do more but would appreciate some pointers as to where to start, please.
Last edited by roguewolf (2016-01-28 15:48:20)
Offline
I would guess that systemd is trying to mount it too early, although I see you have passed some options in this sense. You should examine the content of journalctl. Also, in order to diagnose the problem, remove the option nofail, so that it would be easier to see when/why it fails.
Offline
Thanks Olive.
I wondered about the too-early mount but assumed that the x-systemd.requires=network-online.target option would avoid that issue?
journalctl isn't showing any errors concerning mount/automount - or anything else that looks related - even after removing the nofail option.
All further suggestions gratefully received
Offline
I've managed to solve the issue by manually creating unit files for the mounts in /etc/systemd/system; e.g.:
[Unit]
Description = My share
[Mount]
What = //192.168.16.21/home
Where = /home/wolf/ds01_wolf
Type = cifs
Options = uid=wolf,gid=users,credentials=/etc/smbcreds2
[Install]
WantedBy = multi-user.target
Then enabling them with:
systemctl enable home-wolf-ds01_wolf.mount
Which causes them to mount successfully at boot.
The only 'downside', is that if I want/need to mount them manually I have to do so with:
systemctl start home-wolf-ds01_wolf.mount
instead of:
mount ds01_wolf
It just remains to try to determine what caused the fstab version to fail to mount at boot. I suspect it might be down to something in the fstab entry's options as the Options in the unit file's [Mount] section are reduced in comparison.
Offline
Stripped to make a new thread, but this link is useful to have here.
https://unix.stackexchange.com/question … ame#345518
Last edited by Noki (2018-06-20 00:10:40)
Offline
Please do not necrobump old threads, especially solved ones. If you are still having the same problem, please open a new thread and describe the errors and what you have done in detail.
Offline
OK sure thing.
Offline
Closing
Offline
Pages: 1
Topic closed