转载 linux umount 时出现device is busy 的处理方法--fuser
http://www.cnblogs.com/spicy/p/6894333.html (原文链接)
当任何目录有 mount, 然后有程序使用/挂在那个目录上的话, 就没有办法 umount 掉, 於 umount 时会出现 Device is busy 的讯息.
要怎麼找出是哪个程序挂在那个目录上? 然后去把那个程式砍掉呢?
使用 fuser 的指令
那要怎麼找出是哪个程式挂在那个目录上?可以使用 fuser - identify processes using files or sockets
假设现在 mount 起来的目录是 /media/share
* 查询: fuser -m /media/share
* 显示: /media/share: 25023c
就代表是 process 25023(pid) 有使用到此目录, 后面 c 代表的意思可参考下述:
* c: current directory.
* e: executable being run.
* f: open file. f is omitted in default display mode.
* F: open file for writing. F is omitted in default display mode.
* r: root directory.
* m: mmap'ed file or shared library.
要把这个资源释放的话, 可以有下述做法:
* kill -9 25023 # ps aux | grep 25023 应该就会看到它
* fuser -m -v -i -k /media/share # 会问你是不是要把 25023 这个 kill 掉, 选 y 就会 kill 掉
提示信息如下:
USER PID ACCESS COMMAND
/meida/share: root 25023 ..c.. bash
Kill process 25023 ? (y/N) y
转载 linux umount 时出现device is busy 的处理方法--fuser的更多相关文章
- [Linux] umount目录提示device is busy的解决方法
使用sshfs等方式挂载的目录出现问题时,使用umount卸载经常提示device is busy,如果仔细阅读错误提示就可以找到命令lsof和fuser命令. 其实原因就是有进程占用当前目录,导致不 ...
- linux中U盘umonut时出现“Device is busy”的解决方法
问题: #umount /dev/sda1 umount: /mnt/usb: device is busy 查找占用目录进程: #lsof |grep /mnt/usb bash 1971 root ...
- Linux 环境下umount, 报 device is busy 的问题分析与解决方法
在Linux环境中,有时候需要挂载外部目录或硬盘等,但当想umount时,却提示类似“umount:/home/oracle-server/backup:device is busy”这种提示. 出现 ...
- 解决umount.nfs: /data: device is busy 问题
有时候我们需要umount某个挂载目录时会遇到如下问题: [root@localhost /]# umount /data/ umount.nfs: /data: device is busy 通过这 ...
- umount移动硬盘遇到device is busy问题
#umount /mnt/fourtumount: /mnt/fourt: device is busy. (In some cases useful info about proce ...
- 执行umount 的时候却提示:device is busy 的处理方法
[root@web2-server yum.repos.d]# umount /mnt/cdrom/ umount: /mnt/cdrom: device is busy. (In some case ...
- umount device is busy 的处理方法
[root@web2-server yum.repos.d]# umount /mnt/cdrom/ umount: /mnt/cdrom: device is busy. (In some case ...
- Linux umount设备时出现device is busy解决方法
在Linux中,有时使用umount命令去卸载LV或文件时,可能出现umount: xxx: device is busy的情况,如下案例所示 [root@DB-Server u06]# vgdisp ...
- centos7执行umount提示:device is busy或者target is busy解决方法
问题描述: 因为挂载错了,想取消挂载,但是umount报告如下错误: [root@zabbix /]# umount /dev/sdc1 umount: /data1: target is busy. ...
随机推荐
- MAC安装远程工具Securecrt的破解方式(详细有图)
想要实现mac的远程连接功能,本来想使用终端的,但是终端的很多功能是欠佳的,所以决定安装一款,像windows的xshell一样好的软件,所以选择了这款Securecrt. 首先准备两个东西,一个是S ...
- modelsim编译altera的库
http://www.cnblogs.com/LJWJL/p/3515586.html 在modelsim的安装目录下,把配置文件modelsim.ini的只读属性去掉,然后在modelsim中运行T ...
- python logging 实现的进程安全的文件回滚日志类
python标准库中的logging模块在记录日志时经常会用到,但在实际使用发现它自带的用于本地日志回滚的类 logging.handlers.RotatingFileHandler 在多进程环境下会 ...
- Codeforces807 B. T-Shirt Hunt 2017-05-08 23:23 175人阅读 评论(0) 收藏
B. T-Shirt Hunt time limit per test 2 seconds memory limit per test 256 megabytes input standard inp ...
- crosss compile VLC with OpenMAX on ARM board(RockChip RK3399),in order to use Hard Acceleration when decode video
reference:http://www.x90x90x90.com/en/raspberry-pi-3-howto-compile-vlc-with-hardware-acceleration/ 1 ...
- hdu 1164 Eddy's research I
http://acm.hdu.edu.cn/showproblem.php?pid=1164 题意很简单,只是写代码的时候需要注意几个问题 一.筛选素数的时候记得用埃式筛选法,要是直接找可能会WA. ...
- linux系统编程之错误处理:perror,strerror和errno
1,在系统编程中错误通常通过函数返回值来表示,并通过特殊变量errno来描述. errno这个全局变量在<errno.h>头文件中声明如下:extern int errno; errno是 ...
- TSQL--删除登陆相关的用户
无二话,上代码 --删除登陆相关的用户 --遍历所有数据库,查找到与登录名相关联的的用户,生成删除脚本 ) SET @loginName='DBA'; DECLARE @comm NVARCHAR(M ...
- Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad
Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad 方法一:安装单独组件 ...
- .net core 读取本地指定目录下的文件
项目需求 asp.net core 读取log目录下的.log文件,.log文件的内容如下: xxx.log ------------------------------------------beg ...