How to fix or restore the 3TB Fusion Drive macOS install after Boot Camp partitioning error

bootcampdisk-utilityfusion-drivepartitionrecovery

What I have:
– 27" 2012 Mac with 3TB Fusion Drive
– 3.4 GHz Core i7 (3770) ("Ivy Bridge") processor
– 24 GB RAM

I was trying to set it up with a Boot Camp partition for Windows 10. The story so far:

  • Machine came with virgin install of Sierra. I restored from my Time Machine backup of my iMac 9,1 (also with Sierra installed), and everything worked normally.
  • The new machine inherited the Time Machine backup from the old one and was fully backed up.
  • I ran Boot Camp Assistant to download the Boot Camp files, put the Windows 10 iso on a flash drive, and partition the disk.
  • During this process, I was only able to choose a maximum partition size for Windows of 640 GB, with the Mac partition being about 2454 GB if I recall correctly.
  • The partitioning failed with an error message, and it told me to repair the disk in Disk Utility
  • I went to Disk Utility and performed repair (on the 'whole disk' and the disk volume named Macintosh HD). No problems were found and the repair exited normally.
  • I continued with Boot Camp Assistant, which had stayed open, and tried to partition the disk again. As before, 640 GB was the maximum allowable for Windows.
  • The process appeared to hang, I left it for over half an hour before force quitting. I guess this was a bad mistake, perhaps it just takes a long time anyway.
  • After force quitting, the Mac slowed to a crawl. I entered Disk Utility which showed the capacity as about 3 TB and the used space about 0.04 TB less than that. Before this, the used space was about 1.6 TB.
  • I ran First Aid in Disk Utility and after this process the Disk Capacity was reduced to 1.67 TB with 0.04 TB free. The computer continued to run at a crawl, presumably because of the lack of free space on the disk.
  • I booted off my Time Machine backup, which booted into the recovery environment.
  • I erased the Fusion Drive, which restored the capacity to 3TB.
  • Next, possibly another big mistake, I chose Restore and then chose my Time Machine disk. But I did this from inside Disk Utility rather than from the main menu of the recovery environment.
  • The restore completed and verified. The Fusion Drive was now named 2TBTimeMachine instead of Macintosh HD.
  • When I tried to reboot, the Apple logo appeared with a progress bar, and then a grey screen with a circle with a diagonal line through it.
  • I booted from the Time Machine disk again (to the recovery environment). I ran First Aid, first on the whole disk, which appeared to fix one thing. I can't remember what this was but I remember it said '1 newer' of whatever it changed.
  • I then ran First Aid on the disk named 2TBTimeMachine (i.e. the Fusion Drive), which found several problems and reported that it successfully fixed them. I'm sorry, I don't remember what issues it found and fixed.
  • I tried rebooting again, which led to the same circle with diagonal line. Before that, I tried to select the startup disk from the recovery environment, which showed no startup disks available at all.
  • Currently I am redoing the Time Machine backup from my old Mac and intend to try and restore that to the new Mac. I am writing this from the Internet Recovery Environment on my new Mac.

I have a few questions:

  • What mistakes did I make in the process above?
  • Will I be able to restore to the new disk without erasing it first (i.e. will it replace all content on the disk)? The reason I ask is because the Internet Recovery Environment seems to have an older version of Disk Utility, and I don't want to risk erasing the disk from this version of Disk Utility in case it doesn't know about Fusion Drives.
  • Is there any benefit to installing Mac OS X Mountain Lion from the Internet Recovery Environment? I don't know why Mountain Lion is the only option here. Is it likely to cause further problems if I install Mountain Lion and from that install upgrade to Sierra?
  • Do I need to 'rebuild' the Fusion Drive and can you provide or direct me to a clear set of instructions for doing this?

Best Answer

I recommend to do the following:

  1. Create a bootable macOS Sierra installer thumb drive or if you are restricted to your iMac9,1 a bootable El Capitan installer thumb drive (same link).
  2. Boot the iMac13,2 with the thumb drive
  3. Open Terminal in the menubar > Utilities > Terminal
  4. Enter diskutil list and diskutil cs list to get an overview
  5. Destroy the LVG:

    diskutil cs delete lvgUUID #lvgUUID: UUID of the Logical Volume Group
    
  6. Enter exit to quit Terminal.app and open Disk Utility
  7. Completely erase both disks (each to one volume with the names e.g. "fusion1" and "fusion2" but not "Macintosh HD").
  8. Open Terminal again and get the device identifiers again: diskutil list
  9. Create a new LVG and LV (here I assume the 120 GB SSD has the disk identifier disk0 and the 3 TB HDD disk1 - they might be different though!):

    diskutil cs create Fusion disk0 disk1
    diskutil cs createVolume lvgUUID jhfs+ "Macintosh HD" 100% #replace lvgUUID with the UUID shown in the output of the previous command
    
  10. Enter exit to quit Terminal.app
  11. After finishing the iMac9,1 backup to your TM backup drive, attach the drive to your iMac13,2 and in the Utilities windows choose Restore from Time Machine Backup > Select backup source > ...choose the drive and restore it to your Macintosh HD volume.
  12. After the restore task has finished successfully, boot your iMac13,2 normally. Check if a RecoveryHD is present by opening Terminal and entering diskutil list.
  13. If the RecoveryHD is missing, simply reinstall Sierra with the latest Sierra installer downloaded from the App Store - which shouldn't affect your data but creates an additional RecoveryHD - or use the Recovery Partition Creator 4.