How to fix overallocation warnings

Several entries in this forum mention the overallocation warning that we can get when we use Disk Utility's first aid on an APFS container. Most posts are quite old and I have not seen a solution, so I tried to get one myself. Note that all steps were carefully performed with user accounts with admin rights.


This is what I did with my Mac running macOS Mojave


1) Create a bootable clone on an external drive, I used Carbon Copy Cloner and a Samsung T5.

2) Boot from the clone (press and hold the option key before power-up to get the boot menu)

3) Run DU first aid on the internal APFS container -> expand detail view

4) Scroll detail view up to find the path and name of the drive. In my case, it was /dev/disk0s2

5) Open Terminal

6) Enter sudo fsck_apfs -y -o /dev/disk0s2

The command will check all volumes of the container and then fix the overallocation

at the end of the procedure:

...

warning: Overallocation Detected on Main device: (187743823+1) bitmap address (16a44)

Fix overallocation (187743823+1) bitmap address (16a44)? YES

warning: Overallocation Detected on Main device: (187743825+1) bitmap address (16a44)

Fix overallocation (187743825+1) bitmap address (16a44)? YES

warning: Overallocation Detected on Main device: (192544935+1) bitmap address (13b69)

Fix overallocation (192544935+1) bitmap address (13b69)? YES

warning: Overallocation Detected on Main device: (201471821+1) bitmap address (13ca7)

Fix overallocation (201471821+1) bitmap address (13ca7)? YES

** The volume /dev/disk0s2 appears to be OK.


Wait until you get the prompt again, quit terminal and reboot your Mac from the internal drive.

If you now run DU first aid on the container, the overallocation warnings should be gone.


DISCLAIMER:

Using the Terminal requires a certain amount of care. Be sure to use the correct drive name as reported by DU. If anything goes wrong, you can run and restore your Mac from the clone.

iMac 27″, macOS 10.14

Posted on Nov 1, 2020 3:31 AM

Reply
Question marked as Top-ranking reply

Posted on Nov 28, 2020 4:38 AM

I was able to have the overallocation warnings "fixed" with the procedure I outlined in my first post. I did the "repair" running macOS Mojave booted from a clone of the built-in productive volume.


Please note that I first used DU to see what the container on the internal drive was called when booted from the external clone.


I have not tried to run the command when booted in recovery mode. The recovery volume is in the container that the command tries to fix. Not sure if it will work. Best try it - after having made a fresh clone.


You can always use the procedure outlined above by leroydouglas.

Similar questions

10 replies
Question marked as Top-ranking reply

Nov 28, 2020 4:38 AM in response to Jeff S.

I was able to have the overallocation warnings "fixed" with the procedure I outlined in my first post. I did the "repair" running macOS Mojave booted from a clone of the built-in productive volume.


Please note that I first used DU to see what the container on the internal drive was called when booted from the external clone.


I have not tried to run the command when booted in recovery mode. The recovery volume is in the container that the command tries to fix. Not sure if it will work. Best try it - after having made a fresh clone.


You can always use the procedure outlined above by leroydouglas.

Nov 2, 2020 6:31 PM in response to leroydouglas

leroydouglas wrote:


cgassler wrote:

Several entries in this forum mention the overallocation warning

I have never seen this warning, and in all honesty first I ever heard anything about it..

I've seen the overallocation warnings as well as underallocation warnings on some of our organization's Macs. You won't see these warnings unless you click on the "Show Details". First Aid reports everything is "Ok" (why Apple?).


I just clone the drive with CCC and completely erase the whole physical drive, then transfer the contents back. Since Apple doesn't trust First Aid to repair the issue, then I'm not going to trust it either so I am going to create a good clean file system to be safe.

Nov 2, 2020 9:40 PM in response to HWTech

" I just clone the drive with CCC and completely erase the whole physical drive, then transfer the contents back. Since Apple doesn't trust First Aid to repair the issue, then I'm not going to trust it either so I am going to create a good clean file system to be safe."


