You are not logged in.
Hi folks,
I have a problem that I can't handle myself anymore.
I want to automount all samba shares and map them to local directories.
This is my /etc/fstab:
//192.168.1.2/Main /mnt/main cifs iocharset=utf8,sec=ntlmv2,uid=username,auto,credentials=/etc/smbcredentials 0 0
//192.168.1.2/Misc /mnt/misc cifs iocharset=utf8,sec=ntlmv2,uid=username,auto,credentials=/etc/smbcredentials 0 0
//192.168.1.2/Scanner /mnt/scanner cifs iocharset=utf8,sec=ntlmv2,uid=username,auto,credentials=/etc/smbcredentials 0 0
It works perfectly when invoking mount -a after a successfull system boot, but it does not mount anything when I start-up the system.
Any idea?
Offline
Anything in the journal?
Offline
Anything in the journal?
I have to appologize, but how do I find out, for what do I need to search? dmesg tells me nothing useful so far about anything with cifs.
Offline
journalctl -xb
with maybe grep mount to narrow it down.
Offline
Hey c3kay,
yeah I got the reason now (with your help!). This is one part of the log, relating to the /mnt/scanner mountpoint.
Oct 02 09:39:11 falcon systemd[1]: Mounting /mnt/scanner...
-- Subject: Unit mnt-scanner.mount has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mnt-scanner.mount has begun starting up.
Oct 02 09:39:11 falcon mount[501]: mount error(101): Network is unreachable
Oct 02 09:39:11 falcon mount[501]: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
So this is what I already tipped on... but how to tell systemd that it should do cifs mounts when the network is on?
The system is a Desktop PC standing in the office, so it is always connected to the LAN here.
Edit: The man-page gave no useful information about what to do when this error arrises.
Last edited by beachcoder (2015-10-02 10:02:36)
Offline
Try adding _netdev to the options in fstab.
Offline
Try adding _netdev to the options in fstab.
Sorry, this didn't do the trick. I also removed the "auto" option when providing "_netdev".
This is what the journal says now:
Oct 02 17:30:43 falcon systemd[1]: mnt-scanner.mount: Mount process exited, code=exited status=32
Oct 02 17:30:43 falcon systemd[1]: Failed to mount /mnt/scanner.
-- Subject: Unit mnt-scanner.mount has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mnt-scanner.mount has failed.
--
-- The result is failed.
Oct 02 17:30:43 falcon systemd[1]: Dependency failed for Remote File Systems.
-- Subject: Unit remote-fs.target has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit remote-fs.target has failed.
--
-- The result is dependency.
Oct 02 17:30:43 falcon systemd[1]: remote-fs.target: Job remote-fs.target/start failed with result 'dependency'.
Oct 02 17:30:43 falcon systemd[1]: mnt-scanner.mount: Unit entered failed state.
Offline
Does using automount as described here help?
Offline