Context: I wanted to install Windows 8 onto my Mac by repartitioning my FusionDrive. Using the partition BootCamp provided didn't work, so I found a "solution" on Apple forums to create empty space instead and have the Windows installation media create a partition. Windows created the partition, but wouldn't install.
I went back to DiskUtility to erase the partitions it created (1 big one and 2 small ones). After trying to get rid of them I'm now stuck with a large amount of empty space in my FusionDrive and DiskUtility won't let me fill it or resize anything regarding the empty space (I've tried this in recovery mode too).
Here is what my DiskUtility looks like (ignore the 16GB USB):
The two drives my FusionDrive is compromised of are disk0 (1TB HDD) and disk1 (100GB SSD) from here:
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *120.0 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_CoreStorage 119.7 GB disk0s2
3: Apple_Boot Boot OS X 134.2 MB disk0s3
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk1
1: EFI EFI 209.7 MB disk1s1
2: Apple_CoreStorage 626.1 GB disk1s2
3: Apple_Boot Recovery HD 650.1 MB disk1s3
4: EFI NO NAME 104.9 MB disk1s4
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: Apple_HFS Macintosh HD *739.9 GB disk2
/dev/disk3
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *15.9 GB disk3
1: DOS_FAT_32 WININSTALL 15.9 GB disk3s1
You can see that my FusionDrive is disk2, and shows up with around 740GB.
Here is my CoreStorage list (I believe this is helpful):
CoreStorage logical volume groups (1 found)
|
+-- Logical Volume Group 57932797-4AC8-4475-9836-82394CEBF536
=========================================================
Name: LogicalVolumeGroup
Status: Online
Size: 745750200320 B (745.8 GB)
Free Space: 353689600 B (353.7 MB)
|
+-< Physical Volume 68F90B2B-4004-4044-AFFB-9D3854006D2A
| ----------------------------------------------------
| Index: 0
| Disk: disk0s2
| Status: Online
| Size: 119690149888 B (119.7 GB)
|
+-< Physical Volume 9CB6C261-6817-42F0-B2EB-09F057462EBD
| ----------------------------------------------------
| Index: 1
| Disk: disk1s2
| Status: Online
| Size: 626060050432 B (626.1 GB)
|
+-> Logical Volume Family 9B947A52-7496-46CA-BFA5-A87DD47249FE
----------------------------------------------------------
Encryption Status: Unlocked
Encryption Type: None
Conversion Status: NoConversion
Conversion Direction: -none-
Has Encrypted Extents: No
Fully Secure: No
Passphrase Required: No
|
+-> Logical Volume 86417B41-6400-4F81-8F7C-43AA243CDAEE
---------------------------------------------------
Disk: disk2
Status: Online
Size (Total): 739901915136 B (739.9 GB)
Conversion Progress: -none-
Revertible: No
LV Name: Macintosh HD
Volume Name: Macintosh HD
Content Hint: Apple_HFS
How can I regain my FusionDrive's empty space?
Best Answer
Basically the same applies as in this question and the accepted answer. The only difference is that you have a fusion drive and therefore some DiskIdentifiers differ.
Additionally you have a blocking partition on your HDD with certainty which has to be removed.
There is one undocumented command to resize or expand a CoreStorage volume group and an inherent logical volume:
The command expands or shrinks the whole CoreStorage Volume Group including the physical volume(s), the logical volume family and the logical volume in one step to the desired size.
Beware: The command is vastly undocumented and as such potentially destructive.
Preparation:
Restart to Internet Recovery Mode by pressing alt cmd R at startup.
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 to 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 (Mavericks or Yosemite) or a thumb drive containing a full system (Mavericks or Yosemite). The disk identifiers may differ then. So check the human readable names and sizes and change the commands below accordingly.
Get an overview:
Open in the menubar Utilities/Terminal
First you should get an overview of your disks and the partition layout:
Enter
diskutil list
Example listing (but I took the list provided by you in your question and included the netboot device):
Disk0 is your first main internal disk device (SSD) containing an EFI-partition (dis0s1), one CoreStorage partition (disk0s2) and Boot OS X (disk0s3).
Disk1 is your second main internal disk device (HDD) containing an EFI-partition (dis1s1), one CoreStorage partition (disk1s2) and the Recovery HD (disk1s3). Additionally the disk contains a second EFI partition (disk1s4), which is a remains of your failed Boot Camp install.
Disk2 is a logical disk created by booting to the netboot image which contains a recovery system (OS X Base System = disk2s2) similar to the Recovery HD.
Disk3 is also a logical disk residing in disk0s2 and disk1s2 and it contains the CoreStorage stack.
Enter
gpt -r -vv show /dev/disk1
to get the index number of the blocking partitionExample listing (your sizes differ):
The partition with the index number 1 is a regular EFI-partition, the partition with index number 2 is your second CoreStorage physical volume and the partition with index number 3 is your Recovery HD.
The partition with index number 4 (= No Name EFI) usually only exists if you had a failed Boot Camp install or removed a subsequent Windows partition manually. All the rest is unallocated free space (in the example 27359703 blocks à 512 B).
Enter
diskutil cs list
Example listing (but I took the list provided by you in your question):
Remove blocking partition:
to resize the CoreStorage volume you have to delete any blocking partition first (the Recovery HD doesn't count because it usually will be moved with the resizeStack command).
First you have to unmount all mounted volumes on disk0 and disk1 (first the CoreStorage volume, which has its own disk identifier disk3 but resides on disk0 and disk1, then all other mounted volumes on disk0 and disk1 - check this with
df
):then additional volumes (if you have any at all). Example:
Now delete the NoName EFI partition by entering:
Remount any previously unmounted volume in the reverse order with
Modify CoreStorage stack:
Since any blocking partition (in your case the NO NAME EFI partition) is deleted you may now resize the CoreStorage volume with
with LVUUID: UUID of the logical volume and size: the final size of your CoreStorage volume.
Examples:
to expand it to 900 GB
to shrink it to 500 GB
to expand it to the full available size (0g is a magic number here).
Your Recovery HD should be moved automatically - regardless of whether shrinking or expanding the CS volume - to the very end of it (right after the CoreStorage volume).
Enter the following to get the new partition scheme:
and
to create a new partition. 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 dividable through 8!
exit
and quit Terminal.