Thursday, June 4, 2009

ZFS spared me a lot of time and saved my data (once more)

Yes. Since I was introduced to it, almost every day something remembers me that I'm running the Solaris OS and its ZFS file system.

While developing part of the architecture for the .NET application I'm working on I decided to take a (freaky) break. I stopped my virtualized Windows instance (run on Sun xVM VirtualBox, of course), I put the kettle on the hob, put a coffee spoon of Gunpowder green tea on the teapot, and... launched a:

$ VBoxManage modifyhd winxp.vdi --compact

I went to the kitchen, waited the canonical 2 minutes watching tea leafs opening and releasing their flavor in the water, returned to my desk and: nothing could go worse than that. I just hit VirtualBox bug number 3864. The operation had failed and the hard disk image, as far as I could see, was greatly damaged. Windows wouldn't start correctly and would force a chkdsk on the entire disk. A great number of errors were found and the hard disk was not fixed.

Fortunately enough, since I use ZFS, I'm missing no backup. Every night, at least, a script snapshots a set of filesystems and sends a replication stream to another server where the ZFS stream is received (if you're wondering, the answer is "No, I don't use the Time Slider (yet)). I just had to send back the last saved snapshot and my VDI image was as good as this very same morning. Data? Well, I'm prudent enough to periodically save all of my work in a Subversion server I set up.

Once day more I'm happy to run ZFS.

No comments: