Hi, On Thu, 3 Jun 2021, at 15:21, Vyacheslav Yurkov wrote: > It's often desired in Embedded System design to have a read-only rootfs. > But a lot of different applications might want to have a read-write access > to some parts of a filesystem. It can be especially useful when your update > mechanism overwrites the whole rootfs, but you want your application data > to be preserved between updates. This class provides a way to achieve that > by means of overlayfs and at the same time keeping the base rootfs read-only.
I was looking into something like this lately. There are actually two kinds of write access - volatile (tmpfs) and persistent (to disk). So my approach would have been to use bind mounts from a tmpfs/ext4 based on configuration per recipe. Is there any advantage to working with overlayfs in this case? The main idea is to have state that doesn't come from the ro part of the OS because otherwise, updates will be shadowed by the overlayfs. So I fail to see the advantage of using a set of overlayfs mounts instead of bind mounts. At least with bind mounts, it will always shadow the rootfs bits so you can catch early this case. Depending on your use case, most of the times, you'd want this "state" setup happening pre init (in initramfs, for example), especially if you want to handle persistent systemd logging or machine id, etc. -- Andrei Gherzan gpg: rsa4096/D4D94F67AD0E9640
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#152807): https://lists.openembedded.org/g/openembedded-core/message/152807 Mute This Topic: https://lists.openembedded.org/mt/83284453/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-