When attempting to mount a CIFS share using the standard command:
mount -t cifs //nas.domain.local/share /mnt/archive
You encounter a "Host is down" error, despite basic connectivity tests working fine:
ping nas.domain.local
smbclient //nas.domain.local/share
The discrepancy between ping/smbclient working and mount failing typically indicates one of several issues:
- SMB protocol version mismatch
- Incorrect credentials or security settings
- Outdated CIFS utilities
- Firewall blocking required ports
- DNS resolution timing issues
Solution 1: Specify SMB protocol version explicitly
mount -t cifs //nas.domain.local/share /mnt/archive -o vers=3.0
Try different versions (2.1, 3.0, 3.1.1) to find what works with your NAS.
Solution 2: Add verbose logging
mount -t cifs //nas.domain.local/share /mnt/archive -o debug
Check system logs (dmesg
or /var/log/messages
) for more details.
Solution 3: Test with IP instead of hostname
mount -t cifs //192.168.1.100/share /mnt/archive
This bypasses potential DNS issues.
If basic solutions don't work, consider these deeper checks:
# Check supported SMB versions
smbclient -L //nas.domain.local -m SMB3
# Verify kernel CIFS module
modprobe cifs
lsmod | grep cifs
# Test with full credentials syntax
mount -t cifs //nas.domain.local/share /mnt/archive -o username=user,password=pass,domain=DOMAIN
Once working, add to /etc/fstab for automatic mounting:
//nas.domain.local/share /mnt/archive cifs vers=3.0,credentials=/etc/smbcredentials,uid=1000,gid=1000 0 0
Create credentials file securely:
chmod 600 /etc/smbcredentials
echo "username=user
password=pass" > /etc/smbcredentials
If issues persist:
- Verify NAS firmware is updated
- Check for SELinux/AppArmor restrictions
- Test from another client to isolate the issue
- Consider Wireshark packet capture for protocol analysis
When dealing with CIFS mounts in Linux, you might encounter a situation where:
- The mount point directory exists but shows "?" for file attributes
- Basic connectivity tests (ping, smbclient) work fine
- The mount command fails with "Host is down" error
# Example of the failing command
mount -t cifs //nas.domain.local/share /mnt/archive -o username=user,password=pass
From my experience, this typically happens due to:
- SMB protocol version mismatch (client trying newer protocol than server supports)
- Firewall blocking required SMB ports (445 TCP and 137-139 UDP)
- Outdated or missing CIFS utilities
- DNS resolution issues despite ping working
1. Force specific SMB protocol version:
mount -t cifs //nas.domain.local/share /mnt/archive -o vers=2.1,username=user,password=pass
Try different versions (3.0, 2.1, 2.0, 1.0) until it works.
2. Verify SMB ports accessibility:
telnet nas.domain.local 445
nc -zv nas.domain.local 445
3. Check CIFS utilities version:
dpkg -l cifs-utils # Debian/Ubuntu
rpm -qa | grep cifs # RHEL/CentOS
Enable verbose logging:
mount -t cifs //nas.domain.local/share /mnt/archive -o username=user,password=pass,debug
dmesg | tail -20
Check kernel messages for CIFS errors:
journalctl -xe | grep -i cifs
For /etc/fstab entries, include protocol version:
//nas.domain.local/share /mnt/archive cifs vers=2.1,credentials=/etc/cifs.cred,uid=1000,gid=1000 0 0
Create credentials file (/etc/cifs.cred):
username=user
password=pass
domain=domain.local
If CIFS continues to fail, consider NFS or sshfs alternatives:
# NFS example
mount -t nfs nas.domain.local:/share /mnt/archive
# SSHFS example
sshfs user@nas.domain.local:/share /mnt/archive
Remember to check your server's SMB configuration (smb.conf) for any restrictions that might be causing the connection issues.