NFS 服务端不回包时客户端会一直重试,挂载点被扫到就卡住,df、ls 都卡死。
挂载时把超时调小让它尽快失败:timeo 单位 0.1 秒,retrans 控制重试次数。
卡住的挂载用 umount 带 -f -l 强制延迟卸载解套,否则先停掉依赖它的服务。
软挂载写失败不报错,只建议用于只读共享。
mount -t nfs -o hard,timeo=50,retrans=2 10.0.0.5:/data /mnt/data
mount -t nfs -o soft,timeo=30,retrans=2 10.0.0.5:/data /mnt/data
umount -f -l /mnt/data
cat /proc/mounts | grep nfs
THE END






暂无评论内容