-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read-Only filesystem? #33
Comments
Hey, I like the idea of having the SD card more protected, but how would this work exactly? The log files, gcode files and moonraker database would still need to be written to the card and be persistent, so the same chance of corruption exists there, no? A PR to extend the lifetime of SD cards by writing the log files to a RAM FS is already there: #12 |
There are two issues that are solved with a read-only system:
Yes, ideally everything should be on a ramfs. But having the logfiles on a ramfs instead of the sdcard is definitely a good start as it already reduces the amount of data written to sdcard by a large amount. Different approaches are possible. One could move everything to ramfs and only switch the sdcard to read-write and write the data to it when the user shuts down or restarts the system. Ofcourse then, on powerloss, everything since the last restart or shutdown would be gone. But the sdcard would be safe as it's read-only all the time. Another option would be to sync the data in the ramfs to the sdcard in regular intervals (and only switch the sdcard to read-write during the syncing) but that would ofcourse bear the risk of corruption again if the user manages to kill the power in the wrong moment (i.e. during sync). Yet another option would be to keep the sdcard read-only and only switch it to read-write when something actually has to be written. But that would only work for stuff like received gcode files or updates to the printer.cfg and the like (i.e. things that do not get changed/written too often), not for stuff like logs or the moonraker db which is more or less steadily written to. I haven't looked at the details yet, but I think something like this could make sense:
I can give some help with making the base system read-only as I have already done that with Raspberry Pi OS. |
Would you be interested in making the FluiddPi image a readonly filesystem? Would make things less error-prone on powerloss or people pulling the plug without shutting down and also not wear down the sdcard.
The text was updated successfully, but these errors were encountered: