在Linux管理umount设备时,时常会遇到"device is busy", 假设umount一个文件系统碰到这样的情况。而且你并没有在所需卸载的文件夹下。那么非常可能实用户或进程在使用那个文件夹。

# umount /mnt
umount: /mnt: device is busy
umount: /mnt: device is busy

那么必须用fuser命令来查看process ID和进程的拥有者。比方:

# fuser -mu /mnt
/mnt: 25781c(root)
# kill -9 25781
# umount /mnt

像以下这样的情况,就代表rhythmbox用户在使用那个文件夹。然后也能够用fuser -ck /dev/sdc1来杀进程。

# fuser -m /dev/sdc1
/dev/sdc1: 538
# ps auxw|grep 538
donncha 538 0.4 2.7 219212 56792 ? SLl Feb11 11:25 rhythmbox
</pre><span style="font-family:FangSong_GB2312; font-size:18px"><strong>假设全部这些努力还不奏效,杀掉该进程后。那么这个时候可能须要加-f -l參数,强制卸载</strong></span><p><span style="font-family:FangSong_GB2312; font-size:18px"><strong># umount -f -l /mnt</strong></span></p><p></p><pre>

NOTE:

可用以下的命令来检查SATA硬盘的坏块。

# badblocks -v /dev/sda
# badblocks -v /dev/sdb # badblocks -v /dev/mapper/vgosi-lvol1
Checking blocks 0 to 10477568
Checking for bad blocks (read-only test): done
Pass completed, 0 bad blocks found.







版权声明:本文博客原创文章。博客,未经同意,不得转载。

Linux在device is busy处理的更多相关文章

  1. 3 Ways to Force Unmount in Linux Showing “device is busy”

    3 Ways to Force Unmount in Linux Showing “device is busy” Updated August 8, 2019By Bobbin ZachariahL ...

  2. Linux umount设备时出现device is busy解决方法

    在Linux中,有时使用umount命令去卸载LV或文件时,可能出现umount: xxx: device is busy的情况,如下案例所示 [root@DB-Server u06]# vgdisp ...

  3. linux umount 提示device is busy 的解决

    linux umount 提示"device is busy" 终极解决 为了干净地关闭或热交换 UNIX 或类 UNIX 系统上的存储硬件,必须能够卸载使用此设备上的存储的所有文件系统.但是,如果正 ...

  4. Linux 环境下umount, 报 device is busy 的问题分析与解决方法

    在Linux环境中,有时候需要挂载外部目录或硬盘等,但当想umount时,却提示类似“umount:/home/oracle-server/backup:device is busy”这种提示. 出现 ...

  5. linux卸载挂载点显示device is busy

    在做umount设备时, device is busy是令人头痛的提示: [root@delphi /]# umount /dev/cdrom umount: /mnt/cdrom: device i ...

  6. linux中U盘umonut时出现“Device is busy”的解决方法

    问题: #umount /dev/sda1 umount: /mnt/usb: device is busy 查找占用目录进程: #lsof |grep /mnt/usb bash 1971 root ...

  7. Linux umount的device is busy问题

    现象: [root@dbserver ~]# df -h文件系统 容量 已用 可用 已用%% 挂载点/dev/vda1 9.9G 3.9G 5.6G 41% /tmpfs 3.9G 100K 3.9G ...

  8. 转载 linux umount 时出现device is busy 的处理方法--fuser

    http://www.cnblogs.com/spicy/p/6894333.html (原文链接) 当任何目录有 mount, 然后有程序使用/挂在那个目录上的话, 就没有办法 umount 掉, ...

  9. Linux卸载NAS磁盘,报device is busy

    # umount /data umount.nfs: /data: device is busy umount.nfs: /data: device is busy # fuser -m -v /da ...

随机推荐

  1. hdu 1395 2^x mod n = 1 暴力过~~最好学下欧拉定理~~~

    2^x mod n = 1 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) To ...

  2. HOJ2275 Number sequence

    Number sequence My Tags tag=&type=or" style="margin:0px; padding:0px; color:rgb(27,87, ...

  3. 很久没来这里,今天的评测java怪东西,左右Date类和时间戳转换

    在发展过程中,经常会遇到利用上课时间.说话的Date类就不得不提时间戳,左右fr=aladdin" target="_blank">的定义大家能够看看网上对时间戳的 ...

  4. 【oracle案件】ORA-19502,ORA-27072

    1.1.1. ORA-19502,ORA-27072 日期:2014-05-12 00:12 环境:试验机 [错误号] $ oerr ora 19502 19502, 00000, "wri ...

  5. 为什么android你用的越多,速度较慢的手机

    依据第三方的调研数据显示,有 77% 的 Android 手机用户承认自己曾遭遇过手机变慢的影响,百度搜索"Android+ 卡慢",也有超过 460 万条结果. 在业内.Andr ...

  6. TimesTen更改CacheGroup管理用户ORACLE结束和TT结束password【TimesTen操作和维修基地】

    password管理一直操作的一部分的安全管理和维护.CacheGroup管理用户password虽然并不复杂变化.然而,这是用于生产,改不好比较easy导致失败.简介点击这里CacheGroup管理 ...

  7. simple factory, factory method, abstract factory

    simple factory good:1 devide implementation and initialization2 use config file can make system more ...

  8. FileStream:The process cannot access the file because it is being used by another process

    先看下面一段代码(先以共享的方式打开文件读写,然后以只读的方式打开相同文件): FileStream fs  = new FileStream(filePath, FileMode.Open, Fil ...

  9. WebService 简单安全验证

    原文:WebService 简单安全验证 最近新接了一个需要调用第三方WebService的项目,看到这个第三方WebService被调用的时候,需要授权用户名和密码,于是自己也想对WebServic ...

  10. HDOJ 5000 Clone

    所有的属性,以满足一定的条件,是,财产和等于sum/2结果最大. Clone Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536 ...