nfs服务端服务停掉,导致的客户端访问挂载目录卡死的情况

By | 2018年2月11日

环境描述:

A 机器(192.168.1.201), B机器上挂载了A机器上的storage目录 到本机的storage目录(命令: mount -t nfs 192.168.1.201:/storage /storage)

故障原因:

现在因 A机器因故障无法访问,登录B机器以后执行mount ,df -h ,ll /storage 等关于/storage挂载点的时候都会卡主,ctrl + c 、 ctrl + z 都不能结束,只能退出重新登录。

解决方法:

[root@Image-Web ~]# umount -f /storage

umount2: Device or resource busy

umount: /storage: device is busy

umount2: Device or resource busy

umount: /storage: device is busy

[root@Image-Web ~]# umount -f /storage

umount2: Device or resource busy

umount: /storage: device is busy

umount2: Device or resource busy

umount: /storage: device is busy

[root@Image-Web ~]# umount -f /storage

umount2: Device or resource busy

umount: /storage: device is busy

umount2: Device or resource busy

umount: /storage: device is busy

[root@Image-Web ~]# umount -f /storage

umount2: Device or resource busy

umount: /storage: device is busy

umount2: Device or resource busy

umount: /storage: device is busy

[root@Image-Web ~]# umount -f /storage

umount2: Device or resource busy

umount: /storage: device is busy

umount2: Device or resource busy

umount: /storage: device is busy

[root@Image-Web ~]# umount -f /storage

umount2: Device or resource busy

umount: /storage: device is busy

umount2: Device or resource busy

umount: /storage: device is busy

[root@Image-Web ~]# umount -f /storage

umount2: Device or resource busy

umount: /storage: device is busy

umount2: Device or resource busy

umount: /storage: device is busy

[root@Image-Web ~]# umount -f /storage

umount2: Device or resource busy

umount: /storage: device is busy

[root@Image-Web ~]# umount -f /storage

umount2: Invalid argument

umount: /storage: not mounted

前面貌似执行umount -f /storage 强制卸载时不起作用的,但是最后是能卸载掉的!!!

有人说为了避免这个问题,挂载的时候要加和上soft选项。(没亲自试过)

Category: os

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注