运行时umount /path我得到:
umount: /path: device is busy.
Run Code Online (Sandbox Code Playgroud)
文件系统很大,所以lsof +D /path不是一个现实的选择。
lsof /path, lsof +f -- /path, 并且fuser /path都没有返回。fuser -v /path给出:
USER PID ACCESS COMMAND
/path: root kernel mount /path
Run Code Online (Sandbox Code Playgroud)
这对于所有未使用的挂载文件系统来说是正常的。
umount -l而umount -f不是我的情况不够好。
我如何弄清楚为什么内核认为这个文件系统很忙?
有时候,我想卸载USB设备使用umount /run/media/theDrive,但我得到一个drive is busy错误。
如何找出哪些进程或程序正在访问设备?
我知道这个命令:
find /path/to/mountpoint -inum <inode number>
Run Code Online (Sandbox Code Playgroud)
但这是一个非常缓慢的搜索,我觉得必须有一种更快的方法来做到这一点。有人知道更快的方法吗?
在最近升级到 Fedora 15 后,我发现许多工具失败并出现以下错误:
tail: inotify resources exhausted
tail: inotify cannot be used, reverting to polling
Run Code Online (Sandbox Code Playgroud)
这不仅仅是tail报告 inotify 的问题。有没有办法询问内核以找出正在消耗 inotify 资源的进程?当前与 inotify 相关的sysctl设置如下所示:
fs.inotify.max_user_instances = 128
fs.inotify.max_user_watches = 8192
fs.inotify.max_queued_events = 16384
Run Code Online (Sandbox Code Playgroud) 我经常遇到卸载目录的问题:
卸载/mnt/目录 umount: /mnt/dir: 设备正忙
设备繁忙的原因有很多。有时运行的进程上有打开的锁,有时还有其他目录安装在/mnt/dir.
我的问题:
检查为什么无法卸载目录的步骤是什么。
我知道有很多原因,但如果你解释一个具体的解决方案就可以了。
[编辑]
[X] 在安装的卷上运行进程。
[X] 另一个卷安装在我们要卸载的卷的顶部
[_] NFS 锁定我们要卸载的卷