OpenSuse 13.1 cifs+fstab trouble

Hi, i notice that on my OpenSuse13.1 i can’t mount cifs in fstab at boot.

  • /etc/fstab content:
  • //192.168.0.150/data /mnt/cifs/host1 cifs username=user1,password=password,uid=1000,gid=100,iocharset=utf8,sec=ntlm 0 0*

For mount it after boot, i had to force with */etc/init.d/cifs start *or mount -a

So, i tried to activate cifs service at boot with chkconfig cifs on but unsuccessful, although the system has loaded correctly:

chkconfig cifs

cifs on

and command is created ‘S50cifs’ links to rc3.d and rc5.d

I have this problem with cifs+fstab only with OpenSuse, otherwise with debian/centos it works normally.

Has anyone had the same problem and how is possible to solve it properly?

Thanks in advance

You shouldn’t have to enable any cifs service, the line in the fstab should be enough.
Maybe the network is not up yet, when it gets mounted?

Try adding _netdev to the mount options:

_netdev The filesystem resides on a device that requires network access (used to prevent the system from attempting to mount these filesystems until the network has been enabled on the system).

And try switching to ifup if you’re using NetworkManager. (YaST->Network Devices->Network Settings->Global Options)

On 2013-11-22, vittoriomilazzo <vittoriomilazzo@no-mx.forums.opensuse.org> wrote:
>
> Hi, i notice that on my OpenSuse13.1 i can’t mount cifs in fstab at
> boot.
>
> - /etc/fstab content:
> - //192.168.0.150/data /mnt/cifs/host1 cifs
> username=user1,password=password,uid=1000,gid=100,iocharset=utf8,sec=ntlm
> 0 0-
>

Try activating cifs using YaST. To my knowledge you first need to…


sh-4.2$ su -c "zypper in yast2-runlevel"

… open YaST, click on `System Services (Runlevel)’, make sure cifs is enabled for all runlevels then:


sh-4.2$ su -c "mount -a"

… and if should be mounted if the /mnt/cifs/host1 directory exists.

I looked logs and yes, problem was that network was down while the system was reading fstab at boot.

*/var/log/messages
2013-11-22T16:01:05.135887+01:00 opensuse kernel: 20.668080] CIFS VFS: cifs_mount failed w/return code = -101
2013-11-22T16:01:05.136019+01:00 opensuse cifs[759]: from /etc/fstab .mount error(101): Network is unreachable
*
As default, network was controlled from NetworkManager. So, i switched network control from Yast using “traditional method with ifup”.

Now at boot, system has network up while it read fstab and it mount properly cifs network share.

Thanks wolfi323