This question already has an answer here:

I replaced my 250Gb HDD with a 500Gb SSD. The problem is that after installing my new SSD and copying all my stuff onto it, my SSD reports it has a single partition of 250Gb and free space of 250Gb instead of a single 500Gb partition.

This has more than likely come about because I cloned my SSD from my old HDD (it seemed like a good idea at the time!).

If I open Disk Utility, select my SSD and click the Partition button it shows the free space and the SSD with a resize control on the border between the two. The resize control won't let me drag it to the left (clockwise into the free space) no matter how much I try. It also won't let me create a new partition in the free space.screenshot of Disk Utility

My OS is High Sierra and the format is APFS.

I've had a look at some third party tools but haven't found any that work with APFS.

All the googling I've done on this subject suggests that Disk Utility doesn't work with all the features of APFS.

It seems it's possible to increase the size of a partition from the command line in Terminal but I can't find any instructions that deal specifically with my scenario. Here's the output from the diskutil list command:

diskutil list output

...and the output from sudo gpt -r show /dev/disk1:

output from gpt command

I've tried to resize the container using:

diskutil apfs resizeContainer disk0s2 500g

but this command throws an error:

The size (500g) must not be greater than the partition map allocatable size

Can anyone help? Ideally I'd like to have a single 500Gb partition.

marked as duplicate by klanomath, David Anderson, nohillside Dec 16 '17 at 21:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • The instruction for diskutil can be found by entering the command man diskutil. Use the q key to exit. Anyway, the resize command you entered is wrong. The correct command is diskutil apfs resizeContainer disk1 0. Unfortunately, this command probably not going to fix your problem. – David Anderson Dec 15 '17 at 19:24
  • You can not run gpt on a synthesized disk. So, I am not sure how you could have posted the output shown above. – David Anderson Dec 15 '17 at 19:43
  • @DavidAnderson The command is more or less correct except the size which should be smaller than 500.1 GB - 209.7 MB ~499890m (or better 0 which is a magical size and increases the slice to the possible max). – klanomath Dec 16 '17 at 20:05
  • I suspect it is hopeless trying to determine how to fix your problem. I would suggest that you post a new question explaining how you copied all your stuff the the new drive. Most likely this is where you made your mistake. I think an answer could be posted explaining how you should have copied to your new drive. – David Anderson Dec 16 '17 at 22:11
  • I've had the same problem, caused by the same reason. Here's how I fixed it: 1. create gparted live USB; 2. boot from that USB and get to gparted; 3. Upon launch gparted will say that GPT uses less space then available and suggest to fix - click the fix button; 4. In gparted, create a partition (HFS+ would do) from the unallocated space; 5. boot back to macOS, open DiskUtility -> partition disk -> delete the newly created partition (former empty space). As part of deletion, Disk Utility will expand macOS partition to take up entire disk. That was a tough one. – Dannie P Jun 7 '18 at 23:30

Browse other questions tagged .