3

I recently tried to install a bootcamp instance of Win 8.1. The install failed for some reason (wasn't clear from the error message). This left me with an unaddressable partition. I erased that partition in Disk Utility but now I am left with a hunk of Free Space that refuses to be deleted or merged with my Macintosh HD partition.

When I try to delete it from the UI nothing happens -- no error nothing. It just sits there. When I do it from the command prompt I get an error saying that operation isn't available.

PLEASE HELP!

Here's the output of the $diskutil cs list command. Note that this is a 1.1 TB drive and the 250GB Free Space partition doesn't show up here:

CoreStorage logical volume groups (1 found)
|
+-- Logical Volume Group B7C59032-4924-48FD-AE6C-6B937F443A5E
    =========================================================
    Name:         Macintosh HD
    Status:       Online
    Size:         842855342080 B (842.9 GB)
    Free Space:   114688 B (114.7 KB)
    |
    +-< Physical Volume 11715AE4-D61A-404B-8B5F-84E03E196A5C
    |   ----------------------------------------------------
    |   Index:    0
    |   Disk:     disk0s2
    |   Status:   Online
    |   Size:     120988852224 B (121.0 GB)
    |
    +-< Physical Volume 93E06B6F-E206-419D-9ED7-16426463BB3E
    |   ----------------------------------------------------
    |   Index:    1
    |   Disk:     disk1s2
    |   Status:   Online
    |   Size:     721866489856 B (721.9 GB)
    |
    +-> Logical Volume Family 294984BD-084E-40FB-8FD2-3B3DE40FA921
        ----------------------------------------------------------
        Encryption Status:       Unlocked
        Encryption Type:         None
        Conversion Status:       NoConversion
        Conversion Direction:    -none-
        Has Encrypted Extents:   No
        Fully Secure:            No
        Passphrase Required:     No
        |
        +-> Logical Volume DD3595D9-58B6-4745-8EC9-816F9ABE30E9
            ---------------------------------------------------
            Disk:                  disk2
            Status:                Online
            Size (Total):          836999970816 B (837.0 GB)
            Conversion Progress:   -none-
            Revertible:            No
            LV Name:               Macintosh HD
            Volume Name:           Macintosh HD
            Content Hint:          Apple_HFS

and for comparison the output of $diskutil list:

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage                         121.0 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                         721.9 GB   disk1s2
   3:                 Apple_Boot Boot OS X               650.0 MB   disk1s3
   4:                        EFI NO NAME                 104.9 MB   disk1s4
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Macintosh HD           *837.0 GB   disk2
                                 Logical Volume on disk0s2, disk1s2
                                 DD3595D9-58B6-4745-8EC9-816F9ABE30E9
                                 Unencrypted Fusion Drive

Finally here is a shot of the disk utility UI: Disk Utility UI: Free Space

Adding output of GPT as requested:

Thomass-iMac:~ moneill$ sudo gpt -r -vv show /dev/disk0
Password:
gpt show: /dev/disk0: mediasize=121332826112; sectorsize=512; blocks=236978176
gpt show: /dev/disk0: PMBR at sector 0
gpt show: /dev/disk0: Pri GPT at sector 1
gpt show: /dev/disk0: Sec GPT at sector 236978175
          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  236306352      2  GPT part - 53746F72-6167-11AA-AA11-00306543ECAC
  236715992     262144      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
  236978136          7         
  236978143         32         Sec GPT table
  236978175          1         Sec GPT header

And Disk1

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      615544         
  1412190208      204800      4  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
  1412395008   541130127         
  1953525135          32         Sec GPT table
  1953525167           1         Sec GPT header

`

2

6 Answers 6

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 and gpt -r -vvv show /dev/disk1
  • with the informations found in the different listings enter diskutil unmountDisk /dev/LogicalVolumeIdentifier and both diskutil unmountDisk /dev/DisksContainingApple_CoreStorageIdentifier
    In your case: first enter diskutil unmountDisk /dev/disk3, then diskutil unmountDisk /dev/disk0 and diskutil 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: first diskutil mountDisk /dev/disk0 and diskutil mountDisk /dev/disk1 and then diskutil 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 (check diskutil cs list).
  • Resize your Logical Volume with diskutil cs resizeVolume LVUUID LVGSize-128 MB. In your case that's diskutil 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% or diskutil 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
14
  • Thanks for the help here. One question: the Free Space isn't listed as Core Storage. The rest of the machine, i.e. Macintosh HD, is fully backed up to Time Machine. Commented Jan 25, 2015 at 13:33
  • I've added gpt output to the body of the original question. Thank you! Commented Jan 25, 2015 at 13:38
  • That's correct. You have to expand 'Physical Volume 93E06B6F-E206-419D-9ED7-16426463BB3E' (that's the part of your physical hdd-disk dedicated to CoreStorage) into the free space. In my example: diskutil cs resizeDisk 93E06B6F-E206-419D-9ED7-16426463BB3E 996351459328b.
    – klanomath
    Commented Jan 25, 2015 at 13:38
  • I will adapt my answer. But as mentioned by bmike and me better choose the long way
    – klanomath
    Commented Jan 25, 2015 at 13:40
  • Will do. By the way, I am comfortable with partitions, command line intefaces,etc. However, my experience has always been on the PC side. I've never had to manage partitions w/ a Mac, hence my confusion. Commented Jan 25, 2015 at 14:25
1

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!

3
  • Ok, I have question. Why didn't you use the Boot Camp Assistant application to remove the bootcamp windows partition in the first place? Is this option not available when you have a fusion drive? The web site Set up a Windows partition on your Mac for Boot Camp 5.1 details the remove procedure. Also, could you give the model identifier of your apple computer? Commented Jan 26, 2015 at 14:07
  • @MattONeill There might be better/faster solutions than my suggested. I'm still working on it and can't confirm it yet. The main hurdle is the fact that a lot of people in the same situation do something ostensibly (i hope that's the correct word) obvious to them: use Disk Utility to remove the Windows partition. Instead Bootcamp Assistant should be used to remove Windows 7/8, the additional EFI and expand the OS X volume (and underlying CoreStorage volumes) to the full size.
    – klanomath
    Commented Jan 26, 2015 at 14:15
  • I have (hopefully) some final questions. You removed the bootcamp window partition and restored your OS X partition. What happen to the tiny recovery partitions? Are they now gone? They were shown as TYPE Apple_Boot in the original output of the distutil list that you posted. It would be useful to post the output of diskutil list and distutil cs list to compare to the originals. BTW, I is assume your model identifier is iMac15,1. When you installed windows, could you tell if windows is using BIOS or EFI mode? (i.e. Does windows see the disk as an MBR or GPT disk?) Commented Jan 28, 2015 at 15:02
0

Usually this situation occurs when you use BootCamp to carve space out of the fusion drive to let the spinning HDD hold a windows partition.

Apple's tools don't easily let you resize things since the fusion layer is actually several components. The stock answer is to back up the volume to Time Machine and then erase / repartition both and start over with a new fusion drive.

I'd say, ask a second follow on question if you want to learn how to attempt to use the terminal to resize things and if you have a backup just in case things go south. The commands needed to resize the volume are partially undocumented and not supported by Apple even if we can patch something together that works on one version of OS X.

That question might be quite similar to this gem of a troubleshooting exercise.

(or perhaps your question is already boiling down to - how do I just wipe things and start over?)

0

I would go to the Disk Utility application and create a MS-DOS (FAT) partition named BOOTCAMP using all the remaining free space. Then go back to Bootcamp Assistant application and remove the Bootcamp windows partition.

6
  • Check the first picture of the question: You can't partition anything. There is no free space..
    – klanomath
    Commented Jan 25, 2015 at 15:01
  • OK, but gpt shows 277 GB of free space on disk1 right after index 4. Also, his disk utility snap shot does not show the + sign button grayed out. He should be able to click it and add a partition. Commented Jan 25, 2015 at 15:16
  • The current partition will be splitted into 2 different equally sized partitions then. If you click apply it finally will fail. Instead you may add a fat32 partition with gpt add ... named Bootcamp in the free space and later delete it with Bootcamp Assistant. I can't test this though.
    – klanomath
    Commented Jan 25, 2015 at 16:34
  • 1
    David, the very first thing i tried was using BCA to remove it. It failed and said I had to repair the disk. Commented Jan 27, 2015 at 15:10
  • Klanomath I tried exactly that -- adding a windows partition but it failed. Commented Jan 27, 2015 at 15:12
0

On yosemite, I created free space partition and couldn't remove it from disk utility. So this is what I ended up doing.

  1. get windows 7 or 8 64 bit iso
  2. follow the boot camp steps up to dividing hd(ssd) space.
    • preparing bootable USB along with boot camp control with device managers
    • boot camp assi. 5, BCA5
  3. exit from BCA5 on the dividing hd(ssd) space step.
  4. shutdown mac
  5. insert bootable USB
  6. turn on mac and press 'option' key right away.
  7. when you see startup disk selection screen, let go 'option' key
  8. select created bootable USB
  9. install win7/8, boot camp control
  10. after all the installation, boot back to mac by selecting mac as startup disk on boot camp control
  11. remove boot camp by using boot camp assistance(I didn't do this step b/c I was planning to use win8.1)
0

Struggling mightily to remove the BOOTCAMP partition while doing a clean install on my MacBook Air. Found many threads but this one has a lot of detail so posting my results here.

Bootcamp Assistant was happy to remove the partition for me but it got an error when it tried to merge the partitions together. The diskutil app could see the old 75GB partition but was unable to remove it.

I booted from a USB installer for 10.13 high Sierra but that disk utility was unable to remove the old partition either.

Went to terminal and tried command line diskutil but that made it more confusing. Disk0 had 3 sections but I was unable to see the old bootcamp partition. Instead there was another 20 disk images listed?! Commenters said this is common with APFS/fusionDrive but Im using HFS with an SSD. Each Image had mount paths even though I had erased the HFS partition several times.

Ultimately the fix for me was the diskutil eraseDisk command. This command was not mentioned in other threads. Since I was doing a clean install, this was the only way I found to fully erase the disk. The GUI tools would not do this.

After this, the full 250GB disk could use a single partition and the installer was happy. (I wasted 2 hours on this so I was less happy.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .