网站之家技术交流论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1173|回复: 0

Linux如何卸载挂载文件

[复制链接]
发表于 2015-10-10 17:30:32 | 显示全部楼层 |阅读模式
在我们进行远程文件操作的时候,我们经常会出现文件服务出现卸载掉哦情况。例如

umount /mnt/net1
umount: /mnt/net1: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))

这种问题解决方案:

一、查找使用这个文件的进程和命令,具体的操作代码

[root@localhost ~]# lsof |grep /mnt/net1
lsof: WARNING: can't stat() cifs file system /mnt/net1
      Output information may be incomplete.
bash      18841      root  cwd   unknown                                            /mnt/net1/TDDOWNLOAD/软件 (stat: No such device)

二、然后执行ps命令可以查找执行此进程的命令

[root@localhost ~]# ps -ef|grep 18841
root     18841 18839  0 Nov29 pts/2    00:00:00 /bin/bash -l
root     29496 25604  0 16:26 pts/0    00:00:00 grep 18841

三、强行结束无关进程

[root@localhost ~]# kill -9 18841

四、然后卸载相关挂载

[root@localhost ~]# umount /mnt/net1

五、然后可以在功过mount命令进行查看。

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|网站之家技术交流论坛 ( 粤ICP备09092995号 )

GMT+8, 2024-5-3 16:04 , Processed in 0.092606 second(s), 15 queries , File On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表