Linux 下使用umount强行卸载设备

时间:2025-02-20 15:07:14

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

 [root@localhost /]# umount /udisk/
umount: /udisk: device is busy
umount: /udisk: device is busy

使用umount -f,问题依旧

 [root@localhost /]# umount -f /udisk
umount2: Device or resource busy
umount: /udisk: device is busy
umount2: Device or resource busy
umount: /udisk: device is busy

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

 [root@localhost /]# fuser -cu /udisk
/udisk: 15060c(root)

其次向进程发出SIGKILL信号

 [root@localhost /]# fuser -ck /udisk
/udisk: 15060c