:: [DNG] Overlay filesystems and reado…
Startseite
Nachricht löschen
Nachricht beantworten
Autor: Edward Bartolo
Datum:  
To: dng
Betreff: [DNG] Overlay filesystems and readonly partition mounts.
Dear All,

I would like to harden my Raspberry Pi music player to prevent
filesystem damage on power failures. Reading about how to boot the Pi
in readonly mode, I found there is a script which can do the job
without much bothering on my part. However, it is better to find a
custom solution rather than rely on a solution which makes use
assumptions which may not be true for my use case. I have moved my
music directories and files to a dedicated partition on the SDCard
which I mount as "ro,noatime". This means, part of the problem is
solved, but there is still the root file system which is writeable and
can become corrupted as a result of a power failure. I read that
overlay filesystems can solve the problem by providing a base readonly
file system and a top read-write filesystem. According to my
understanding, I can provide the top writeable filesystem by creating
a file tree which are frequently written to. I can make this as a
memory resident filesystem like tmpfs. Then, the actual root
filesystem would be mounted readonly with the tmpfs on top of it and
merged with it. This would require me to copy the file tree to tmpfs
with every system boot.

This seems like a solution.

Suggestions are most welcome.

Thanks to all, and happy feasts to all those who are celebrating at
this time of the year.

Edward