執行umount 的時候卻提示:device is busy 的處理方法


卸載掛載的盤提示如下:

[root@web2-server yum.repos.d]# umount /mnt/cdrom/
umount: /mnt/cdrom: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
[root@web2-server yum.repos.d]# umount /mnt/cdrom/ -f //強制卸載也不行
umount2: 設備或資源忙
umount: /mnt/cdrom: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
umount2: 設備或資源忙
[root@web2-server yum.repos.d]# fuser -m /mnt/cdrom/
/mnt/cdrom/: 1338c 5830c //占用進程pid

#fuser -m -k /mnt/cdrom/
 //或者查詢后直接殺死進程 后面的2步就不需要執行了

如果還是不行,還可以強行解除掛載

umount -l /mnt/cdrom

強行解除掛載

 
[root@web2-server yum.repos.d]# ps aux |grep 1338  //查看占用進程
root 1338 0.0 0.2 108292 1912 pts/2 Ss+ 14:27 0:00 -bash
root 1423 0.0 0.1 103236 884 pts/1 S+ 14:49 0:00 grep 1338

# 在使用kill 殺掉進程

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM