Today, there was a power outage and my server was shut down by it. Upon rebooting the server, I got a string of error messages…mostly of the flavor:
ata1.00 status drdy err
afterwards, it finished booting.
To my surprise, their was about 10 days of data missing from the calendar of oemr.
This is not critical…all but today was backed up anyhow…and I am still using very little of the app.
However, more of curiosity than anything I was wondering if anybody had experienced such or knows what happened.
I added new patients today. They and their data are still there. The only thing that seems missing, is calendar items that were entered during the last 10 days.
The calendar shows appointments for next week, that were made longer ago. It does not show any appointments from the last 10 days nor any future appointments that were scheduled during the last 10 days.
…
any ideas why this might happen? any ideas on how one might attempt to ‘find’ the lost items…or at least those from today?
hey,
Possibly a corrupted mysql table. Check the openemr_postcalendar_events table in your database to see if the raw data’s there (this is where appt are kept). If it’s corrupted, then there’s a simple way to repair it.
-brady
There does appear to be a corrupted table. Here is the system info and the error message from mysqlcheck:
Ubuntu 8.10
Linux server 2.6.27-11-generic #1 SMP Thu Jan 29 19:24:39 UTC 2009 i686
PHP Version 5.2.6-2ubuntu4.1
mysql 5.0.67-0ubuntu6 (Ubuntu)
OpenEMR v3.0.0-rc1
openemr.openemr_postcalendar_events
warning : Size of datafile is: 44208 Should be: 36856
error : got error: 5 when reading datafile at record: 81
Error : Error reading file ‘./openemr/openemr_postcalendar_events.MYD’ (Errcode: 5)
error : Corrupt
…
Yes, I do need to get a back-up power source and a few other things.
I am currently running two versions of oemr on both linux and windows. I hoped to have dug much farther into it by now, but was hit with other time constraints. Hopefully, I can now make the time to become much more oemr literate.
By the way a laptop or netbook computer might be a good bet for a server, since the battery backup is built in and long-lasting. If you get a UPS, do some research and get a good one. In my experience a cheap UPS will create more problems than it solves.
the laptop might be a good way to go. My old laptop’s battery does not run long anymore, but longer than most back up power systems, and it also has more guts than the computer that I am currently using for the server.
I guess that there would be some way to have it detect power outage and automatically safely power down?
Ubuntu can do that. System -> Preferences -> Power Management controls the details. Doubtless other Linux flavors have their own ways to do it. It might not work with some laptops.
Check out this primer on database repair via commandline: http://dev.mysql.com/doc/refman/5.1/en/repair.html
The important stuff is in Stage 1: and Stage 2: (hopefully you only require the ‘Easy safe repair’).
MySQL does not like sudden power loss and generally at least some of the tables get corrupted.
This includes some data loss.
Yes, there is something you can do. Get a good battery backup. Install a gas generator on your building. Run backups. Keep remote copies.
The are reasons that these things keep getting brought up. Life is not perfect. Things happen. Hurricanes, Tornadoes, Fire, War, Police states. The fire usually states in the area of most heat. This is frequently the server room.
A wise man once said their are only two types of system administrators: Those who make back-ups and those who never have hardware failure.