背景
strace ls /data/aquaman
鹰贵,到這個(gè)目錄就卡住 了
現(xiàn)在這臺(tái)機(jī)器執(zhí)行 df -h \ ls /data/aquaman
都卡住了
處理
目錄下有個(gè)目錄
/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)
- 強(qiáng)行刪除或者umount
sudo rm -rf /data/aquaman/whatsapp
sudo umount -f /data/aquaman/whatsapp
卡住無(wú)反應(yīng)
- 查看文件占用
lsof # 卡住
(cd /proc; ls -d [0-9]* | xargs -n1 -i find {}/fd {}/cwd -type l -printf "{} %l\n") |grep /data/aquaman/wh
# 沒(méi)有文件占用
- 直接強(qiáng)制umount
root@ubuntu:/home/qiantao# fuser -m -k -i -v /data/aquaman/whatsapp
Cannot stat /data/aquaman/whatsapp: Input/output error
# 報(bào)錯(cuò)無(wú)法使用
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ù)說(shuō)明如下:
-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.)