umount.nfs4: /mnt: device is busy报错

取消挂载报错:

[root@localhost ~ 14:02:51]#umount /mnt/
umount.nfs4: /mnt: device is busy

原因就是挂载的目录被其它进程占用了,需要找出占用的进程,杀掉;再umount 就可以了

需要用到 fuser 命令,如果没有就安装一下

yum install -y psmisc

查看挂载目录被谁占用了:

[root@localhost ~ 14:02:00]#fuser -m -v /mnt/
                     用户     进程号 权限   命令
/mnt:                root     kernel mount /mnt
                     root       4848 ..c.. bash

使用kill -9 结束占用挂载进程

[root@localhost / 14:13:57]#kill -9 4848

再执行umount卸载命令就可以了:

[root@localhost / 14:14:08]#umount /mnt
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。