Doing as you write is the other way to deal with the drive issue. Nevertheless, fsck_apfs has that -o option to fix allocation issues or at least suppress the warning. Whether to trust the tool in both cases (setup and fixing) is another - fairly important - question.


I sure wished that Apple were more seriously considering to fix macOS issues, specially if they regard fundamental functionalities like the file system.

Nov 1, 2020 9:39 AM in response to cgassler

cgassler wrote:

...searching discussions (or the internet) delivers a few entries about the overallocation issue. It seems to have come up with the introduction of APFS. I first noticed the warnings after having added volumes to and removed volumes from a container last autumn, whether this was the cause of the issue, I cannot say, because I've not seen the effect afterwards. Maybe that Apple has fixed something silently in the meantime. As of today, DU offers no remedy unless you use the terminal.

I've not tried to fix it through recovery mode. I wanted to have an up-to-date backup and make sure that the requirement of using the -o option was met. Operating on a prod. drive deserves some extra caution too in my opinion.




thanks cgassler.

Nov 1, 2020 6:23 AM in response to cgassler

cgassler wrote:

Several entries in this forum mention the overallocation warning



I have never seen this warning, and in all honesty first I ever heard anything about it..


It begs the question, what lead to this problem for you in the first place?


Also it seems you could boot to Recovery or USB bootable installer vs your external bootclone (?)




Recovery: https://support.apple.com/en-us/HT204904


How to create a bootable installer for macOS - Apple Support


Nov 1, 2020 8:16 AM in response to leroydouglas

...searching discussions (or the internet) delivers a few entries about the overallocation issue. It seems to have come up with the introduction of APFS. I first noticed the warnings after having added volumes to and removed volumes from a container last autumn, whether this was the cause of the issue, I cannot say, because I've not seen the effect afterwards. Maybe that Apple has fixed something silently in the meantime. As of today, DU offers no remedy unless you use the terminal.


I've not tried to fix it through recovery mode. I wanted to have an up-to-date backup and make sure that the requirement of using the -o option was met. Operating on a prod. drive deserves some extra caution too in my opinion.



Nov 3, 2020 7:27 AM in response to cgassler

cgassler wrote:

I sure wished that Apple were more seriously considering to fix macOS issues, specially if they regard fundamental functionalities like the file system.

I agree! It is an awful experience where the macOS tools do not even report things accurately to the user. Hiding "unfixable" errors only makes it more frustrating to the user since they are unaware of the hidden issues that may be causing their problems. Plus their cryptic error messages provide no information or context and can sometimes appear really scary. And the list goes on and on........

Nov 4, 2020 8:31 AM in response to leroydouglas

Meanwhile, I've set up, from Mojave, a new external drive (Samsung T5) with a small HFS+ volume for an installer and the remaining for an APFS volume, to which I cloned my internal drive.


When I checked the clone with DU, it came up with a lot of overallocation warnings. After a reboot, the warnings did not show any more. Overallocation seems to be an issue that exists and can cure itself - or DU misinterprets something for the warnings.

At times, overallocation seems to stick.


Maybe that Catalina has fixed the issue? We'll never know until Apple issues a statement.


Note: I've sent a description to apple feedback, but have not yet received an answer.

Nov 27, 2020 9:34 PM in response to cgassler

Hi


I followed the steps above but used Super Duper rather than CCC to create a bootable clone.


For step 4, in Detail View the address of the Container was the same as in your example.


For step 5 I opened Terminal from the clone.


For step 6, sudo fsck_apfs -y -o /dev/disk0s2 returned an error stating that a volume was mounted with write access. The name of this drive appeared to be that of the Macintosh HD volume.


Couple of questions...


When you ran Terminal, did you run it from the clone or from the Recovery partition?


Do you know if this fsck command can be run from the Recovery partition?


Cheers and thanks



Jeff

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.

How to fix overallocation warnings

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