现象:

[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命令进行查看。

Linux umount的device is busy问题的更多相关文章

  1. linux umount 提示device is busy 的解决

    linux umount 提示"device is busy" 终极解决 为了干净地关闭或热交换 UNIX 或类 UNIX 系统上的存储硬件,必须能够卸载使用此设备上的存储的所有文件系统.但是,如果正 ...

  2. centos重启报错Umounting file systems:umount:/opt:device is busy

    系统重启报错: Umounting file systems:umount:/opt:device is busy 只能硬关机,回想一下最近刚安装了nod32 for linux x64的杀毒软件,开 ...

  3. 解决umount: /home: device is busy

    取消挂载/home时出现umount: /home: device is busy,        原因是因为有程序在使用/home目录,我们可以使用fuser查看那些程序的进程,        然后 ...

  4. umount: /home: device is busy

    转自:umount: /home: device is busy 取消挂载/home时出现umount: /home: device is busy,原因是因为有程序在使用/home目录,我们可以使用 ...

  5. linux 卸载 umount 提示device is busy

    思路:先杀掉挂载的目录(如:/usr1/)这个进程 fuser -v /usr1/ 再卸载

  6. Ubuntu18.04 解决umount: /mnt: device is busy

    通过该命令查看那个进程占用该device fuser -m /mnt 然后 kill -9 PID 最后就可以umount /mnt 了

  7. umount nfs文件系统 显示 umount.nfs: device is busy

    网上的方法一般都是 fuser -m  /nfs 查出进程号,然后杀死进程号,或者fuser -km /nfs直接杀死,我试了下都不行 解决方法: 对于nfs文件系统来说,umount -l /nfs ...

  8. umount: /data: device is busy

    如果一个文件系统处于"busy"状态的时候,不能卸载该文件系统.如下情况将导致文件系统处于"busy"状态:1:文件系统上面有打开的文件2:某个进程的工作目录在 ...

  9. umount.nfs: device is busy解决办法

    fuser -km /app/nfs/ https://blog.csdn.net/x_i_y_u_e/article/details/42914817

随机推荐

  1. 2-Python3从入门到实战—基础之运算符

    Python从入门到实战系列--目录 Python语言支持以下类型的运算符: 算术运算符 比较(关系)运算符 赋值运算符 逻辑运算符 位运算符 成员运算符 身份运算符 运算符优先级 算术运算符 Pyt ...

  2. JS基础(二)数据类型

    一.标量类型 1.字符串string类型:字符串需要用定界符包裹.定界符:单引号(‘’),双引号(“”). 2.数字类型:1)整型:所有整数 2)浮点型:所有浮点数 3.boolean类型:返回tru ...

  3. 各小组Alpha版项目发布作品点评

    第一组:新蜂小组 题目:俄罗斯方块 评论:主体功能已经完成,可以流畅的进行游戏,游戏素材都是由贴图美化过的,期待计分系统等的完善. 第二组:天天向上 题目:连连看 评论:核心功能完成,可以流畅的进行游 ...

  4. Postgres数据库获取所有的索引信息的SQL

    Study From:https://blog.csdn.net/u013992330/article/details/73870734 SELECT A.SCHEMANAME, A.TABLENAM ...

  5. [转帖]技术盛宴 | 关于PoE以太网供电技术详解

    技术盛宴 | 关于PoE以太网供电技术详解 https://smb.pconline.com.cn/1208/12085824.html   [PConline 干货铺]随着物联网技术飞速发展,需要提 ...

  6. Python 零基础 快速入门 趣味教程 (咪博士 海龟绘图 turtle) 2. 变量

    大家在中学就已经学过变量的概念了.例如:我们令 x = 100,则可以推出 x*2 = 200 试试下面这段 Python 代码 import turtle turtle.shape("tu ...

  7. Java对象与Map间相互转换

    将Java对象转为一个Map,以及将map转为对应Java对象,代码如下: public class BeanMapUtil { private static ConcurrentHashMap< ...

  8. 如何让搜索引擎抓取AJAX内容?

    越来越多的网站,开始采用"单页面结构"(Single-page application). 整个网站只有一张网页,采用Ajax技术,根据用户的输入,加载不同的内容. 这种做法的好处 ...

  9. Session in BSU CodeForces - 1027F(思维 树 基环树 离散化)

    题意: 有n门考试,每门考试都有两个时间,存在几门考试时间冲突,求考完所有的考试,所用的最后时间的最小值 解析: 对于时间冲突的考试 就是一个联通块 把每个考试看作边,两个时间看作点,那么时间冲突的考 ...

  10. UVa 10305 - Ordering Tasks (拓扑排序裸题)

    John has n tasks to do. Unfortunately, the tasks are not independent and the execution of one task i ...