现象:

[root@dbserver ~]# df -h
文件系统 容量 已用 可用 已用%% 挂载点
/dev/vda1 9.9G 3.9G 5.6G 41% /
tmpfs 3.9G 100K 3.9G 1% /dev/shm
/dev/sr0 368K 368K 0 100% /media/CDROM
/dev/vdb 197G 5.9G 181G 4% /mnt

[root@dbserver /]# umount /dev/vdb
umount: /mnt: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))

原因:

其他进程可能在使用/mnt目录。

解决办法:

关闭使用该目录的进程,然后再umount。

[root@dbserver /]# fuser -m /dev/vdb
/dev/vdb: 3052c

[root@dbserver /]# ps aux |grep 3052
root 2218 0.0 0.0 163052 1648 ? Sl 10:30 0:00 gnome-keyring-daemon --start
root 3052 0.0 0.0 108328 1732 pts/1 Ss+ 11:12 0:00 -bash

root 3448 0.0 0.0 6384 708 pts/5 S+ 12:59 0:00 grep 3052

[root@dbserver /]# kill -9 3052
[root@dbserver /]# ps aux |grep 3052
root 2218 0.0 0.0 163052 1648 ? Sl 10:30 0:00 gnome-keyring-daemon --start
root 3453 0.0 0.0 6384 704 pts/5 S+ 13:00 0:00 grep 3052
[root@dbserver /]#

[root@dbserver /]# umount /dev/vdb
[root@dbserver /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 9.9G 1.4G 8.0G 15% /
tmpfs 3.9G 100K 3.9G 1% /dev/shm
/dev/sr0 368K 368K 0 100% /media/CDROM

-------------------------------------------------------------------------------------------------------------------------------------------------------------------

另一种解决方案====>

这种问题解决方案:

一、查找使用这个文件的进程和命令,具体的操作代码

[root@localhost ~]# lsof |grep /mnt/net1
lsof: WARNING: can't stat() cifs file system /mnt/net1
      Output information may be incomplete.
bash      18841      root  cwd   unknown                                            /mnt/net1/TDDOWNLOAD/软件 (stat: No such device)

二、然后执行ps命令可以查找执行此进程的命令

[root@localhost ~]# ps -ef|grep 18841
root     18841 18839  0 Nov29 pts/2    00:00:00 /bin/bash -l
root     29496 25604  0 16:26 pts/0    00:00:00 grep 18841

三、强行结束无关进程

[root@localhost ~]# kill -9 18841

四、然后卸载相关挂载

[root@localhost ~]# umount /mnt/net1

五、然后可以在功过mount命令进行查看。

最新文章

  1. python网络编程-TCP协议中的三次握手和四次挥手(图解)
  2. Java注释
  3. Cordova 讲义 1 – 周金根
  4. mysql 的 find_in_set函数使用方法
  5. C++中的运算符重载
  6. iOS常用define宏定义
  7. ECharts案例教程1
  8. gcc的使用
  9. java运算符 与(&)、非(~)、或(|)、异或(^)
  10. POJ [P2631] Roads in the North
  11. node服务端口被占用Error listen EADDRINUSE :::3000
  12. Loadrunner进行HTTPS协议性能测试
  13. 通过DFS求解有向图(邻接表存储)中所有简单回路
  14. Coding and Paper Letter(五十八)
  15. JS_高程7.函数表达式(2)递归
  16. C# Task ContinueWith的实现
  17. Python 爬虫实例(9)—— 搜索 爬取 淘宝
  18. 关于Kafka java consumer管理TCP连接的讨论
  19. sql server 查看所有表记录数
  20. spring mvc请求过程

热门文章

  1. 利用mask-image蒙层编写异形头像
  2. PHP 爬虫——QueryList
  3. 八大排序算法的python实现
  4. 如何将adoquery中的数据复制到 Ttable 中
  5. Shell命令——文件目录
  6. UOJ#424 【集训队作业2018】count
  7. BZOJ1815 SHOI2006有色图(Polya定理)
  8. 【刷题】BZOJ 4543 [POI2014]Hotel加强版
  9. net 和Mono 构建的HTTP服务框架
  10. 学习Spring Boot:(十三)配置 Shiro 权限认证