Mac Disk Unitlity Unable To Unmount Volume For Repair

Posted by Katrina to Mac Data Recovery Tips on April 12th, 2018

I couldn't see my APFS external hard drive (WD My Passport 0746 Media) in Finder, so I went to Disk Utility and found the drive unmounted. Then I ran First Aid, but it failed to repair and showed me the error: 'Can't repair volume because other APFS volumes in its container are mounted.'

In the sidebar, select a disk or volume, then click the First Aid button. If Disk Utility tells you the disk is about to fail, back up your data and replace the disk—you can’t repair it. Otherwise, continue to the next step. Click Run, then click Continue. If Disk Utility reports that the disk appears to be OK or has been repaired, you. For each disk that you're repairing, start by selecting the last volume on that disk, then click the First Aid button or tab. In this example, the last volume on the disk is Macintosh HD - Data. Click Run to begin checking the selected volume for errors. If there is no Run button, click the Repair Disk button instead. In the Disk Utility app on your Mac, select the disk set that you want to unmount in the sidebar. Click the Unmount button in the toolbar or beside the disk set name. After unmounting a disk set, you can disconnect the disk members of the set from your computer. Unmount a disk member of a set. When I try to verify the WD drive using disk utility I get 'Error: This disk needs to be repaired. Click Repair Disk', but when I do click repair I get 'Error: Unable to unmount volume for repair' I am unable to copy any documents to the WD drive, as I get a message telling me that they are in use. I only use the WD drive for Time Machine.

APFS comes with space sharing concept, in which container is the basic storage unit, and in a container there're multiple volumes. This feature allows space to be shared between volumes in a container, and helps the Mac manage free space on its hard drives more efficiently.

However, space sharing also makes some troubles. Since these APFS volumes share the free space, if errors happen to one volume, other volumes will get involved too. Therefore, when we use repair tool, some new data will be written on the damaged volume as well as the shared space. But for the sake of data security, we are not allowed to do so on the shared space, and then the error pops out: 'Can't repair volume because other APFS volumes in its container are mounted'. Under this circumstance, the drive/container can't be mounted and we can no longer access files stored on it.

Fix 'Can't repair volume because other APFS volumes in its container are mounted' error without data loss

Since Disk Utility can't repair the unmountable APFS drive, the only and last solution is to fix the error by reformatting. But reformatting will erase all data stored on the drive. To avoid data loss, we should recover lost data from unmountable APFS drive firstly. As APFS is a new and complex file system, there are a few data recovery program in the market that can truly support it.iBoysoft Data Recovery for Mac is one of them.

Step 1: Recover lost data from unmountable APFS drive with iBoysoft Data Recovery for Mac

iBoysoft Data Recovery for Mac is one of a few data recovery software that offers comprehensive solution for APFS Data Recovery andencrypted APFS data recovery. It can recover lost data from unmountable APFS drive,recover lost data from formatted APFS drive, recover lost data from inaccessible APFS drive,recover lost data from unreadable APFS hard drive, recover lost data from corrupted APFS container

Besides, iBoysoft Mac Data can also recover lost data from HFS drive, HFS+ drive, FAT32 drive, exFAT drive, etc. It fully support storage devices like hard drive, external hard drive, USB flash drive, SD card, memory card and more.

Tutorial to recover lost data from unmountable APFS drive with iBoysoft Data Recovery for Mac

After downloading and installing iBoysoft Data Recovery for Mac on our Mac, only 4 steps needed to get lost files back.

Step 1: Launch iBoysoft Data Recovery for Mac.

Step 2: Choose the unmountable APFS drive, then click 'Next' to scan for all lost files on the drive.

Step 3: Preview the scanning results, choose files we want to recover, and then click 'Recover' to get lost data back.

Step 2: Fix 'Can't repair volume because other APFS volumes in its container are mounted' error by reformatting

After successfully restored all lost data, we can fix 'Can't repair volume because other APFS volumes in its container are mounted' error by reformatting it without worrying about any data loss.

• Tutorial to format external hard drive/volumes in Disk Utility

Still have questions?

Mac Disk Utility Unable To Unmount Volume For Repair 69673

I have found myself recently experiencing a couple of Macs which would not allow me to repair the directory or permissions in Disk Utility, or erase/partition the drive with an error such as: ‘Disc erase failed couldn’t unmount disc’ or ‘Disk Erase failed with the error: Couldn’t unmount disk.’

Even trying to use Network Deployment tools such as Apple’s Netinstall service or DeployStudio have also failed to deploy due to these errors.

Normally, any ‘Couldn’t Unmount Disk’ error is attributed to circumstances where the boot drive is being modified or is being used by an application or process. So the first thing to do is to startup the Mac from another bootable drive such as an external drive or OS X Recovery. You can then run Disk Utility from there.

An external drive or a network drive is preferred if it is the internal hard drive you have an issue with, since the OS X Recovery is a partition on the same physical drive which may not be able to successfully unmount or modify your internal disk.

