umount移動硬碟遇到device is busy問題

來源:互聯網
上載者:User

標籤:使用   os   檔案   for   問題   ar   table   file   

#umount  /mnt/fourt
umount: /mnt/fourt: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
        

fuser 概述
fuser命令是用來顯示所有正在使用著指定的file, file system 或者 sockets的進程資訊。
例:
#fuser -m -u /mnt/fourt
/mnt/fourt:          14917c(root) 14918c(root)
在例子中,使用了-m和-u選項,用來尋找所有正在使用/mnt/fourt 的所有進程的PID,以及該進程的OWNER,如14917c(root),其中14917是進程PID,root是該進程的OWNER。
fuser會顯示正在使用指定的file,file system 或者 sockets的進程的PID。在預設的顯示模式下,每個檔案名稱之後會跟隨一個字元,用來指示當前的訪問類型。
如下所示:
c
    current directory.
e
    executable being run.
f
    open file.
F
    open file for writing.
r
    root directory.
m
    mmap‘ed file or shared library
    
    
查看進程使用的檔案:    
# ls -al /proc/14917/fd/
total 0
dr-x------ 2 root  root    0 Jul 28 09:58 .
dr-xr-xr-x 7 root screen  0 Jul  8 12:44 ..
lr-x------ 1 root  root   64 Jul 28 09:58 0 -> /dev/null
l-wx------ 1 root  root   64 Jul 28 09:58 1 -> /dev/null
l-wx------ 1 root  root   64 Jul 28 09:58 2 -> /dev/null
lr-x------ 1 root  root   64 Jul 28 09:58 3 -> /var/run/screen/S-aimin/14917.pts-6.centos64
lrwx------ 1 root  root   64 Jul 28 09:58 5 -> /dev/ptmx
lr-x------ 1 root  root   64 Jul 28 09:58 6 -> /var/run/utmp

# ls -al /proc/14918/fd/
total 0
dr-x------ 2 root root  0 Jul 28 09:58 .


#ps --ppid 14917
#ps --ppid 14918

kill進程:
#kill -9 14917
#kill -9 14918

再次umount

#umount  /mnt/fourt

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.