今天在卸載磁盤時報錯
[root@cosmo-lt-03 ~]# umount /data
umount: /data: target is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
報錯原因:
報錯描述很明顯,還有別的進程在對磁盤進行讀寫
解決辦法:
fuser -m -v /dev/vdb
然后kill -9 進程ID
如果沒有此命令,則安裝
yum install -y psmisc
或者使用:
lsof |grep /data
然后同樣kill -9 進程ID
如果沒有此命令,則安裝
yum install -y lsof
Linux查看掛載的三種方式
# 方法1
df -Th
# 方法2
mount -l
# 方法3
cat /etc/mtab
然后就可以接着進行卸載了