To create your own bootable disk, refer to our blog ‘Creating a Mavericks bootable install disk’.

I would strongly recommend at this stage attempting to back up any data that is required before proceeding with the following steps. Some of the following steps are destructive and will lose ALL data on your drive.

  1. If you have an external bootable disk, connect this to your Mac and power your Mac up whilst holding down the OPTION/ALT key. Then select the desired external drive from the startup manager screen and press the enter key.
  2. If you have used our method above to create a bootable installer, choose ‘Disk Utility’ from the available menu. If you have created your own bootable drive with a full system, open Disk Utility from /Applications/Utilities.
  3. Select the ‘First Aid’ tab and verify the troublesome disk, repairing if needed. Also perform a permissions repair if required.
  4. Attempt again to perform whichever task caused your ‘Couldn’t Unmount Disk’ error. (For example to Erase/Partition the disk).

Still not playing ball?

You can try booting from OS X Recovery (by holding ‘CMD’ + ‘R’ keys at startup) or an external drive and use the command line to attempt to unmount or erase the disk:

1) Once booted from OS X Recovery, select Terminal from the Utilities pull down menu. (Or if you are booting to your own bootable drive with a full system, open Disk Utility from /Applications/Utilities).

At the unix prompt enter:

Press RETURN. From the listing, look in the Identifier column for your disk identifier. It will look like ‘diskx’ where ‘x’ is an integer starting at 0. You should also see the name of the disk such as ‘Macintosh HD’. In my example below, the disk name is ‘Server’. Note down the disk identifier. For a single drive system this will probably be ‘disk0’ :

2) Now enter the following where ‘x’ is your disk identifier:

3) Press RETURN. Enter your admin password if prompted. This should unmount all volumes of the physical drive:

4) Attempt again to perform whichever task caused your ‘Couldn’t Unmount Disk’ error. (For example to Erase/Partition the disk).

Still unable to work on the disk? Still getting those pesky disk errors?

Mac Disk Utility Unable To Unmount Volume For Repair Disk

Bit more drastic, but you can attempt to force a volume or the entire physical disk to unmount:

Disk

FOR A VOLUME:

1) Using the Terminal application again, booting from OS X Recovery or an external bootable drive,

Enter the following where ‘x’ is your disk identifier and ‘y’ is your volume identifier, (remember to use the ‘diskutil list’ command if you need to find out your disk and volume identifiers):

2) Press RETURN. Enter your admin password if prompted. This should force unmount the volume:

Mac Disk Unitlity Unable To Unmount Volume For Repair

Mac Disk Utility Unable To Unmount Volume For Repair Mac

3) Attempt again to perform whichever task caused your ‘Couldn’t Unmount Disk’ error. (For example to Erase/Partition the disk).

FOR AN ENTIRE PHYSICAL DISK:

Mac Disk Utility Unable To Unmount Volume For Repair Parts

1) Using the Terminal application again, booting from OS X Recovery or an external bootable drive.

Enter the following where ‘x’ is your disk identifier. (Remember to use the ‘diskutil list’ command if you need to find out your disk identifiers):

2) Press RETURN. Enter your admin password if prompted. This should force unmount the entire physical disk and all its related volumes:

3) Attempt again to perform whichever task caused your ‘Couldn’t Unmount Disk’ error. (For example to Erase/Partition the disk).

OK, we’ve tried to be nice, but is the disk STILL not letting you work with it?

Be sure you backup your files to an external drive or second internal drive, the following procedure will remove everything from the hard drive!

We are now going to force erase the physical disk, creating a single Mac OS Extended (Journaled) volume. This should then allow you to partition and work with the physical disk again.

1) Using the Terminal application again, booting from OS X Recovery or an external bootable drive.
Enter the following where ‘MacintoshHD’ is the name of the newly created Mac formatted partition, and where ‘x’ is your disk identifier, (remember to use the ‘diskutil list’ command if you need to find out your disk identifiers):

2) Press RETURN. Enter your admin password if prompted. This should force erase the entire physical disk and all its related volumes, then create a single Mac OS Extended (Journaled) volume:

3) Hopefully you can now perform your desired erase, partition, installation or deployment on this drive.

NOTE: Use of the ‘sudo’ command may not be necessary for some of these actions, however, as long as you know the administrator account’s password, starting any unix command with ‘sudo’ will force the command to be run as the unix root user, so you shouldn’t have any permission issues executing the command.

Disclaimer:

While the author has taken care to provide our readers with accurate information, please use your discretion before acting upon information based on the blog post. Amsys will not compensate you in any way whatsoever if you ever happen to suffer a loss/inconvenience/damage because of/while making use of information in this blog.

Mac Disk Utility Unable To Unmount Volume For Repair Cost

This feature has been tested using OS X v10.9.2 which was the latest Mac OS release at the time of writing.