现象:sshfs总是断连,访问mount点,出现 ls: cannot access 'sshfs': Input/output error
原因初探:是底层的ssh连接session断开
解决:想办法保持底层ssh连接session长连接。有很多方式,最简单、最直接的,就是为sshfs提供ssh连接选项 “ServerAliveInterval”
as of:
#sshfs -o sshfs_sync,reconnect,ServerAliveInterval=60 sshfs@10.1.101.3:/data/data1 /sshfs
#sshfs -o sshfs_sync,reconnect,ServerAliveInterval=60 sshfs@10.1.101.3:/data/data1 /sshfs
#sshfs -o sshfs_sync,reconnect,ServerAliveInterval=60 sshfs@10.1.101.3:/data/data1 /sshfs
#sshfs -o sshfs_sync,reconnect,ServerAliveInterval=60 sshfs@10.1.101.3:/data/data1 /sshfs
#sshfs -o sshfs_sync,reconnect,ServerAliveInterval=60 sshfs@10.1.101.3:/data/data1 /sshfs
#sshfs -o sshfs_sync,reconnect,ServerAliveInterval=60 sshfs@10.1.101.3:/data/data1 /sshfs