How do you INCREASE the size of an APFS volume?

Lumus picture Lumus · Dec 7, 2017 · Viewed 16.8k times · Source

I've created an APFS volume on a MBP running High Sierra in order to use it as a Time Machine drive for the iMac I use at work (we don't have a backup solution so this is my hacky way to keep myself safe as the MPB itself is backed up separately).

I foolishly assumed 100GB would be enough (as I only back up certain folders) however in less than a week the iMac has filled it and Time Machine is complaining about insufficient disk space.

I am trying to figure out a way to expand the volume (to say 150GB) however every help page and blog I can find shows you how to shrink a container.

I've tried using Disk Utility but it doesn't give me the option to resize individual volumes (only the overall container). Disk Utility Screenshot

I've also tried using the diskutil in terminal but don't want to break things.

I'd prefer not to dump and re-create the partition of possible, but if it's the only option I will deal with it.

Cheers

Matt

Answer

Sam G picture Sam G · Jan 11, 2018

Find out your container first with: diskutil apfs list

Say you found out its disk0, then you do:

sudo diskutil apfs resizeContainer disk0 0

In my example (see screenshots) you see that disk1 container grew, and this was the one line in the output that indicates a happier you:

"Growing APFS Physical Store disk0s2 from 864,999,997,440 to 1,000,345,825,280 bytes"

Before and after output of diskutil list: (note disk1)

enter image description here enter image description here