You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Disk Utility - can't repair volume because other APFS volumes in its container are mounted.

Hope someone can help with this issue

Turned my mac on the other day and the bar only gets halfway across the loading screen. Gets further in safe mode but not to login screen. Tried resetting PRAM no luck

When I boot to disk utility in recovery First Aid fails with the following message

- repairing file system

- volume was successfully unmounted

- can't repair volume because other APFS volumes in its container are mounted. Unmount them, or perform a repair while running from another macOS system (such as the recovery system)

- restoring the original state found as mounted

- unable to unmount volume for repair

- operation failed


Is there a way past this

I fitted a new Samsung SD about 3 months ago which has been working fine

Also if I have to reinstall is there a way to check my Time machine backup is ok before I wipe over everything with it?


Posted on Oct 16, 2019 2:15 AM

Reply

Similar questions

14 replies

Oct 17, 2019 11:15 AM in response to mpazza69

When you boot in Recover mode start the Disk Utility from the Utilities menu


You should see the mounted volumes as a list of volumes on the left -- click on each of these (don't click on devices or containers) and the mount point is shown in the main DU window -- if there are any mount points shown as /Volumes/xxx then unmount them using the Disk Utility program by highlighting the volume name (not the device) and clicking the menu item File/Unmount -- do not unmount the recovery boot volume (it will show it's mount point as just / -- it will show the Unmount option as greyed out and won't allow you to unmount as you cannot unmount the volume the mac OS is currently running from).


Does that allow you to continue the installation?


Good luck...

Oct 18, 2019 2:22 AM in response to dot.com

Thanks,

Before I got your reply I managed to boot the Mac from the old drive connected with USB I took out in July.

First aid ran but found no problems on the new drive I restarted it and same problem - the progress bar sticks at about 60% on start-up.

I can see my user folders on the new SSD when I boot using the old drive but it says I don't have permission to open them. Is there a way to get round this so I could retrieve my files from the last 3 months and then wipe and reinstall?

The other possible way is I have a time capsule which was working but when I unplugged everything the other day it wouldn't start up again for more than a few seconds. I took it apart and put the disk in a caddy and it works and shows 3 volumes on the desktop but I don't know how to get the files off the time machine backup now it is now longer in the capsule.

Oct 18, 2019 5:52 AM in response to mpazza69

Perhaps you might want to try a boot into single user mode? Hold down command+s during power up. You will see a lot of text messages (no guy mode yet) and hopefully a clue about what the problem is.


If it gets to a "#" prompt just type the word "exit" (without the quotes) to continue the boot process and look closely for more errors. It might erase the screen and go into GUI mode depending on when the "hang" takes place in the boot-up process.


Good luck...

Oct 18, 2019 11:03 AM in response to dot.com

Thread reply - more options

ls -lan /Volumes/SSD-vol/Users
ls -lan /Volumes/OLD-usb/Users

The results of these entries into terminal are different for the two disks


the main user folder on the new ssd is

drwxr-xr-x@ 18 503  20  576

on the old disk

drwxr-xr-x+ 18 502  20  612


Single user mode I am new to but what stuck out was "disk1s1: device is not readable.

hfs_mountfs: buf_meta_bread failed with 13


Appreciate all the help so far as I am quite new to Macs!

Oct 18, 2019 4:21 PM in response to mpazza69

Well, congratulations -- you discovered the real problem-- the old disk /Users and new disk /Users contents are not owned by the same userid (am assuming there is only one in each of the /Users tree?) -- so the files/folders are owned by different users (502 on old and 503 on new).


So am guessing you installed a new user a couple of times on new ssd and removed the old ones and on the old disk when it was the boot disk that you did that only once? Normally the first user you create is userid=501 and then if you use the Setup Assistant to migrate your old user home folder and contents to the new install, it doesn't create any new users it just copies the old 501 owned stuff from the old disk to the new disk and everything works as it did before.


Let's call your new username on the ssd disk yyy=503 and your old username on usb disk xxx=502 -- To solve the problem now is a bit more complicated as you need to find out if ownership of all the files in the old disk /Volumes/Old-USB/Users/xxx folder (where xxx is your username:group) is the same userid and groupid. To do that we need to do a little work to see how many different userid's own files in your xxx user, so try these commands:


cd /Volumes/Old-USB/Users/xxx
sudo find -x . -uid 502 | wc
sudo find -x . -ls | wc


You will be prompted for admin password so give it and then hit enter/return key.


These commands first set the default directory to /Volumes/Old-USB/Users/xxx and then look at all the files/folders below this to see how many are owned by 502 user and then see how many in total there are -- if those numbers are the same, then 502 user owns all files/folders which is what we're hoping. If they are not the same then tell us the numbers and we'll need more work.


If they are the same, then we need to make sure all are also owned by the same group (20 in your case), so to do that:


cd /Volumes/Old-USB/Users/xxx
sudo find -x . -gid 20 | wc
sudo find -x . -ls | wc


Again we're hoping for the same numbers, which means all files/folders are owned by group 20.


If both comparisons give the same numbers, then the easiest thing to do would be to create a new user when booted on the SSD disk and give it the userid code of 502 instead of accepting the default which is always one greater than the current highest, which in your case would be 504 (one greater than the existing 503 user). So run the System Preferences Users & Groups pane and create the new 502 user (and call it xxx just so you can have same username as you used to (perhaps you might want a different username so you can tell old from new??? -- and also make it an admin type user), then still logged in as the 503 user do the following (the following assumes the new short-form username you created is xxx):


cd /Volumes/New-SSD/Users
sudo mv xxx newxxx
sudo mkdir xxx
sudo chown 502:20 xxx
cd xxx
sudo cp -r -p /Volumes/Old-USB/Users/xxx .


This will copy all files from the old-usb/xxx user folder tree to the folder named xxx we just created in /Volumes/New-SSD/Users/xxx and maintain all the same permissions and attributes and hopefully all your problems are now solved. Since you didn't make any changes to the /Volumes/Old-USB disk, you can still boot off that and things should still work fine since we didn't really change anything there.


Does all this make sense? If not, ask questions first, not afterwards, because mistakes will cause problems - possibly big ones.

You're the one doing all this stuff, and if you follow instructions and I didn't make any typos and you don't make any mistakes things should be OK, but because I'm not there looking over your shoulder if there is a problem, this is all up to you -- no guarantees and no hard feelings if things don't work out, OK? The worst thing that might happen is you have to reinstall the OS and start over, but since we didn't change anything on the old disk, you will be able to try again if things don't work out correctly.


Good luck...

Oct 20, 2019 9:33 AM in response to dot.com

Thanks for the very detailed instructions. I can see I will be able to follow them up to the bit where you say to boot using the ssd as that is the original problem - the login gets stuck on the progress bar when I boot to the ssd drive.

The USB drive is from 3 months ago so does not have my most recent files.

Would I better trying to access my files off my time capsule?I have taken the drive out of it as the power supply broke this week and it shows as a 980gb image but I don't know how to retrieve the latest backup from it as it doesn't seem to mount when I double click it.

Thanks again

Disk Utility - can't repair volume because other APFS volumes in its container are mounted.

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