Preventing unmount of external volume on MacBook Air

Hi Guys,

I have an external hard drive (WD My Book) that I am trying to run Disk Utility's First Aid to check it, but this fails because "First Aid could not unmount one of the other volumes in the volume's container".

When trying to unmount this volume I get the message "Failed to unmount volume because it is currently in use".

I am getting these errors even after rebooting the MacBook Air, with no software running except that which starts automatically. The only one that should be using the external volume is Backblaze, but that only takes a moment to run because I have not made any changes to the data on the drive, which is storing photos. The only way to Unmount the volume seems to be through a Force Unmount, which works, but then the problem comes back again when the volume is remounted. I am getting a bit worried about this and would like First Aid to be able to check the volume for errors. Is there any way to find out what is preventing the volume from being unmounted, what is "currently in use"?


In an old thread I did see mention that this can be caused by a file still showing as being open, but I did not it mentioned how to find the offending file, if this is the problem.


[Re-Titled by Moderator]

MacBook Air, macOS 15.1

Posted on Jan 19, 2025 11:41 AM

Reply
10 replies
Sort By: 

Jan 20, 2025 1:33 PM in response to Marcus Peaston

Marcus Peaston wrote:

Thanks for the feedback. My feeling is that something is borked with Spotlight. I know that my wife will just unplug the laptop from connected drives without Ejecting/Unmounting them first, so I don’t know if doing that has the potential to corrupt such that I get this issue with Spotlight.

That could certainly cause problems. You may need to try rebuilding the index:

Rebuild the Spotlight index on your Mac - Apple Support



Reply

Jan 20, 2025 10:26 AM in response to Marcus Peaston

When you leave the computer overnight, it likely went to sleep which could have put the drive to sleep & paused the indexing.


Otherwise I have no idea. Spotlight & macOS have been like this for years. The only sure way of preventing Spotlight's interference is by excluding the drive from being indexed.


When killing the Spotlight process, it may subsequently kill others as well, but some of those processes could remain. So you need to make sure to kill any remaining processes.


You can always provide Apple with product feedback:

Feedback - macOS - Apple


Reply

Jan 20, 2025 2:19 AM in response to HWTech

Thanks very much - that's the magic command that I needed. The result of this is that I need to ask an additional question. The source of the problem looks to be Spotlight. As noted in my original message, I am not actively changing the content on my external volume, so Spotlight indexes on it should be up-to-date. I think Spotlight is having a problem. My MBA has been attached to the external volume all night, I used the Kill command to terminate the Spotlight process with its PID returned from the Lsof command, and tried to use Disk Utility's First Aid on the volume, which resulted in the same error messages as before. Running the Lsof command shows that Spotlight is running again on the volume. There seems to have been some evolution of the processes running, based on changing PID values, but they seem to have settled at those shown in the screenshot below. Is this an indication of Spotlight misbehaving and, if so, what can I do about it?


Reply

Jan 20, 2025 10:42 AM in response to HWTech

Thanks for the feedback. My feeling is that something is borked with Spotlight. I know that my wife will just unplug the laptop from connected drives without Ejecting/Unmounting them first, so I don’t know if doing that has the potential to corrupt such that I get this issue with Spotlight. I am assuming here that, if there are no changes to be indexed, Spotlight should finish running very quickly. Since I did not used to have this issue Unmounting the external volume, something has changed and gone wrong.

Reply

Jan 21, 2025 11:27 AM in response to HWTech

Thanks very much. I had shutdown the laptop completely last night, which I don't do very often. This evening, when I started it back up to try the advice, I did find that Disk Utility was now able to run First Aid on the problematic external volume, which happily did not show any errors. I have "reset" the Spotlight index on the drive, so it is now re-indexing it. I am not sure why shutting down the laptop appeared to have the desired effect that rebooting did not.


Right now, I think all is good, so the advice given is appreciated.

Reply

Jan 21, 2025 11:31 AM in response to Old Toad

Just to confirm, Disk Utility was refusing to Unmount the volume, which was certainly part of the problem. This is what was generating the error message shown in the screenshot in the original post. The lsof command did highlight that Spotlight was the process that was using the drive, although why this would prevent Disk Utility to Unmount the volume is unclear. I could not see any processes in the list returned that looked like they were anything not associated with Spotlight.


Anyway, all seems to be working as expected this evening.

Reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Preventing unmount of external volume on MacBook Air

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.