ZFS, Boot Zones and data loss

Note to Self: One must remember not to accidently pull the power cord out of your OpenSolaris server.

Somewhere between the sudden power down, and booting into different Boot Zones my MySQL database has lost records and the Apache HTTP server logs are missing whole time periods in the access logs. I have been digging through the OpenSolaris Bible looking for a reason the data is missing. There appears to be no ZFS snapshots missing, and MySQL show there have been no deletions from the tables and they aren’t corrupt, the Data in the logs and MyISAM records are just missing.

I can point to the File buffering of the file system for the loss, except for the fact that the MySQL database records have been in the database for days, and the Apache Logs have lost whole days worth of records.

I’ll keep you posted, if I find out, as this does not bode well for OpenSolaris if it looses data. In the mean time I’ll be more careful of the power and switch the power connection to the Telecom USP.

A different thing in a real OS.

Through the weekend I believed that I had managed to screw up my OpenSolaris installation. So serious was my suspicion I was planning to erase the disk and reinstall the entire system. The sound system that I’d manage to get working wasn’t, the ZFS snapshot system kept failing into maintenance mode and the NetBeans IDE that I installed disappeared. Perhaps living in a windows world tainted me but in my ignorance, I recognized my lack of understanding and started Googling.

Sometimes panic can instill reason, and so with some illustrations and illumination from the OpenSolaris.org site, I discovered that the issue was the multiple packages that I had been downloading. The ZFS file system had been doing boot snapshots and I was rebooting into one of many boot ‘pools’ that were ‘confusing’ the system, when I was shown the tool for selecting the correct boot environment, and deleting the others, everything became stable. The sound works, the tools were there and it all works.

One note, the ZFS file system in OpenSolaris will surprise you, it takes a ‘snapshot’ of the ‘partitions’ you choose, and performs a type of backup journal of all the files there. Given that, the file manager, using a slide bar, allows you to ‘time slide’ the directory through the entire snapshot history to display the changes that have happened. Very interesting, but it takes a bit of getting used to. I have ‘time machine‘ on my Mac, though I have not used it, so I suspect this behaves in a similar fashion.

There was one issue, of course created by myself, in and effort to get video on the system I purchased a Logitech 3500 video class webcam with built-in Mike. And while the Ekiga VoIP and video conferencing application could detect and use the video from the camera, the built-in mike would kill the sound system. So I’m operating without the camera, hoping for a bugfix.

The conclusion, more or less, is that the fixes I perform, did not require a drastic rebuild and the loss of my work. Only some understanding, and some learning on my part. Learning about how a real OS operates, and protects itself. Something toy OS’s from the past have made us all believe don’t exist.

Time to learn that something old, is new again.