Tag Archives: Hack

How to stop a failed FileVault encryption (at least partly)

With the upgrade to the second public beta version of OS X 10.10 Yosemite [1], I took the decision to enable FileVault to encrypt my disk. Setting the checkbox on the installation didn’t ring any bell in my head, so I went forward without thinking what such a simple click might do. Who needs backups? Who cares about installed software and licences? Who needs a laptop to work?

Anyway, this click resulted that after the installation of the new beta version, the operating system started to encrypt my hard drive. It started and actually never stopped – showing my over 1000 days left for the encryption. So how to check the actual status? Searching through the internet provided me some feedback to crosscheck what might be the real status. Here the command and the output (with the main messages highlighted in bold):

firebird: jvr$ diskutil cs list
 CoreStorage logical volume groups (1 found)
 |
 +-- Logical Volume Group 84A81CB4-5CF5-4870-A328-D5F95B4C6FC7
 =========================================================
 Name: Macintosh HD
 Status: Online
 Size: 250140434432 B (250.1 GB)
 Free Space: 1413611520 B (1.4 GB)
 |
 +-< Physical Volume 0D11C48B-24FF-4B1F-8145-D2B175A086F2 | ---------------------------------------------------- | Index: 0 | Disk: disk0s2 | Status: Online | Size: 250140434432 B (250.1 GB) | +-> Logical Volume Family FB0D79FD-CC02-4C94-9D6E-49237DE99976
 ----------------------------------------------------------
 Encryption Status: Unlocked
 Encryption Type: AES-XTS
 Conversion Status: Converting
 Conversion Direction: forward
 Has Encrypted Extents: Yes
 Fully Secure: No
 Passphrase Required: Yes
 |
 +-> Logical Volume 19FF468D-62F8-4818-828F-EE8F6160F450
 ---------------------------------------------------
 Disk: disk1
 Status: Online
 Size (Total): 248391270400 B (248.4 GB)
 Conversion Progress: Failed
 Revertible: No
 LV Name: Macintosh HD
 Volume Name: Macintosh HD
 Content Hint: Apple_HFS

 

In addition to the failed encryption, the process seems that he doesn’t want to stop. By running in the background he consumed around 20% of my CPU usage resulting into a constantly running cooler, while holding a hot MacBook Air in your hand and watching the battery level going down quite rapidly.

Ok, what did we learn about this issue? Do backups and think twice enabling a check-box under a beta version of an operating system.

Not being able to find any acceptable fixes for my problem (all somehow recommend to restore from the backup) I felt left alone with my laptop.

So scanning for the according process turned out that corestoraged was causing the high load. Giving it a 50/50 chance to fix it or to destroy my system completely I had an idea how to fix it. So first I tried to simply kill the process. That worked but after a few seconds the process reappeared – so it must have been started from another daemon. It turned out that actually the launchd is kicking off this process. So either to go through the whole tutorial [2] I decided to do a quick fix/trial. So my idea was to move the daemon binary and than to kill the process. So I did the following:

firebird:~ jvr$ mv /usr/libexec/corestoraged /usr/libexec/corestoraged.old
firebird:~ jvr$ killall corestoraged

And suprisingly the load dropped, while my operating system was still working. Please note that this is highly risky and I would not recommend to do it unless you don’t see any other options.

It should be also noted that there is definitely a better solution in place related to the launchd configuration. Neither the less Apple should get their FileVault running stable, especially since it has to be considered as a core service.

[2014/09/09] Update: Already giving up my hope to fix the issue permanently, I started to backup my MacBook and prepare for a re-installation. Even if the above workaround resolved the CPU usage & power consumption issue, I did not feel comfortable moving around core processes, where I was not 100% sure what they are doing. So I backed up everything and started cleaning my machine.
Having everything done so far I decided to start the Mac in Recovery mode and try one more time the disk repair functionality (especially the fix permissions). After doing this, I thought I give it one more last try. Booted up, moved the corestoraged back and checked in the FileVault progress screen within the Security Settings.
And suddenly I saw that the encryption process was working again. This time I did not touch the machine anymore until the encryption was finished.

And what I have learned from this lesson – do backups. And the second lesson I’ve learned: never go the easy way and start reinstalling your operating system.

 

[1] jvr.at, OS X 10.10 Yosemite – Test

[2] A launchd Tutorial