A few days ago I decided to wipe clean my desktop Mac and reinstall everything from scratch as I had not done it in a few years.
That was the beginning of a learned lesson and a ton of pain that I didn’t know I was about to experience.
I wiped out all partitions and reinstalled the OS using a USB stick with El Capitan 10.11 – Everything worked as the setup goes, too bad that nothing really was working under the hood. The console was plastered of errors like:
fmfd(384) deny file-read-metadata /Volumes/Macintosh HD
or many other types of Sandbox can’t write this, and that or Address book can’t read or access something..something.
A ginormous pain in the butt as the system was becoming slowing less and less reliable as those errors were piling up without control…
In the process of re-installing multiple times and trying every possible “solution” found in forums and other venues, I messed my partition layout to the point of non-return. That is when I realized that my Mac uses a Fusion drive. Which means a mechanical HD and a Flash hard drive that the system sees as one logical entity. That is a smart way for the system to place on the faster one (Flash) most-used files and perform another smart I/O things.
At this point, I knew that I had dropped gasoline on the fire, but I wasn’t sure how to get out that mess. The video below was crucial to understanding the concept behind Fusion and also how to create your own if you ever desire to do so. Highly recommended.
At this point, I came to the conclusion that CoreStorage is the piece of technology that allows the smart swapping of data between the two storage technologies. That led me to realize what type of tools I had to deal with.
I attended at WWDC 16 which means on my spare machine I installed Sierra and naturally as part of that process I upgraded my iCloud account to the latest format. Which until I re-installed everything it wasn’t a problem however as soon I reinstalled (one of the zillions of times during the process) my iCloud Drive was adding additional fuel to the fire increasing instability and a furor of additional logging into the console.
If you end up in this mess, here what I did to resolve my problem:
- Recreated partition compatible with CoreStorage
- Disabled System Protection
- Check that that spotlight denies errors were not generated by some kind of files that couldn’t be processed by the mdworker/engine.
- Fix issues reported as LaunchServices (LSD) using the marked as helpful thread
- Installed OS X Server (which was the final nail in the coffin to resolve)
- Booting in Safe Mode to enforce the system in fixing permission and then rebooting back to normal boot
- Run Onyx for a final permission fix
Good luck, you are gonna need it.
Rebuilding partition for Core Storage
To confirm that you no longer have a CoreStorage on board, try doing
diskutil cs list, and if you get back an error about “No Core Storage volumes found”
First, take inventory of your partitions with
diskutil list. Identify the device identifiers of the two disks you want to combine. I’m going to assume they’re
Then we create a new logical volume group:
diskutil cs createLVG "FIGA-1" /dev/disk0 /dev/disk1
(Obviously, change the name to something you’d prefer.)
Now you need to create a logical volume within this LVG:
diskutil cs createLV "FIGA-1" HFS+J "My New Volume" 100%
This creates a volume named “My New Volume” in the logical volume group “FIGA-1”, and takes up all of the available space.
When you create and FIGA from two different physical media that operate at different speeds (e.g. an SSD and a platter drive), OS X automatically infers that it should be used as a Fusion drive.