0
zakk

Data loss when unplug power

Recommended Posts

Hi all,

 

I am using NanoPi-Neo Air and my application is just logging binary data to a file. The board is powered by usb from a pc.

I can dump and list to see binary data inside the file but after unplug power from usb then power up the board from usb again, I found the binary data is gone or some errors data, unknown data appended.

 

Do you guys have same issued? or any suggestions?

 

Thanks in advance

Share this post


Link to post
Share on other sites

Did you sync the data written and do proper shutdown before unplugging ? Unplugging without powering down is just like shooting your tyres to stop a car :D

Share this post


Link to post
Share on other sites

No error when shutdown or reboot by using command shell, but I plan to run the board as a main controller and power up the board by batteries.

Just power ON/OFF switch then the circuit ready to work but I am worry that when power off the switch I will get incorrect data logger.

Share this post


Link to post
Share on other sites
4 hours ago, zakk said:

Just power ON/OFF switch then the circuit ready to work but I am worry that when power off the switch I will get incorrect data logger.


Our system is prepared for general usage and if you want to achieve this you'll need to alter few things. First is mount option commit=600 for root fs (/etc/fstab). Remove or set to 0. And the most extreme / safe thing is setting file system read-only. In this case you should not loose anything.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
0