背景
strace ls /data/aquaman ,到這個目錄就卡住 了
現(xiàn)在這臺機器執(zhí)行 df -h \ ls /data/aquaman 都卡住了
處理
目錄下有個目錄
/data/aquaman/whatsapp 為掛載的阿里云nas.
mount 輸出結(jié)果如下
7f8184a111-hvs85.ap-southeast-1.nas.aliyuncs.com:/ on /data/aquaman/whatsapp type nfs4 (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,noresvport,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=10.31.15.206,local_lock=none,addr=110.70.72.78)
- 強行刪除或者umount
sudo rm -rf /data/aquaman/whatsapp
sudo umount -f /data/aquaman/whatsapp
卡住無反應
- 查看文件占用
lsof # 卡住
(cd /proc; ls -d [0-9]* | xargs -n1 -i find {}/fd {}/cwd -type l -printf "{} %l\n") |grep /data/aquaman/wh
# 沒有文件占用
- 直接強制umount
root@ubuntu:/home/qiantao# fuser -m -k -i -v /data/aquaman/whatsapp
Cannot stat /data/aquaman/whatsapp: Input/output error
# 報錯無法使用
qiantao@ubuntu:~$ sudo umount -f /data/aquaman/whatsapp
umount.nfs4: /data/aquaman/whatsapp: device is busy
qiantao@ubuntu:~$ sudo umount -f -l /data/aquaman/whatsapp
Man Umount 查看f和l的參數(shù)說明如下:
-f, --force
Force an unmount (in case of an unreachable NFS system). (Requires kernel 2.1.116 or later.)
-l, --lazy
Lazy unmount. Detach the filesystem from the file hierarchy now, and clean up all references to this filesystem as soon as it is not busy anymore. (Requires kernel 2.4.11 or later.)