photonvision icon indicating copy to clipboard operation
photonvision copied to clipboard

Make coprocessor SD card readonly and disable logging

Open bradmongar opened this issue 2 years ago • 7 comments

Add a control in the GUI to make the SD card writeable when you configure, then set it back to non writeable when done. This will prevent SD card corruption on power loss. WPILIB pi image currently has this feature.

bradmongar avatar Oct 05 '22 16:10 bradmongar

This is tricky because our logging is crucial to helping people troubleshoot issues. Losing persistent logs is a heavy cost when we've had no reports of filesystem corruption for a good while.

Bankst avatar Oct 05 '22 17:10 Bankst

Is there a burning platform or way to reproduce the issue seen? We've had good luck so far with only occasionally losing logs, but never with image corruption on power off that I am aware of.

gerth2 avatar Oct 14 '22 18:10 gerth2

Could use a usb drive to write logs to?

ddaymn avatar Oct 25 '22 23:10 ddaymn

Possibly. I think this is a larger tear up, and a fairly unique requirement that needs care to ensure we don't reduce usability to end users.

gerth2 avatar Nov 03 '22 20:11 gerth2

I only opened this issue because of a an imagined potential for the write while shut down causing a corruption. If this issue isn't being experienced then we don't need to keep it open. Maybe just as a thought.

On Thu, Nov 3, 2022, 3:09 PM Chris Gerth @.***> wrote:

Possibly. I think this is a larger tear up, and a fairly unique requirement that needs care to ensure we don't reduce usability to end users.

— Reply to this email directly, view it on GitHub https://github.com/PhotonVision/photonvision/issues/484#issuecomment-1302611484, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALMSQWMTSUE7FZKFMSKMN6LWGQLYTANCNFSM6AAAAAAQ5WYZFQ . You are receiving this because you authored the thread.Message ID: @.***>

bradmongar avatar Nov 03 '22 20:11 bradmongar

Sweet ok. Churning it over, having an option to automatically pump to an attached usb drive and attempt to keep the main sd card read only could be doable. Probably a "next summer" thing.

Also possibly worthwhile.... I recall some filesystems were less good than others at corruption. I don't recall if what the current pi image process does is good or bad on that spectrum. Worthwhile to research what the exposure we have is currently.

gerth2 avatar Nov 03 '22 23:11 gerth2