Disk Utility on Mac

Why did I get "operation failed" and "This disk needs to be repaired" when I tried to partition my Mac's hard drive?

Over the weekend, I finally had time to download and install the developer beta of macOS High Sierra. I decided to partition my hard drive so I could keep using my Mac for work without worrying that all my apps and programs would crash under the new software.

I was thwarted right from the start with an "Operation failed" error message while trying to partition my hard drive. Sigh.

After a bit of poking around, I finally came up with a solution that will, hopefully, work for anyone else that comes across this problem.

For reference, the error message for my particular issue was the following:

  • Invalid volume free block count
  • (It should be 10069792 instead of 10069785)
  • The volume Macintosh HD was found corrupt and needs to be repaired.

If you have an error significantly different than the one above, this troubleshooting guide might not solve your problem.

Step 1: Run First Aid in Disk Utility

The first step to fixing a hard drive disk is to run First Aid. It's a nice little feature included in all current Mac operating systems.

  1. While in Disk Utility, select the hard drive you want to run First Aid on. It should be called "Macintosh HD." It's your internal physical volume.
  2. Click on Run First Aid.
  3. Click Done when the process is complete.

Try creating a partition now. If it doesn't work, move on to Step 2.

Step 2: Restart Mac in Recovery Mode and Run First Aid again

You may get an "all clear" even though it's not. Or, you may get an error message again telling you to run First Aid in Recovery Mode. Either way, run First Aid again in Recovery Mode.

At this point, you may want to print this page or open it on a different device because you will no longer be able to see it on the Mac you are running in Recovery Mode.

  1. Restart your Mac.
  2. Press and hold Command and R at the same time just before your Mac restarts. You can tell right before it's going to restart when your cursor arrow disappears.

    Your Mac should load into Recovery Mode. If you don't see a black screen with a white Apple Logo, you may need to try it again.

  3. In Recovery Mode, click on Disk Utility.
  4. Select the hard drive you want to run First Aid on.
  5. Click on First Aid.
  6. Click Done when it is finished.

If you can't run first Aid on the drive — if the option is "grayed out" or un-clickable — you may need to disable FileVault in order to run First Aid on it. If that's the case, move on to Step 3.

Step 3: Disable FileVault and repeat Step 2

If the option to run First Aid on the drive you are trying to fix is grayed out, try unlocking it first by disabling FireVault. Restart your Mac in normal mode to go back to your screen to begin.

Note: You will need your Administrative log in credentials in order to access FileVault, so be sure you have them on hand before getting started.

  1. Click on the Apple menu in the upper left corner of the screen.
  2. Click on System Preferences.
  3. Click on Security & Privacy.
  4. Click on the FileVault tab.
  5. Click the lock in the bottom left corner of the window.
  6. Enter your admin credentials when prompted.
  7. Click Unlock.
  8. Click Turn Off FileVault.
  9. Click OK when prompted to confirm that you want to restart your Mac and turn off FileVault.

    After your Mac restarts, the system will begin un-encrypting your disk content. It should take about 15 minutes, but may take longer if you have a lot of content to un-encrypt.

Once you've turned off FileVault, repeat Step 2. You should now be able to select First Aid for the corrupted drive.

Any questions?

Do you have any questions about how to fix 'Invalid Volume free block count' when trying to partition your Mac's hard drive? Put them in the comments and I'll help you out.