Can not delete Free Space on iMac 5K: Partition doesn't appear in CS list
Solution 1:
Preliminary remark
Like bmike already mentioned: the path
- back up the CoreStorage Volume to Time Machine
- and then erase / repartition both and start over with a new fusion drive
should be preferred.
Preparation:
- Detach any external drive (especially your external Time Machine backup drive)
-
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 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 (Mavericks or Yosemite) or a thumb drive containing a full system (Mavericks or Yosemite).
Below I assume that the disk identifier of your Internet Recovery HD (OS X Base System) or thumb drive is disk2, disk0 is your SSD, disk1 your HDD and disk3 your CoreStorage Logical Volume.
'Repair': (not recommended because of potential data loss)
First try to check the volume 'Macintosh HD' with Disk Utility. If the volume is corrupted consider a backup - if possible - and a reinstall of Mac OS X.
If the volume is OK quit Disk Utility
- Open Terminal and enter
diskutil list
,diskutil cs list
,gpt -r -vvv show /dev/disk0
andgpt -r -vvv show /dev/disk1
- with the informations found in the different listings enter
diskutil unmountDisk /dev/LogicalVolumeIdentifier
and bothdiskutil unmountDisk /dev/DisksContainingApple_CoreStorageIdentifier
In your case: first enterdiskutil unmountDisk /dev/disk3
, thendiskutil unmountDisk /dev/disk0
anddiskutil unmountDisk /dev/disk1
- remove the EFI NO NAME partition with
gpt remove -i IndexNumberOfEFINoName DiskIdentifier
:
In your case:gpt remove -i 4 disk1
- Remount the CoreStorage disks and then the Logical Volume:
In your case: firstdiskutil mountDisk /dev/disk0
anddiskutil mountDisk /dev/disk1
and thendiskutil mount /dev/disk3
. -
enter
gpt -r -vvv show /dev/HDDApple_CoreStorageIdentfier
to get verbose partition data of your HDD CoreStorage disk.
In your case:gpt -r -vvv show /dev/disk1
It should look similar to the example below:Thomass-iMac:~ moneill$ sudo gpt -r -vv show /dev/disk1 gpt show: /dev/disk1: mediasize=1000204886016; sectorsize=512; blocks=1953525168 gpt show: /dev/disk1: PMBR at sector 0 gpt show: /dev/disk1: Pri GPT at sector 1 gpt show: /dev/disk1: Sec GPT at sector 1953525167 start size index contents 0 1 PMBR 1 1 Pri GPT header 2 32 Pri GPT table 34 6 40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B 409640 1409895488 2 GPT part - 53746F72-6167-11AA-AA11-00306543ECAC 1410305128 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC 1411574664 541950471 1953525135 32 Sec GPT table 1953525167 1 Sec GPT header
-
The free space consists of 541950471 blocks here.
Calculate the biggest block number dividable through 8. That are 541950464 blocks (á 512 bytes) which equals 277478637568 B or ~277.5 GB.
Add the size of your HDD CoreStorage Physical Volume (721866489856 B in your case).The result is 277478637568 B + 721866489856 B = 999345127424 B
- Resize your HDD CoreStorage physical volume with
diskutil cs resizeDisk HDD-PVUUID newsize
In your case:diskutil cs resizeDisk 93E06B6F-E206-419D-9ED7-16426463BB3E 999345127424b
- Calculate the maximal size of your CoreStorage Logical Volume (refresh
diskutil cs list
) = size disk0s2 + size disk1s2.
In your case that's 120988852224 B + 999345127424 B = 1120333979648 B. That should also be the size of your extended Logical Volume Group (checkdiskutil cs list
). -
Resize your Logical Volume with
diskutil cs resizeVolume LVUUID LVGSize-128 MB
. In your case that'sdiskutil cs resizeVolume DD3595D9-58B6-4745-8EC9-816F9ABE30E9 1120205979648b
. If you get an error (There is not enough free space...) choose a smaller size like 1120141979648b (=LVGSize-192 MB).Magical numbers like
diskutil cs resizeVolume LVUUID 100%
ordiskutil cs resizeVolume LVUUID 0g
sadly don't work here - at least for me. - Quit Terminal and open Disk Utility.
- Check your expanded CoreStorage Volume for errors.
- Quit Disk Utility, choose your now expanded CoreStorage volume as startup disk and restart your Mac
Solution 2:
Thanks to @klanomath for a great answer. It's amazing to me that the only way to do this is such a destructive one. I will outline here a few things I learned and maybe a little bit of an abstraction of the problem.
- The FusionDrive, as the name suggests, is actually two physical drives fused together.
- Occasionally when setting up BOOTCAMP, the Windows partition is corrupted or otherwise screwed up. Of the three times I tried to set up a Win8.1 BC drive two failed this way.
- The Windows partition is impossible to remove using the Disk Utility or the diskutil command in terminal.
- You can not add or alter the partition.
- DiskUtility UI can not alter these, even in Recovery Mode.
- What you need to do is, in a nutshell:
- Back up your system using Time Machine
- Boot into Recovery Mode using either Internet Recovery
- Launch TERMINAL under UTILITIES and, using the command line, delete the Logical and Physical partitions
- You then are left with an SSD (128GB) and an HDD (988GB) (adding up to 1TB in my case)
- You then re-fuse these two together using the command line and re left with an empty 1TB (in my case) drive
- Finally, you plug in your Time Machine back up and restore
I don't know but none of the descriptions made it clear what was actually happening so I thought I'd provide this answer. The details in the above thread work well but when I finally clicked on what I was doing, I thought I'd share.
I find it crazy that OS X's Disk Utility a) screws this up so badly and b) can't fix it without a full reformatting!