You are not logged in.

#1 2015-10-01 11:49:15

beachcoder
Member
Registered: 2009-10-08
Posts: 130

cifs samba shares not auto-mounted via fstab

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

#2 2015-10-01 13:05:05

c3kay
Member
From: New Zealand
Registered: 2015-04-19
Posts: 61

Re: cifs samba shares not auto-mounted via fstab

Anything in the journal?

Offline

#3 2015-10-01 13:14:10

beachcoder
Member
Registered: 2009-10-08
Posts: 130

Re: cifs samba shares not auto-mounted via fstab

c3kay wrote:

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

#4 2015-10-01 18:25:49

c3kay
Member
From: New Zealand
Registered: 2015-04-19
Posts: 61

Re: cifs samba shares not auto-mounted via fstab

journalctl -xb

with maybe grep mount to narrow it down.

Offline

#5 2015-10-02 10:00:51

beachcoder
Member
Registered: 2009-10-08
Posts: 130

Re: cifs samba shares not auto-mounted via fstab

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

#6 2015-10-02 11:29:50

c3kay
Member
From: New Zealand
Registered: 2015-04-19
Posts: 61

Re: cifs samba shares not auto-mounted via fstab

Try adding _netdev to the options in fstab.

Offline

#7 2015-10-02 15:36:50

beachcoder
Member
Registered: 2009-10-08
Posts: 130

Re: cifs samba shares not auto-mounted via fstab

c3kay wrote:

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

#8 2015-10-02 22:54:34

c3kay
Member
From: New Zealand
Registered: 2015-04-19
Posts: 61

Re: cifs samba shares not auto-mounted via fstab

Does using automount as described here help?

https://bbs.archlinux.org/viewtopic.php?id=149830

Offline

Board footer

Powered by FluxBB