mysql with dom and sd cards loss data

Posted on

mysql with dom and sd cards loss data – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, mysql, unix, embedded, .

I have a problem with a MySQL application that write on a SD card or a Compact Flash. After a data loss (a power failure, for example), if I try to retrieve the data of my db, it fails and the error code is incorrect format table. If I try to see the files of my DB in filesystem I get can't stat file or directory (I/O error).

How can I overcome this problem: prevent it from happening or recover the contents of the db?


  • A filesystem with ext2 filesystem (to prevent SD card multiple writings)
  • SD cards or DOM or Compact Flash as physical support
  • OS: TinyCore Linux Embedded – loaded in RAM

Solution :

Those errors mean your file system is becoming corrupt (because it was in the middle of being written to when the power went out).

ext2 is not a journaling file system. Journaling file systems have more writes because they are keeping track of what they are about to do, then they actually go ahead and do it. When the power fails in the middle of the write, the OS can look at the log and say “oh, I was about to write this data over there”, and repeat the step that was interrupted.

Switch to using something that has journaling. ext3 works, but isn’t really designed for flash media. JFFS2 might be an option. There are dozens of other filesystems designed for exactly this use case, so try a few out and see what works well.

Leave a Reply

Your email address will not be published.