Browse Source

package/lvm2: lvmetad 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).

Signed-off-by: Pascal de Bruijn <p.debruijn@unilogic.nl>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Pascal de Bruijn 5 years ago
parent
commit
9889b8ce7f
2 changed files with 19 additions and 0 deletions
  1. 13 0
      package/lvm2/Config.in
  2. 6 0
      package/lvm2/lvm2.mk

+ 13 - 0
package/lvm2/Config.in

@@ -47,6 +47,19 @@ config BR2_PACKAGE_LVM2_APP_LIBRARY
 comment "lvm2 application library needs a glibc or uClibc toolchain"
 comment "lvm2 application library needs a glibc or uClibc toolchain"
 	depends on BR2_TOOLCHAIN_USES_MUSL
 	depends on BR2_TOOLCHAIN_USES_MUSL
 
 
+config BR2_PACKAGE_LVM2_LVMETAD
+	bool "install lvmetad"
+	select BR2_PACKAGE_LVM2_APP_LIBRARY
+	help
+	  Install lvmetad
+
+	  The lvmetad daemon caches LVM metadata so that LVM commands
+	  can read metadata from the cache rather than scanning disks.
+	  This can be an advantage because scanning disks is time
+	  consuming and may interfere with the normal work of the
+	  system.  lvmetad can be a disadvantage when disk event
+	  notifications from the system are unreliable.
+
 endif
 endif
 
 
 comment "lvm2 needs a toolchain w/ threads, dynamic library"
 comment "lvm2 needs a toolchain w/ threads, dynamic library"

+ 6 - 0
package/lvm2/lvm2.mk

@@ -60,6 +60,12 @@ else
 LVM2_CONF_OPTS += --disable-applib
 LVM2_CONF_OPTS += --disable-applib
 endif
 endif
 
 
+ifeq ($(BR2_PACKAGE_LVM2_LVMETAD),y)
+LVM2_CONF_OPTS += --enable-lvmetad
+else
+LVM2_CONF_OPTS += --disable-lvmetad
+endif
+
 ifeq ($(BR2_INIT_SYSTEMD),y)
 ifeq ($(BR2_INIT_SYSTEMD),y)
 LVM2_INSTALL_TARGET_OPTS += install_systemd_units install_systemd_generators
 LVM2_INSTALL_TARGET_OPTS += install_systemd_units install_systemd_generators
 endif
 endif