Fork me on GitHub

File System Resizing



Mac OS X 10.4 and later

JHFS+ Partition Resizing

If a device map on an disk is configured with a GUID partition table then it is possible to resize the JHFS+ volume. The 'diskutil' command with the 'resizeVolume' argument is able to increase or decrease the size of an JHFS+ (Journaling enabled HFS+) partition within a GUID partition table.

Example Mac OS X 10.5.7

As an example if you have a 16TB device '/dev/disk3', then we can partition the disk with a 500GB JHFS+ partition and leave he rest of the disk as free space with the following command. :

diskutil partitionDisk /dev/disk3 2 GPTFormat JHFS+ mypartition 500G Free\ Space 1 0B

Next we can expand the partition 'mypartition mypartition' to 3TB with the following command.

diskutil resizeVolume /Volumes/mypartition 3T

This diskutil 'resizeVolume' command may be used to expand or contract the size of a volume.

If you issue the following command you will be able to see the limits that are set for resizing.

diskutil resizeVolume /Volumes/mypartition limits