df -h執行卡住不動問題解決【轉】
阿新 • • 發佈:2018-01-11
client ali add tco gid sin per logs misc
昨天生產環境報日誌寫不進去了,因此 登陸線上環境後,習慣用df -h命令查看空間使用情況,結果發現該命令執行半天也沒有返回。
因此使用mount命令查看該機器上的目錄:
[conversant@swiftmedia-esc ~]$ mount /dev/mapper/VolGroup-lv_root on / type ext4 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw) /dev/sda1 on /boot type ext4 (rw) /dev/mapper/VolGroup-lv_home on /home type ext4 (rw) /dev/mapper/VolGroup-lv_var on /var type ext4 (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) 203.116.18.239:/opt/storage-escape on /opt/storage-scms type nfs (rw,addr=203.116.18.239) 203.116.18.239:/opt/storage-escape on /opt/storage-escape type nfs (rw,addr=203.116.18.239) 203.116.18.239:/ta/data/swiftcoder/input/local/escape on /ta/data/swiftcoder/input/local/escape type nfs (rw,vers=4,addr=203.116.18.239,clientaddr=203.116.18.233)
發現有三個nfs目錄,因此登陸203.116.18.239 查看目錄問題 發現/ta/data/swiftcoder/input/local/escape 這個目錄已經被刪除了
因此使用umount命令來卸載
umount
umount -l /ta/data/swiftcoder/input/local/escape來卸載設備。選項 –l 並不是馬上umount,而是在該目錄空閑後再umount。
device is busy
fuser :identify processes using files or sockets
fuser -m -v /ta/data/swiftcoder/input/local/escape
fuser -m -v -i -k /ta/data/swiftcoder/input/local/escape 使用i參數會問你是否kill掉這個某個進程,按y就把它kill了。
lsof |grep ‘ta/data’
kill –9 pid
轉自
df -h執行卡住不動問題解決 - lily-tiantian - 博客園 https://www.cnblogs.com/lily-tiantian/p/4806751.html
df -h執行卡住不動問題解決【轉】