ref-manual: update overlayfs class
PATCH v2 1/1 ref-manual: update overlayfs class
Describe how to use a generated helper service to set up a proper systemd dependency chain.
Signed-off-by Vyacheslav Yurkov <[email protected]>
--- documentation/ref-manual/classes.rst | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
documentation/ref-manual/classes.rst +15 -1
@@ -1742,7 +1742,8 @@ Then you can specify writable directories on a recipe basis (e.g. in my-applicat To support several mount points you can use a different variable flag. Assuming we want to have a writable location on the file system, but do not need that the data -survives a reboot, then we could have a ``mnt-overlay.mount`` unit for a ``tmpfs`` file system. +survives a reboot, then we could have a ``mnt-overlay.mount`` unit for a ``tmpfs`` +file system. In your machine configuration::
@@ -1752,6 +1753,19 @@ and then in your recipe:: OVERLAYFS_WRITABLE_PATHS[mnt-overlay] = "/usr/share/another-application" +On a practical note, your application recipe might require multiple +overlays to be mounted before running to avoid writing to the underlying +file system (which can be forbidden in case of read-only file system) +To achieve that :ref:`overlayfs <ref-classes-overlayfs>` provides a ``systemd`` +helper service for mounting overlays. This helper service is named +``${PN}-overlays.service`` and can be depended on in your application recipe +(named ``application`` in the following example) ``systemd`` unit by adding +to the unit the following:: + + [Unit] + After=application-overlays.service + Requires=application-overlays.service + .. note:: The class does not support the ``/etc`` directory itself, because ``systemd`` depends on it.
Signature · 1 line
2.28.0
Hi Slava,
Quoted 32 lines · Vyacheslav Yurkov
Describe how to use a generated helper service to set up a proper systemd dependency chain.
Signed-off-by Vyacheslav Yurkov <[email protected]>--- documentation/ref-manual/classes.rst | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)documentation/ref-manual/classes.rst +8
-1@@ -1742,7 +1742,8 @@ Then you can specify writable directories on a recipe basis (e.g. in my-applicat To support several mount points you can use a different variable flag. Assuming we want to have a writable location on the file system, but do not need that the data -survives a reboot, then we could have a ``mnt-overlay.mount`` unit for a ``tmpfs`` file system. +survives a reboot, then we could have a ``mnt-overlay.mount`` unit for a ``tmpfs`` +file system. In your machine configuration::@@ -1752,6 +1753,19 @@ and then in your recipe:: OVERLAYFS_WRITABLE_PATHS[mnt-overlay] = "/usr/share/another-application" +On a practical note, your application recipe might require multiple +overlays to be mounted before running to avoid writing to the underlying +file system (which can be forbidden in case of read-only file system) +To achieve that :ref:`overlayfs <ref-classes-overlayfs>` provides a ``systemd`` +helper service for mounting overlays. This helper service is named +``${PN}-overlays.service`` and can be depended on in your application recipe
documentation/ref-manual/classes.rst and then in your recipe:: · line 1771
Quoted 10 lines
documentation/ref-manual/classes.rst +7
-0+(named ``application`` in the following example) ``systemd`` unit by adding +to the unit the following:: + + [Unit] + After=application-overlays.service + Requires=application-overlays.service + .. note:: The class does not support the ``/etc`` directory itself, because ``systemd`` depends on it.
Reviewed-by Michael Opdenacker <[email protected]>
... and merged into "master-next".
Thanks!
Michael.
Signature · 3 lines
Michael Opdenacker, Bootlin Embedded Linux and Kernel engineering https://bootlin.com