一、命令介绍
1. fuser用法 :fuser [-umv] [-k [i] [-signal] ] file/dir-u:除了进程的PID外 ,同时列出该进程的所有者。-m:后接的文件名会主动上调到文件系统的所顶层,对umount不成功很有效。-v:列出每个文件与程序还有命令的完整相关性。-k:找出使用文件/目录的pid,并试图一sigkill这个信号给予该pid.-i:与,-k合用,kill前询问用户意愿。-signal:1,15,9可用于在无法umount文件时,查看pid,并杀死进程见下面的例子
2.lsof用法:lsof [-aUu] [+d]一个奇怪的命令,-u:后接username;+d:后接目录,找出某个目录下面已经被打开的文件。二。解决无法umount问题
本来在把服务器本地yum源挂载到了html目录下的centos目录,用来方便局域网内用户可以不连外网就能进行yum安装或这升级,有一天centos目录却出错了导致无法安装软件,就重新挂载了centos,但是直接umount不动,就用fuser查看并杀死进程成功umount
[root@sf ~]# umount -f /var/www/html/centos/
umount2: 设备或资源忙
umount: /var/www/html/centos: device is busy.(In some cases useful info about processes that usethe device is found by lsof(8) or fuser(1))
umount2: 设备或资源忙
[root@sf ~]# fuser -l /var/www/html/centos/
HUP INT QUIT ILL TRAP ABRT IOT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM
STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS
UNUSED
[root@sf ~]# fuser /var/www/html/centos/
/var/www/html/centos/: 9807c
[root@sf ~]# ps -aux|grep 9807c
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root 10000 0.0 0.0 103240 896 pts/3 S+ 15:04 0:00 grep 9807c
[root@sf ~]# ps -aux|grep 9807
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root 9807 0.0 0.0 108428 2000 pts/2 Ss+ 14:52 0:00 -bash
root 10003 0.0 0.0 103240 896 pts/3 S+ 15:05 0:00 grep 9807
[root@sf ~]# kill -9 9807
[root@sf ~]# umount /var/www/html/centos/
详细解决方案
用fuser或者lsof解决无法umount问题(device is busy
热度:75 发布时间:2023-09-05 17:48:38.0
相关解决方案
- j2me device management的设置有关问题
- C#操作word出现“The message filter indicated that the application is busy”,该怎么解决
- js怎么添加用户等待提示-busy indicator
- Server is too busy 非常纠结!该怎么处理
- Server is too busy?该怎么处理
- 下载页面经常出现"server is too busy"解决方法
- VxWorks设备驱动开发指南(2)-VxBus And VxBus Device Driver
- vxworks的网络通讯 muxdevload failed for device entry0 异常
- 新装电脑 开机后boot and select proper boot device or insert boot media in selected boot,该怎么处理
- Writing Windows WDM Device Drivers 英文版哪位高手知道哪有
- 每日背熟一句英语(9)The number you dailed is busy now, pls try again later
- 施用IE10和CSS Device Adaptation
- 移动设备测试 六 free mobile device emulators for testing your site
- -webkit-min-device-pixel-ratio的常见值对比
- 短信猫:org.smslib.TimeoutException: No response from device.解决方案
- 手机调试,eclipse连接真机无log,显示log device is empty!的解决方法
- 起动数据库时提示 requested INSTANCE_NUMBER is busy
- jpcap 异常 有关问题 Unable to open a device: 10 devices are already opened
- 求大神:移植tslib出现有关问题,selected device is not a touchscreen I understand
- 写录音程序出现“using null input device, none available”哪位大侠知道咋回事?求教
- QPainter:begin: A paint device can only be painted by one painter at a time解决思路
- Qt经典出错信息之Error opening framebuffer device /dev/fb0,该如何解决
- iphone手机联接USB时出现需要Mobile device setup disk上的usbaapl.sys文件
- 有关消息推送 device token的有关问题
- iphone 升级 出现 This device isn't eligible for the requested build 解决办法
- []PPC连接有关问题"Unable to load device side "
- Android Studio关于USB device not found的解决方法
- 用android SDK定置系统时, android SDK/device/init.board.rc init.rc 这二个文件有什么作用?该如何处理
- android/device/XXX公司/XXXX平台/keyboard.kl 文件相关有关问题
- eclipse菜单没Android Virtual Device Manager