![CIFS 挂载保持返回主机已关闭,即使没有](https://linux22.com/image/893291/CIFS%20%E6%8C%82%E8%BD%BD%E4%BF%9D%E6%8C%81%E8%BF%94%E5%9B%9E%E4%B8%BB%E6%9C%BA%E5%B7%B2%E5%85%B3%E9%97%AD%EF%BC%8C%E5%8D%B3%E4%BD%BF%E6%B2%A1%E6%9C%89.png)
我使用的是 Ubuntu 16.04。我按照说明进行操作这里我使用以下命令挂载两个文件夹/etc/fstab
//192.168.1.227/folder1 /media/folder1 cifs credentials=/home/username/.smbcredentials,iocharset=utf8,sec=ntlm 0 0
//192.168.1.227/folder2 /media/folder2 cifs credentials=/home/username/.smbcredentials,iocharset=utf8,sec=ntlm 0 0
首先,坐骑是在职的。但是,如果我ls
在远程关闭的情况下访问文件夹 1(例如),它会抛出“主机已关闭”并且即使远程已启动也会继续抛出。(文件夹 2 在相同的远程且可达)如果在遥控器关闭时我什么都不做,那么一切都很好。
例如,
folder1 & folder2 on Remote1
ls in /media/folder1 → Everything OK
ls in /media/folder2 → Everything OK
↓
Remote1 down
ls in /media/folder1 → "host is down"
↓
Remote1 up
ls in /media/folder1 → "host is down"
ls in /media/folder2 → Everything OK
↓
mount -a
ls in /media/folder1 → "host is down"
ls in /media/folder2 → Everything OK
↓
Reboot
ls in /media/folder1 → Everything OK
ls in /media/folder2 → Everything OK
这两个文件夹都出现了这种情况。我试过了mount -a
,但仍然提示“主机已关闭”。只有重启才能解决。
如何让它在遥控器再次启动后停止抛出“主机已关闭”?