package/lvm2: lvmetad systemd integration
PATCH 1/1 package/lvm2: lvmetad systemd integration
lvmetad is usually combined with event-based system services that automatically run pvscan --cache on disks added or removed. This way, the cache is automatically updated with metadata from new disks when they appear. LVM udev rules and systemd services implement this automation. Automatic scanning is usually combined with automatic activation. For more information, see pvscan(8).
--- package/lvm2/Config.in | 3 +++ package/lvm2/lvm2.mk | 5 +++++ 2 files changed, 8 insertions(+)
package/lvm2/Config.in +3 -0
@@ -44,6 +44,9 @@ config BR2_PACKAGE_LVM2_APP_LIBRARY help Install application library (liblvm2app). + Enable this if you need systemd integration, + like automatic activation of LVM logical volumes. + comment "lvm2 application library needs a glibc or uClibc toolchain" depends on BR2_TOOLCHAIN_USES_MUSL
package/lvm2/lvm2.mk +5 -0
@@ -54,6 +54,11 @@ else LVM2_CONF_OPTS += --disable-applib endif +ifeq ($(BR2_PACKAGE_LVM2_APP_LIBRARY)$(BR2_PACKAGE_SYSTEMD),yy) +LVM2_CONF_OPTS += --enable-lvmetad +LVM2_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install install_systemd_units install_systemd_generators +endif + ifeq ($(BR2_TOOLCHAIN_SUPPORTS_PIE),) LVM2_CONF_ENV += ac_cv_flag_HAVE_PIE=no endif
Signature · 1 line
2.17.1
PATCH 1/1 package/lvm2: lvmetad systemd integration
Hello Pascal,
Quoted 32 lines · On Thu, 27 Feb 2020 08:46:51 +0100 Pascal de Bruijn <[email protected]>…
lvmetad is usually combined with event-based system services that automatically run pvscan --cache on disks added or removed. This way, the cache is automatically updated with metadata from new disks when they appear. LVM udev rules and systemd services implement this automation. Automatic scanning is usually combined with automatic activation. For more information, see pvscan(8).
Signed-off-by Pascal de Bruijn <[email protected]>--- package/lvm2/Config.in | 3 +++ package/lvm2/lvm2.mk | 5 +++++ 2 files changed, 8 insertions(+)package/lvm2/Config.in +3
-0@@ -44,6 +44,9 @@ config BR2_PACKAGE_LVM2_APP_LIBRARY help Install application library (liblvm2app). + Enable this if you need systemd integration, + like automatic activation of LVM logical volumes. + comment "lvm2 application library needs a glibc or uClibc toolchain" depends on BR2_TOOLCHAIN_USES_MUSLpackage/lvm2/lvm2.mk +0
-0
package/lvm2/lvm2.mk else · line 59
Quoted 6 lines
package/lvm2/lvm2.mk +3
-0@@ -54,6 +54,11 @@ else LVM2_CONF_OPTS += --disable-applib endif +ifeq ($(BR2_PACKAGE_LVM2_APP_LIBRARY)$(BR2_PACKAGE_SYSTEMD),yy) +LVM2_CONF_OPTS += --enable-lvmetad +LVM2_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install install_systemd_units install_systemd_generators
Looking at the install_systemd_units target, it does install much more than just a unit file for lvmetad.
So I think the two things should be decoupled:
(1) When systemd is enabled, use install_systemd_units and install_systemd_generators.
(2) Have an additional Config.in option to enable/disable the build of lvmetad
Best regards,
Thomas Petazzoni
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com