MAC mobile hard drive cannot be ejected normally: "The disk cannot be ejected because one or more programs are using it"

    When the MAC mobile hard disk is in use, it often encounters the situation that it cannot be exited normally. It prompts: "The disk cannot be ejected because one or more programs are using it ." If you " unplug directly " or " force eject ", it may As a result, the mobile hard disk will not be recognized when you reconnect it next time. (Reference: MAC mobile hard disk can not recognize the solution )

step one:

    If you can't exit normally, the first thing you'll usually encounter is that the disk failed to eject properly because it was being used by the Finder.

    When you see this prompt, you can click the Apple icon in the upper left corner, select " Force Quit... ", enter the " Force Quit Applications " window, then select  Finder , and click the button " Restart ". After performing such operations, if the mobile hard disk still cannot be ejected normally, you can refer to step 2.

Step two:

    If step 1 doesn't work, it usually prompts: " The disk cannot be ejected because it is being used by one or more programs ".

     In such a situation, the most direct and effective way is to find out the background program occupying the removable disk and terminate it.

Step three:

3.1 Display the mobile hard disk in the "terminal"

    Open the terminal (Teminal) of the MAC computer, execute the command: diskutil list , and find the mobile hard disk we are currently running:

     You can see that the external mobile hard disk (external, physical) is: /dev/desk2 , which includes two drive letter marks: disk2s1 and disk2s2 , multiple drive letters indicate that the hard disk includes multiple partitions, and you can see the TYPE NAME of disk2s1 is EFI:

The bootable files are stored in the EFI system partition, which is used to guide the operating system to start normally. The EFI system partition is a small partition formatted using FAT32, which is generally invisible under the Windows operating system, and stores the EFI bootloader of the installed system and the applications used by the firmware at startup.

    Because the EFI partition is meaningless to us here, the hard disk partition where we actually store data is disk2s2 , and the operation object of the following commands is also for the hard disk partition disk2s2 .

    If you feel that the above method is not easy to understand, you can also execute the command in the terminal: df -lh

Here directly displays the data storage partition of the current mobile hard disk: dev/disk2s2

 3.2 Execute the command to launch the mobile hard disk : umount /dev/disk2s2

 Execute the command to eject the hard disk, and because the background program occupies it, a specific error message will be prompted. The above figure shows that the PID of the background occupying process is 232, and the program name is: mds_stores.

3.3 Forced termination of mds_stores

Open "Activity Monitor", enter: mds_stores in the search box in the upper right corner, and click Search.

 Select  the mds_stores  program in the above picture, click Terminate, and the mobile hard disk can be released normally. mds_stores is the background process of spotlight. In order for users to quickly display the search results when querying data, spotlight needs to index these files and other information. mds_stores is the process of building indexes and other information in the background.

Guess you like

Origin blog.csdn.net/crazestone0614/article/details/130477020