Linux umount的device is busy问题
现象:
[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问题的更多相关文章
- linux umount 提示device is busy 的解决
linux umount 提示"device is busy" 终极解决 为了干净地关闭或热交换 UNIX 或类 UNIX 系统上的存储硬件,必须能够卸载使用此设备上的存储的所有文件系统.但是,如果正 ...
- centos重启报错Umounting file systems:umount:/opt:device is busy
系统重启报错: Umounting file systems:umount:/opt:device is busy 只能硬关机,回想一下最近刚安装了nod32 for linux x64的杀毒软件,开 ...
- 解决umount: /home: device is busy
取消挂载/home时出现umount: /home: device is busy, 原因是因为有程序在使用/home目录,我们可以使用fuser查看那些程序的进程, 然后 ...
- umount: /home: device is busy
转自:umount: /home: device is busy 取消挂载/home时出现umount: /home: device is busy,原因是因为有程序在使用/home目录,我们可以使用 ...
- linux 卸载 umount 提示device is busy
思路:先杀掉挂载的目录(如:/usr1/)这个进程 fuser -v /usr1/ 再卸载
- Ubuntu18.04 解决umount: /mnt: device is busy
通过该命令查看那个进程占用该device fuser -m /mnt 然后 kill -9 PID 最后就可以umount /mnt 了
- umount nfs文件系统 显示 umount.nfs: device is busy
网上的方法一般都是 fuser -m /nfs 查出进程号,然后杀死进程号,或者fuser -km /nfs直接杀死,我试了下都不行 解决方法: 对于nfs文件系统来说,umount -l /nfs ...
- umount: /data: device is busy
如果一个文件系统处于"busy"状态的时候,不能卸载该文件系统.如下情况将导致文件系统处于"busy"状态:1:文件系统上面有打开的文件2:某个进程的工作目录在 ...
- umount.nfs: device is busy解决办法
fuser -km /app/nfs/ https://blog.csdn.net/x_i_y_u_e/article/details/42914817
随机推荐
- Window环境下RabbitMQ的安装和配置教程
一.安装 首先,RabbitMQ基于Erlang语言环境,所以需要先安装Erlang. Erlang下载地址:http://www.erlang.org/downloads 按照安装程序默认安装完成就 ...
- SMS
SMS:(Short Messaging Service)手机短信服务 . 一种存储和转发服务,短消息并不是直接从发送人发送到接收人,而始终通过 SMS 中心进行转发的.如果接收人处于未连接状态(可能 ...
- JS基础(二)数据类型
一.标量类型 1.字符串string类型:字符串需要用定界符包裹.定界符:单引号(‘’),双引号(“”). 2.数字类型:1)整型:所有整数 2)浮点型:所有浮点数 3.boolean类型:返回tru ...
- Beta冲刺——day1
Beta冲刺--day1 作业链接 Beta冲刺随笔集 github地址 团队成员 031602636 许舒玲(队长) 031602237 吴杰婷 031602220 雷博浩 031602134 王龙 ...
- C语言入门:05.scanf函数
一.变量的内存分析 1.字节和地址 为了更好地理解变量在内存中的存储细节,先来认识一下内存中的“字节”和“地址”. (1)内存以“字节为单位”
- html+css照片墙
html文件 <!DOCTYPE html><html lang="en"><head> <meta charset="UTF- ...
- TRichEdit怎样新增的内容到最后一行?
Delphi里使用TRichEdit,使用SetSelTextBuf时可以设置显示的字体格式,但是显示位置是在当前的插入光标后,如果人为改变插入光标的位置,比如在其他位置单,以后再插入的内容位置就没办 ...
- Spring之jdbcTemplate:增删改
JdbcTemplate增删改数据操作步骤:1.导入jar包:2.设置数据库信息:3.设置数据源:4.调用jdbcTemplate对象中的方法实现操作 package helloworld.jdbcT ...
- 解题:九省联考2018 秘密袭击CoaT
题面 按照*Miracle*的话来说,网上又多了一篇n^3暴力的题解 可能是因为很多猫题虽然很好,但是写正解性价比比较低? 直接做不可做,转化为统计贡献:$O(n)$枚举每个权值,直接统计第k大大于等 ...
- fzyzojP3979 -- [校内训练20180914]魔法方阵
原题见CF632F https://blog.csdn.net/Steaunk/article/details/80217764 这个比较神仙了 点边转化, 把max硬生生转化成了路径最大值,再考虑所 ...