I created a partition on my Fusion Drive when I first purchased my iMac running Yosemite, and I would like to now resize that drive ("Data" in the screenshot below), but Disk Utility doesn't allow it (the "Partition" button is disabled).
diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *121.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_CoreStorage Macintosh HD 121.0 GB disk0s2
3: Apple_Boot Boot OS X 134.2 MB disk0s3
/dev/disk1 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *3.0 TB disk1
1: EFI EFI 209.7 MB disk1s1
2: Apple_CoreStorage Macintosh HD 2.7 TB disk1s2
3: Apple_Boot Recovery HD 650.1 MB disk1s3
4: Apple_HFS Data 326.8 GB disk1s4
/dev/disk2 (internal, virtual):
#: TYPE NAME SIZE IDENTIFIER
0: Apple_HFS Macintosh HD +2.8 TB disk2
Logical Volume on disk0s2, disk1s2
03BC8817-F05E-4FC3-9A5C-50130CDAB3AB
Unencrypted Fusion Drive
diskutil cs list
CoreStorage logical volume groups (1 found)
|
+-- Logical Volume Group DFD31523-36BE-47AB-A666-54B64038E46B
=========================================================
Name: Macintosh HD
Status: Online
Size: 2793817645056 B (2.8 TB)
Free Space: 0 B (0 B)
|
+-< Physical Volume FEC1934B-53F8-49A1-ABE6-5155689D9A68
| ----------------------------------------------------
| Index: 0
| Disk: disk0s2
| Status: Online
| Size: 120988852224 B (121.0 GB)
|
+-< Physical Volume 4F985EA2-E22B-451F-BEB3-E5EF76D14A59
| ----------------------------------------------------
| Index: 1
| Disk: disk1s2
| Status: Online
| Size: 2672828792832 B (2.7 TB)
|
+-> Logical Volume Family 27D90160-503D-48B7-B434-798CEE738260
----------------------------------------------------------
Encryption Type: None
|
+-> Logical Volume 03BC8817-F05E-4FC3-9A5C-50130CDAB3AB
---------------------------------------------------
Disk: disk2
Status: Online
Size (Total): 2787630755840 B (2.8 TB)
Revertible: No
LV Name: Macintosh HD
Volume Name: Macintosh HD
Content Hint: Apple_HFS
LVG Type: Fusion, Sparse
Is there another way to expand the partition? Maybe a third party software solution?
Best Answer
The good message: you can resize both partitions with on-board tools. The bad message: you can't change the start block of a partition to a lower block number (i.e expand Data to lower block numbers). The partition Data has to be deleted first.
Preparation:
Restart to Internet Recovery Mode by pressing alt cmd R at startup. Booting to Recovery Mode is not conducive because the Recovery HD will be moved in one of the steps below. And you can't move a partition used as a boot volume.
The prerequisites are the latest firmware update installed, either ethernet or WLAN (WPA/WPA2) and a router with DHCP activated.
On a 50 Mbps-line it takes about 4 min (presenting a small animated globe) to boot into a recovery netboot image which usually is loaded from an Apple/Akamai server.
I recommend ethernet because it's more reliable. If you are restricted to WIFI and the boot process fails, just restart your Mac until you succeed booting.
Alternatively you may start from a bootable installer thumb drive (preferably Yosemite or El Capitan) or a thumb drive containing a full system (preferably Yosemite or El Capitan). If you boot to a full system and login as admin you have to prepend
sudo
to execute special commands likegpt ...
!Remove the partition Data and shrink the CoreStorage Volume Group
Booted to Internet Recovery Mode open Utilities → Terminal in the menubar and enter:
diskutil list
to get the disk identifiers anddiskutil cs list
to get a CoreStorage listing. Below I assume that your main disks have the disk identifiers disk0 (usually the SSD)/disk1(usually the HDD) and the CoreStorage Logical Volume disk2.First you have to remove the Data partition:
To remove a partition with
gpt
the disks (and all related disks like the inherent CoreStorage volume) have to be unmounted - first the CoreStorage Logical Volume and then the physical disks (SSD and HDD):Then you have to resize the Logical Volume Group:
in your case (assuming you want to "resize" Data to 1000 GB (3121 GB-1000=2121 GB):
Your Recovery HD should be moved automatically - regardless of whether shrinking or expanding the CS volume - to the very end of it.
Enter the following to get the new partition scheme:
To add a partition with
gpt
the disks (and all related disks like the inherent CoreStorage volume) has to be unmountedEnter
to create a new HFSJ+ partition on disk1. StartBlock is the number of the first block in the unallocated space and NumberOfBlocks is the number of free blocks or smaller. NumberOfBlocks has to be equally divisible through 8!
Example:
if the result of
gpt -r -vv show /dev/disk1
isthen StartBlock would be 106653192 and the NumberOfBlocks (27564503/8=3445562,875 -> 3445562*8) 27564496
The resulting gpt command to create a new JHFS+ partition occupying all available free space would be:
Enter
exit
and quit Terminal