This may be specific to running OS X within a virtual machine, but I ran into some issues resizing the partition where OS X is installed.
I run a number of virtual machines for testing, and for whatever reason, I originally created my OS X 10.11 El Capitan VM with only a 40GB disk. The 10.11.4 update dropped today, which I went to install, and after downloading was told there wasn’t enough disk space to install the update.
“Easy!” I thought. “I’ve done this before.”
Resizing a virtual disk with VMWare is easy, but you still need to resize the partition within the virtual machine once it has been expanded.
The new Disk Utility in El Capitan is a bit special. While everything is technically still in there, it feels much harder to operate.
The disk is showing the new 60GB capacity.
What was really weird was that any option to resize the volume appeared to be disabled.
But the volume is still 40GB, with no apparent free space.
Instead, I had to turn to the
diskutil list shows me a list of all the disks and volumes in the system.
The disk (GUID_partition_scheme) is showing the 60GB total size, and the Macintosh HD volume is still 40GB.
resizeVolume command which makes resizing really easy. All you need to know is the name of the volume, and how much space you want to add (or remove).
It’s even easier if you want to expand the volume to as big as it can go: you can use
R as the size parameter, which uses all it can.
In the end my command was:
diskutil resizeVolume "Macintosh HD" R
You can also use the IDENTIFIER instead of the volume name. In this case it would have been
disk0s2, which you can see in the
diskutil list output.
You get a nice little progress bar while it’s expanding.
And afterwards, your new space is available without having to reboot.
What’s weird is now after the resize, back in the Disk Utility application, all the correct options to resize the volume are back again! I can drag the partition marker now, and choose to add a new partition.