Preventing SD card corruption in the event of power failure

Hello,

I am building a personal project for image classification, deployed on Jetson nano developer kit. I am testing several steps while developing. I am using headless OS. I am facing the issue that SD card gets corrupted after several restart via power disconnect. Several restart might be any number from 2 times to 50 times. How can I avoid and protect the SD card corruption after several restart?

Thank you

I am more curious about what kind of “corruption” do you hit.

Any log from uart that can be shared?

Are the loss of power cases on purpose? If so, then consider that a Jetson is a full computer, and you must perform a “proper” shutdown with a command to avoid this. Modern filesystems have a journal to prevent corruption, but even when corruption is avoided the final content changes to the disk just prior to loss of power will be lost. If the amount of loss exceeds the journal’s capability, then you’ve permanently lost something which would require human intervention to repair (and repair might just be a complete reflash).

Incidentally, lower performance micro-controllers which don’t run a full operating system probably read from disk (SD card in this case), but don’t constantly write to it. A read-only disk won’t corrupt.

One could set the Jetson up to use synchronous writes, and it would then be immune to corruption from power loss (at least in the general sense…it could still lose content being written right when the loss occurs). Unfortunately, this would trigger two things: (A) A massive performance hit, and (B) solid state device life would be dramatically shortened.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.