判断
判断
mount | grep nfs
showmount -e <NFS服务器> 2>/dev/null || echo '不通或未装 nfs-utils'
ping -c2 <NFS服务器>
dmesg -T | tail -20 # 内核侧 NFS 报错恢复与卸载
恢复与卸载
systemctl restart nfs-client.target 2>/dev/null || true
umount -f /mnt/nfs # 强制卸载(评估影响)
# 长期方案:评估 soft、timeo、retrans 与 _netdev 等挂载参数
# fstab 示例:
# <server>:/exp /mnt/nfs nfs defaults,_netdev,soft,timeo=100,retrans=2 0 0soft 选项以错误返回替代永久等待,但有数据一致性取舍:完在测试环境验证再上生产。