Disk utility has no option to expand HFS+ volume

disk-utilityhfs+partition

I'm trying to expand my HFS+ volume (selected in picture) to use adjacent space, but there is no option to do it in disk utility (!)

Partition tool shows no resize handle

I just resized my APFS partition in order to create the free space, so I know that this doesn't apply anymore:

Disk Utility won't touch things once you have a BOOTCAMP partition.

Disk utility in recovery mode as well as Gparted (Ubuntu 19.04) also seem unable to do it. What's going on?


Details

  • Macbook Air 2012, i.e. no UEFI boot for Windows
  • Bootcamp partition, i.e. hybrid MBR, i.e. creating another partition is out of the question
  • MacOS 10.14.4

Best Answer

If you successfully shrunk the APFS container partition to create free space, then macOS and Windows can not be used to add this free space to any other partition without destroying the contents of the other partition. Other solutions involve moving or copying other partitions.

You can only expand a partition downwards. You can not expand upwards. You shrunk the APFS container partition, therefore the free space resides directly below this partition. The only partition that can be expanded to claim this free space is the APFS partition itself.

You need to destroy the HFS+ partition and recreate it. First, you will need to backup any files you want to save. There is third party software which claims to be able move a HFS+ partition, but this usually take a long time to compete. Also, you should backup your important files before attempting. I should point out once you have made a backup, then could just destroy and recreate the HFS+ partition and avoid using third party software in any attempt to move the partition.

Just so you know, I download as bootable iso for Gparted and created a flash drive with an APFS, free space and JHFS+ partitions. I was able to boot from the iso in VirtualBox and move the JHFS+ partition on the flash drive. So, yes there is free third party tools that can move a JHFS+ partition. However, after moving the partition, I used the command diskutil verifyvolume on the JHFS+ volume. The verify failed with the messages given below.

$ diskutil verifyvolume disk1s3
Started file system verification on disk1s3 myhfs
Verifying file system
Volume was successfully unmounted
Performing fsck_hfs -fn -x /dev/rdisk1s3
Checking Journaled HFS Plus volume
Checking extents overflow file
Checking catalog file
Checking multi-linked files
Checking catalog hierarchy
Checking extended attributes file
Checking volume bitmap
Checking volume information
Volume header needs minor repair
The volume myhfs was found corrupt and needs to be repaired
File system check exit code is 8
Restoring the original state found as mounted
Error: -69845: File system verify or repair failed
Underlying error: 8: Exec format error

I run diskutil repairvolume with the following results.

$ diskutil repairvolume disk1s3
Started file system repair on disk1s3 myhfs
Repairing file system
Volume was successfully unmounted
Performing fsck_hfs -fy -x /dev/rdisk1s3
Checking Journaled HFS Plus volume
Checking extents overflow file
Checking catalog file
Checking multi-linked files
Checking catalog hierarchy
Checking extended attributes file
Checking volume bitmap
Checking volume information
Volume header needs minor repair
Repairing volume
Rechecking volume
Checking Journaled HFS Plus volume
Checking extents overflow file
Checking catalog file
Checking multi-linked files
Checking catalog hierarchy
Checking extended attributes file
Checking volume bitmap
Checking volume information
The volume myhfs was repaired successfully
File system check exit code is 0
Restoring the original state found as mounted
Finished file system repair on disk1s3 myhfs

After the repair, I was able to resize the JHFS+ formatted partition to reclaim the free space immediately after the partition.

Note: If your Mac is using hybrid partitioning, then you probably want to temporarily remove this hybrid partitioning before using third party tools such as Gparted. Once you have finished you could restore the hybrid partitioning. A good third party tool to enable and disable hybrid partitioning is gdisk.