Windows cifs share will not mount on startup

Latest response

Hi All, I've got an issue that I know I must be overlooking the simple solution to.

I've setup a cifs share to mount to my RHEL 7.2 system using /etc/fstab, below is the entry in the fstab:

//192.168.20.10/Share /mnt/reportshare cifs vers=2.0,credentials=<custom credentials file path here> 0 0

I also added the following line to my /etc/samba/smb.conf file under the [global] sections:

min protocol = SMB2

When the system starts up I consistently get these two lines right at the end of my 'dmesg' output:

[ 32.220097] CIFS VFS: Error connecting to socket. Aborting operation.
[ 32.220320] CIFS VFS: cifs_mount failed w/return code = -115

when I try to troubleshoot with smbclient I get the following output to the listed command:

# smbclient //192.168.20.10/Share -U <username here>

OUTPUT:
protocol negotiation failed: NT_STATUS_CONNECTION_RESET

Finally, when I run "mount -a " as root after startup the Windows share mounts as expected from the /etc/fstab entry.

For the life of me I cannot find a reason why the share will not mount at startup. There has got to be something simple that I am overlooking - any help would be appreciated!

Responses

It may be that the mounts are done before the networking is up, maybe add _netdev to the mount options?

Hi Chris, I did try that in earlier attempts but _netdev didn't change anything. I also found a few sources that claimed it only worked with nfs and doesn't help with cifs.

Another option - have a look at adding noauto,x-systemd-automount to the fstab to convert it to an automount filesystem. The systemd-automount man page has a little bit of detail but a google search will probably be more useful.

That did it! I added noauto,x-systemd-automount to my fstab entry and the mount connected after bootup with no errors in the dmesg log! Thank you so much for the suggestion!

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.