umount device is busy
2013-07-30 16:03
447 查看
umount device is busy错误处理
umount device is busy 错误的原因是有进程调用了挂载的设备,可以通过查看哪些进程调用了该文件将进程杀掉重新umount 即可
umount /data/program/tomcat6/webapps/ROOT/msgimage
umount: /data/program/tomcat6/webapps/ROOT/msgimage: device is busy
fuser 命令查看文件或目录被哪些进程打开
fuser /data/program/tomcat6/webapps/ROOT/msgimage
/data/program/tomcat6/webapps/ROOT/msgimage: 21931c
kill -9 21931 或 fuser -k /data/program/tomcat6/webapps/ROOT/msgimage
umount /data/program/tomcat6/webapps/ROOT/msgimage
成功卸载
21931c 后面的c是用来表示程序是以什么方式来使用目录或文件
PID后跟的字符说明了进程以何种方式与该目录/文件关联,有以下关联方式:
c指示进程的工作目录e指示该文件为进程的可执行文件(即进程由该文件拉起)f指示该文件被进程打开,默认情况下f字符不显示F指示该文件被进程打开进行写入,默认情况下F字符不显示r指示该目录为进程的根目录m指示进程使用该文件进行内存映射,抑或该文件为共享库文件,被进程映射进内存
fuser的详细使用-a display unused files too
-c mounted FS
-f silently ignored (for POSIX compatibility)-i ask before killing (ignored without -k)-k kill processes accessing the named file-l list available signal names-m show all processes using the named filesystems-n SPACE search in this name space (file, udp, or tcp)-s silent operation-SIGNAL send this signal instead of SIGKILL-u display user IDs-v verbose output-V display version informationfuser -v /root 详细输出
USER PID ACCESS COMMAND
/root: root 14629 ..c.. java
fuser -v -n tcp 80 详细输出tcp协议使用80端口的进程
USER PID ACCESS COMMAND
80/tcp: root 22975 F.... java
fuser -m /dev/sda10 输出文件系统被哪些进程使用
/dev/sda10: 14629e 16151ce 22158c 22975ce 22976ce 26687ce 28879e
fuser -m -k /dev/sda10 杀死使用文件系统的进程
/dev/sda10: 14629e 16151ce 22158c 22975ce 22976ce 26687ce 28879e
本文介绍了fuser工具的用法,fuser可用于查询文件、目录、socket端口和文件系统的使用进程,并且可以使用fuser关闭进程。当文件系统umount报device busy时,常用到fuser查询并关闭使用相应文件系统的进程。
umount device is busy 错误的原因是有进程调用了挂载的设备,可以通过查看哪些进程调用了该文件将进程杀掉重新umount 即可
umount /data/program/tomcat6/webapps/ROOT/msgimage
umount: /data/program/tomcat6/webapps/ROOT/msgimage: device is busy
fuser 命令查看文件或目录被哪些进程打开
fuser /data/program/tomcat6/webapps/ROOT/msgimage
/data/program/tomcat6/webapps/ROOT/msgimage: 21931c
kill -9 21931 或 fuser -k /data/program/tomcat6/webapps/ROOT/msgimage
umount /data/program/tomcat6/webapps/ROOT/msgimage
成功卸载
21931c 后面的c是用来表示程序是以什么方式来使用目录或文件
PID后跟的字符说明了进程以何种方式与该目录/文件关联,有以下关联方式:
c指示进程的工作目录e指示该文件为进程的可执行文件(即进程由该文件拉起)f指示该文件被进程打开,默认情况下f字符不显示F指示该文件被进程打开进行写入,默认情况下F字符不显示r指示该目录为进程的根目录m指示进程使用该文件进行内存映射,抑或该文件为共享库文件,被进程映射进内存
fuser的详细使用-a display unused files too
-c mounted FS
-f silently ignored (for POSIX compatibility)-i ask before killing (ignored without -k)-k kill processes accessing the named file-l list available signal names-m show all processes using the named filesystems-n SPACE search in this name space (file, udp, or tcp)-s silent operation-SIGNAL send this signal instead of SIGKILL-u display user IDs-v verbose output-V display version informationfuser -v /root 详细输出
USER PID ACCESS COMMAND
/root: root 14629 ..c.. java
fuser -v -n tcp 80 详细输出tcp协议使用80端口的进程
USER PID ACCESS COMMAND
80/tcp: root 22975 F.... java
fuser -m /dev/sda10 输出文件系统被哪些进程使用
/dev/sda10: 14629e 16151ce 22158c 22975ce 22976ce 26687ce 28879e
fuser -m -k /dev/sda10 杀死使用文件系统的进程
/dev/sda10: 14629e 16151ce 22158c 22975ce 22976ce 26687ce 28879e
本文介绍了fuser工具的用法,fuser可用于查询文件、目录、socket端口和文件系统的使用进程,并且可以使用fuser关闭进程。当文件系统umount报device busy时,常用到fuser查询并关闭使用相应文件系统的进程。
相关文章推荐
- 解决 umount 时出现的 "Device is busy"
- umount device is busy 解决方案
- umount: device is busy
- 用fuser或者lsof解决无法umount问题(device is busy
- umount: /mnt/cdrom: device is busy
- umount命令介绍与device is busy解决方法
- 解决Linux NFS umount 'device is busy' and 'df -h' hang
- Linux问题—解决umount.nfs: /data: device is busy
- umount : /mnt: device is busy
- Troubleshooting the "device is busy" Error Attempting to umount a Disk
- centos重启报错Umounting file systems:umount:/opt:device is busy
- NFS umount 提示 device is busy
- umount: /mnt/cdrom: device is busy
- 执行umount 命令的时候出现 device is busy
- centos重启报错Umounting file systems:umount:/opt:device is busy
- umount 卸载挂载点 卸载存储报错 device is busy
- umount: /: device is busy
- 解决在Linux 下umount 挂载的U盘或者移动硬盘时出现的“Device is busy”
- 解决umount时出现"Device is busy"
- umount出现device is busy