RHEL 6 server receiving error mounting CIFS (Windows) share – mount error(112): Host is down
When mounting a CIFS (Windows) share, I’m receiving an error saying the host is down
root@linux:~ # mount /mnt/test
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
This is the share in /etc/fstab
root@linux:~ # cat /etc/fstab
//10.0.0.1/CIFS$ /mnt/test cifs _netdev,user=appuser,pass=1234,uid=21376,gid=252,file_mode=0775,dir_mode=0775,domain=windows
I’m running a RHEL 6.9 server
root@linux:~ # cat /etc/*release
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Red Hat Enterprise Linux Server release 6.9 (Santiago)
Red Hat Enterprise Linux Server release 6.9 (Santiago)
This problem happened because the storage was upgraded and it is using SMB2. You need to have at least kernel 3.7 to have support for SMB2
SMB shares fail to mount with the SMB2 protocol
Remove ^M (Control-M) characters from a file in Unix
When checking my /etc/multipath.conf file, there was a lot of hidden characters ^M at the end of lines
root@linux:~ # cat -vet /etc/multipath.conf
To remove them, use tr and redirect the output to a new file.
root@linux:~ # tr -d ‘\015’ < /tmp/multipath.conf
Check the file and if everything is okay, replace the original file
root@linux:~ # tr -d ‘\015’ < /tmp/multipath.conf > /tmp/multipath.conf.new
root@linux:~ # cat -vet /tmp/multipath2.conf.new
root@linux:~ # mv /tmp/multipath2.conf.new /tmp/multipath.conf