我使用的是 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
,但仍然提示“主机已关闭”。只有重启才能解决。
如何让它在遥控器再次启动后停止抛出“主机已关闭”?