卸载目录时,当前位置不能处于要卸载的目录,否则卸载不成功
[root@localhost ~]# umount /mnt/cdrom
umount: /mnt/cdrom: device is busy
umount: /mnt/cdrom: device is busy
[root@localhost ~]#
查占用/mnt/cdrom目录的进程id (pid)
[root@localhost ~]# fuser -m /mnt/cdrom/
/mnt/cdrom/: 24066c
查看哪些进程使用着/mnt/cdrom/这个目录
[root@localhost ~]# ps aux | grep 24066
root 24066 0.0 0.5 2244 1284 pts/10 S 14:04 0:00 -su
[root@localhost ~]#
杀掉进程
[root@localhost ~]# kill -9 24066
[root@localhost ~]#
卸载目录
[root@localhost ~]# umount /mnt/cdrom/
[root@localhost ~]#