Sd card write ro

Hello everyone, first of all thanks everyone that make contribution to OpenWrt.
We have a problem that, when we record cameras on to SD Card, when mount is

dev/sda1 on /mnt/sda1 type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

If we record in that way, when device energy cut down, SD card become corrupted, It turns to RO.
Also, data in SD card is not readable.
If we use SYNC option for mount, it is not able to write high volume date continuously, RAM usage increases.

But if we record cameras with same specification (camera amount, data size) in android, it does not give any problem.

Is anyone have any suggestions?

  • Faster SoC, more RAM
  • USB-attached SD if presently attached over GPIO or the like
  • Faster SD cards
  • Journaling filesystem (FAT isn't "robust" in any modern interpretation of file systems) and/or flash-intended file system

Hi Mr. Jeff,
What format should we use? Thanks

is it a battery operated Android device? if so how are you cutting power? removing the battery?

the obvious answer is use a UPS and make sure you don't cut power!

1 Like

The logical solution would be: Avoid power cuts by using a UPS or thelike.


It is android TV Box which has no battery, If we use UPS it will work. My point is there is something wrong with OpenWRT otherwise I won't write these anyway.

Android typically uses ext4, but then again, phones typically have a "graceful shutdown". You pull the battery, you're on your own about data corruption.

Neither Andriod nor OpenWrt are designed with continuous streaming of data to disk as a primary function.

Even in server applications with advanced filesystems, guarantees of uncorrupted file systems with non-graceful shutdown are difficult. Some approaches involve very high-end SSDs, like the Intel Optane SSDs intended for caching applications.


Clearly no.

That's the point.

For the solution to your problem see my posting above.

1 Like