The "device is busy" solution appears when the Linux umount device is running. umountbusy

Source: Internet
Author: User

The "device is busy" solution appears when the Linux umount device is running. umountbusy

In Linux, when you use the umount command to uninstall a LV or file, umount: xxx: device is busy may occur, as shown in the following case:

[root@DB-Server u06]# vgdisplay -v VolGroup03
    Using volume group(s) on command line
    Finding volume group "VolGroup03"
  --- Volume group ---
  VG Name               VolGroup03
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               1.53 GB
  PE Size               32.00 MB
  Total PE              49
  Alloc PE / Size       49 / 1.53 GB
  Free  PE / Size       0 / 0   
  VG UUID               I9VS8Q-r2Gv-Ieh7-mwj2-Y8fX-4I4a-Iyg8OQ
   
  --- Logical volume ---
  LV Name                /dev/VolGroup03/LogVol00
  VG Name                VolGroup03
  LV UUID                2GrkGc-sA1u-GQFx-zZG3-FgPj-r7Hx-rcXKbf
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                1.53 GB
  Current LE             49
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
   
  --- Physical volumes ---
  PV Name               /dev/sdc2     
  PV UUID               XrGKB6-unEt-ccor-Re6Q-ZqmG-QA5m-rutX0t
  PV Status             allocatable
  Total PE / Free PE    49 / 0
   
You have new mail in /var/spool/mail/root
[root@DB-Server u06]# umount /dev/VolGroup03/LogVol00
umount: /u06: device is busy
umount: /u06: device is busy

In this case, there are still processes using the/u06 mount point. At this time, you can use the fuser command to find all the processes that occupy the directory/u06, and kill it. Then you can umount lv. As follows:

[root@DB-Server u06]# fuser -m  /u06
/u06:                10584c
[root@DB-Server u06]# kill -9 10584
[root@DB-Server ~]#  umount /dev/VolGroup03/LogVol00
[root@DB-Server ~]# 

Fuser is used to display information about all processes that are using the specified file, file system, or sockets. It is usually used to diagnose the system's "resource busy" problem, usually when you want umount to specify the mount point. As shown above, use option-m to find all processes that are using the/u06 mount point. 10584c indicates that the process is 10584. for other information about fuser, you can use man fuser to view the specific information.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.