Since my Macbook Pro was giving me some problems a little while ago, I had decided to turn on FileVault for my home directory. This basically takes your entire home directory, and encrypts it to your login password. So if someone gets ahold of the laptop, and they try to access the files in my home directory, they would all be encrypted (it actually does it by making your home directory an encrypted disk image which must be mounted when you login). Since I’d thought I may have to send it in for repair, I figured this was easier than going through and removing SSH keys, sensitive documents, and all things like that which I wouldn’t want someone else to see. Sounds good, right? Well, it was until around Friday night sometime.
While I was playing around with a couple things, Stephanie asked me for a copy of one of the pictures I’d taken of Solaris (our obnoxious little kitty, as opposed to the obnoxious big kitty). So I opened up iPhoto and started scrolling, and the laptop crashed. Screen goes grey, nice window pops up telling you to hold the power button to reset it. Okay, it’s happened before, not a huge deal. I reboot, and when it comes back up a few things don’t look right. The desktop was funny – some of the icons I’d moved around were in different places again. Open up iTunes, and it tells me my entire library is corrupt (all the MP3s were still there, thankfully – but the actual database that knows what is where, how many times its been played, and podcasts I’m subscribed to, is gone). iPhoto has some screwy things about it, mostly my personal preferences for displaying and such are gone. Thunderbird forgot that I like to see new mail in some of my folders, and had the wrong sort order on others. Firefox is completely hosed – all the extensions are missing, bookmarks gone. I grumble quite a bit, and go have a lovely beverage.
Later that evening, it dawned on me what happened. Since my home directory is now a disk image, and is encrypted, when the computer has things open read/write it can’t properly recover them like it would a normal journalled filesystem. So some of the files that were open, and were being written to (or at least opened for writing – such as the preferences for various programs, and the iTunes library file) had corrupted files when they restarted. Normally, with a journalled filesystem, those files would be reverted to the last “known good” status, which is usually sufficient for programs to recover and move on. But since this was an encrypted disk image, that was not an option.
Needless to say, my next thing on Friday night was to unencrypt my home directory. Having all my data “secure” does nothing for me if I run the risk of it randomly disappearing when there’s a system crash. Granted, the laptop doesn’t crash very often, but it does occasionally – and I don’t need to take that kind of risk. Though I also really need to replace the drive on my home desktop, which makes interesting ‘ka-chunk’ noises now and then, and start properly backing things up again. Since I once again have room to fit stuff on and around my desk, I hope to get the tape drives cleaned out (lots of dust) and start backups nightly again – or at least weekly, which would probably be sufficient. Then I can backup my laptop to there as well, in theory – the tapes I have hold 40GB compressed, I’ve got ~23GB on the desktop right now, and I forget how much on the laptop. Maybe it’s time to look into a larger tape drive too, though from everything I’ve seen lately it’s almost cheaper/faster/easier to do backups to another spinning disk than a tape drive.