简体   繁体   中英

Is there a good way to handle nand corruption because of large amount of log messages (rsyslog used) in linux?

I am having an issue related to NAND corruption because of the big amount of log messages being written (i cannot control the amount of logs), so the amount of writes are corrupting the NAND, or that is what has been found, so, my question is, can i handle or does it exist a good way to handle NAND corruption because of large amounts of messages being written?,some kind of buffering or other method?. OS: Android 4.2.2, Kernel: 3.4

Are you absolutely sure it's the log that's corrupting the NAND? I've answered your questions as stated but I'd also recommend replacing the device because NAND corruption is often caused by odd issues related to over/under power and heat.

If you have root there's a fair amount of solutions.

  1. You can symlink the log location to somewhere else (like an SD card) if you actually need them and while it doesn't solve the corruption issue it does move the issue to somewhere else so it doesn't damage the device and require reflashing

  2. You can make the log location read only so that nothing can ever be written into the folder/the individual log file assuming that they aren't rotated.

  3. Go nuclear: make the whole partition read only. While not recommended it will put a stop to anything else that could also be writing excessive amounts of data however this has the notable side effect of breaking a massive amount of system and user apps.

You definitely have some options here however they're all pretty hacky and bound to cause other issues depending on which severity you go for. I'd recommend going down the list and switching out if you still have the issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM