纠结的umount


今天在维护一台linux过程中,发现一个mount point不好用。原因是mount的USB-HDD被人拔掉,然后插到了其他USB接口。

这时,我想umount它,然后再mount回来。却遇到了错误。

[root@e /]# umount /mnt

umount: /mnt: device is busy
umount: /mnt: device is busy
于是想到使用fuser查看是哪个进程占用了/mnt

[root@e /]# fuser /mnt
Cannot stat /mnt: Transport endpoint is not connected
Cannot stat /mnt: Transport endpoint is not connected
没招了。。。无语中。。。GOOGLE中。。。

一神贴中提及lsof,抱着试试看的态度来了一下。呀,还真灵。

[root@e /]# lsof |grep /mnt
lsof: WARNING: can't stat() fuseblk file system /mnt
Output information may be incomplete.
su 25762 root cwd unknown /mnt//full_20101115/db/datafile (stat: Transport endpoint is not connected)
bash 25763 root cwd DIR 8,33 4096 5 /mnt2
bash 29572 oraadm cwd unknown /mnt//full_20101115/db/datafile (stat: Transport endpoint is not connected)
果断kill。remount成功。

猜你喜欢

转载自blog.csdn.net/zhangxu777/article/details/82421666