I was successful in mounting a number of samba shares by following swerdnas great tutorial. But what is irritating me, is that the following kernel warning is logged in /var/log/warn:
MYLINUX kernel: CIFS: Unknown mount option _netdev
Also I cannot find the “_netdev” option in man mount.cifs…
The bottom of my fstab looks like this:
//192.168.178.22/movies /mnt/abyss/movies cifs credentials=/home/hardy/.smb_creds,_netdev 0 0
//192.168.178.22/music /mnt/abyss/music cifs credentials=/home/hardy/.smb_creds,_netdev 0 0
//192.168.178.22/photos /mnt/abyss/photos cifs credentials=/home/hardy/.smb_creds,_netdev 0 0
//192.168.178.22/public /mnt/abyss/public cifs credentials=/home/hardy/.smb_creds,_netdev 0 0
Did this option become obsolete with later kernel versions? I do run 2.6.27.21-0.1-pae.
Another question related to that option:
If the samba server is off-line, the mounting is retried endlessly - I believe.
Is there any possibility to limit the period/number of retries to like x minutes?
Interesting. Regarding the _netdev option. Here’s a quote from “man mount”:
_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).
But it is a puzzle about the message in /var/log/warn. I’ll look into it.
Regarding the repeated attempts to remount – I didn’t know that. I’ll look into that too.
May take some time. I hope someone else knows something re these and chimes in.
@swerdna
I am sorry, I have to correct myself: The retries are NOT endlessly, but rather limited to like 2 minutes. Sorry for that!
I was just irritated by the many /var/log/warn entries:
kernel: CIFS VFS: Error connecting to socket. Aborting operation
kernel: CIFS VFS: cifs_mount failed w/return code = -111
I believe, that giving up after like 2 minutes is quite reasonable.
I’d like to know the answer too. I couldn’t get smb shares to auto load on one system. _netdev made no difference. Finally I found that the service smbfs needs to be autostarted. All that does is search the fstab file for cifs and smb and mount those after the network is up.
So not sure if _netdev is actually used in suse. But I left it in there in case.
There might be a bug in 11.1 that I had not noticed. Mounting cifs shares at boot time in openSUSE needs smbfs turned on it Yast → System Services (runlevel).
But I just looked in my 11.1 installation and even though this daemon is switched on, it does not achieve the “on” state when openSUSE 11.1 boots. Consequently it fails to “search the fstab file for cifs and smb and mount those after the network is up” as oldcraft noted.
There might well be a bug in 11.1 around this issue. I’ll try to check that out during the next week.
Regarding this comment:
So not sure if _netdev is actually used in suse. But I left it in there in case.
It was necessary in the first implementations of cifs in Suse (when it first replaced smbfs – aroung 10.2 I think). And I have left it there since then – but now that oldcraft has brought that up, I too wonder if _netdev is used in the modern openSUSE releases. Another thing to check out, sheesh the goalposts keep moving.