您当前的位置:首页 > linux知识

linux下强行umount卸载设备

时间:2020-01-17 03:01:25    来源:    作者:

卸载NFS,结果出现无法卸载的情况

[root@localhost /]# umount /mnt/

umount: /mnt: device is busy

umount: /mnt: device is busy

使用umount -f,问题依旧

[root@localhost /]# umount -f /mnt/

umount2: Device or resource busy

umount: /mnt: device is busy

umount2: Device or resource busy

umount: /mnt: device is busy

使用fuser命令,先确认有那些进程需要杀掉

[root@localhost /]# fuser -cu /mnt

/mnt:                15060c(root)

其次向进程发出SIGKILL信号

[root@localhost /]# fuser -ck /mnt

/mnt:                15060c

确认

[root@localhost /]# fuser -c /mnt

[1]+  Killed                  dd if=1g of=/dev/null bs=1M  (wd: /mnt)

(wd now: /)

推荐资讯