Samba shares do not mount at boot time

opesnSuse 11.1, linux 2.6.27.45-0.1-default x86_64

This host has two samba shares that are located on an OS/2 server. Neither mount at boot time but they do mount from the command line.

kernel: CIFS VFS: cifs_mount failed w/return code = -6

There are 5 other client computers that mount the same shares at boot time using almost (different user/pass info) identical data. I do not see what is different about this host.

The code means it’s not a valid share.

So I see two possibilities (and there could be more of course):

  • the code you put in fstab to mount the share is wrong

or

  • at the time the mount is executed, the network has not finished coming up, so cifs see the share as invalid (because the network isn’t up).

You can test the second dot point by booting up and wait one minute by your watch after logging on. Then run this console command:

sudo mount -a

That will run the mount command in fstab again. If the cifs mount executes correctly in that case, then it was a case of a slow network start, for which see the links below.

Check this tutorial: Samba: HowTo Mount a CIFS Network Share [AKA Map Network Drive] in openSUSE 11 plus FAQs
In particular, these sections might relate to your problem:
Setting the smbfs daemon (the CIFS mount helper daemon)
A permanent mount fails at boot time

Since the shares do mount at the command line, and I can unmount and re-mount them no problem, I’d say there is a network startup delay involved. (I wonder why? The other machines have the same motherboard, CPU and RAM.)

//sma-server1/pub-data  /t  cifs    credentials=/home/sma-user8/.smb/.smbpw,uid=sma-user8,gid=users,sec=lanman,file_mode=0664,dir_mode=0775,servern=SMA-SERVER1,nocase,noacl,noperm 0 0

I added “_netdev” at the end of the other options after “noperm.” mount did not like it:

kernel: CIFS: Unknown mount option _netdev

I’ll try the cron job option…

Maybe a flaky network card?

Miss configuration of samba may cause delayed/slow connections.

Maybe a flaky network card?

The network interface is built in to the motherboard, an RTL8196 unit. This all worked before I had to re-install the OS. (Something really bad happened and expunged the /home directory.)

Misconfiguration of samba may cause delayed/slow connections.

Like what? AFAIK the setup is the same.

To connect to an OS/2 server I needed to add “lm announce” and “client lanman auth” to the Global settings. This works on all the other hosts. And on this one as well, only not at boot time.

I thought that perhaps the samba configs may be different. There must be a reason and that is a good place to look as well as the card. You could put a sniffer in the network and see what is happening to the packets when the machine starts up.