main - remove static autoactivation
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ee8fb0310c53ed003a43b324c99cdfd891dd1a7c Commit: ee8fb0310c53ed003a43b324c99cdfd891dd1a7c Parent: a425729da9e756a91a5729addb26029216bfd476 Author: David Teigland <[email protected]> AuthorDate: Tue Jan 25 16:05:32 2022 -0600 Committer: David Teigland <[email protected]> CommitterDate: Thu Jan 27 16:43:11 2022 -0600
remove static autoactivation
event based autoactivation is now the only method that lvm provides for autoactivation.
Setting lvm.conf event_activation=0 can still be used to disable event based autoactivation commands, but doing so will no longer enable static autoactivation.
--- lib/config/config_settings.h | 15 +- man/Makefile.in | 12 +- man/lvm.8_main | 1 - man/lvm2-activation-generator.8_main | 58 ----- man/lvmautoactivation.7_main | 49 +--- man/see_also.end | 1 - scripts/Makefile.in | 14 -- .../blk_availability_systemd_red_hat.service.in | 2 +- scripts/generator-internals.c | 221 ----------------- .../lvm2_activation_generator_systemd_red_hat.c | 233 ------------------ scripts/lvm2_monitoring_systemd_red_hat.service.in | 2 +- spec/packages.inc | 4 - test/unit/Makefile | 1 - test/unit/activation-generator_t.c | 268 --------------------- test/unit/units.h | 2 - 15 files changed, 22 insertions(+), 861 deletions(-)
lib/config/config_settings.h +5 -10
@@ -1119,16 +1119,11 @@ cfg(global_lvdisplay_shows_full_device_path_CFG, "lvdisplay_shows_full_device_pa "was never a valid path in the /dev filesystem.\n")cfg (global_event_activation_CFG,"event_activation" , global_CFG_SECTION,CFG_DEFAULT_COMMENTED ,CFG_TYPE_BOOL ,1 ,vsn (2 ,3 ,1 ),0 ,0 ,NULL , -"Activate LVs based on system-generated device events.\n" -"When a PV appears on the system, a system-generated uevent triggers\n" -"the lvm2-pvscan service which runs the pvscan --cache -aay command.\n" -"If the new PV completes a VG, pvscan autoactivates LVs in the VG.\n" -"When event_activation is disabled, the lvm2-activation services are\n" -"generated and run at fixed points during system startup. These\n" -"services run vgchange -aay to autoactivate LVs in VGs that happen\n" -"to be present at that point in time.\n" -"See the --setautoactivation option or the auto_activation_volume_list\n" - "setting to configure autoactivation for specific VGs or LVs.\n") +"Disable event based autoactivation commands.\n" +"WARNING: setting this to zero may cause machine startup to fail.\n" +"Previously, setting this to zero would enable static autoactivation\n" +"services (via the lvm2-activation-generator), but the autoactivation\n" + "services and generator have been removed.\n")cfg (global_use_lvmetad_CFG,"use_lvmetad" , global_CFG_SECTION,CFG_DEFAULT_COMMENTED ,CFG_TYPE_BOOL ,0 ,vsn (2 ,2 ,93 ),0 ,vsn (2 ,3 ,0 ),NULL ,NULL )
man/Makefile.in +3 -9
@@ -47,7 +47,6 @@ MAN8=lvm.8 lvmdump.8 lvm-fullreport.8 lvm-lvpoll.8 \ MAN8SO=lvm-config.8 lvm-dumpconfig.8 MAN8DM=dmsetup.8 dmstats.8 MAN8CLUSTER= -MAN8SYSTEMD_GENERATORS=lvm2-activation-generator.8 ifeq (,$(findstring $(MAKECMDGOALS), distclean all_man install_all_man)) MAN7 += lvmcache.7 lvmthin.7 lvmvdo.7
@@ -119,7 +118,7 @@ TESTMAN=test.gen include $(top_builddir)/make.tmpl CLEAN_TARGETS+=$(MAN5) $(MAN7) $(MAN8) $(MAN8SO) $(MAN8:%.8=%.8_gen) $(MAN8CLUSTER) \ - $(MAN8SYSTEMD_GENERATORS) $(MAN8DM) $(TESTMAN) + $(MAN8DM) $(TESTMAN) all: man device-mapper
@@ -127,11 +126,11 @@ all: man device-mapper device-mapper: $(MAN8DM) -man: $(MAN5) $(MAN7) $(MAN8) $(MAN8SO) $(MAN8CLUSTER) $(MAN8SYSTEMD_GENERATORS) +man: $(MAN5) $(MAN7) $(MAN8) $(MAN8SO) $(MAN8CLUSTER) all_man: man -$(MAN5) $(MAN7) $(MAN8) $(MAN8SO) $(MAN8DM) $(MAN8CLUSTER) $(MAN8SYSTEMD_GENERATORS): Makefile +$(MAN5) $(MAN7) $(MAN8) $(MAN8SO) $(MAN8DM) $(MAN8CLUSTER): Makefile $(MANGENERATOR): @echo " [MAKE] $<"
@@ -289,11 +288,6 @@ install_device-mapper: $(MAN8DM) $(Q) $(INSTALL) -d $(MAN8DIR) $(Q) $(INSTALL_DATA) $^ $(MAN8DIR)/ -install_systemd_generators: $(MAN8SYSTEMD_GENERATORS) - @echo " [INSTALL] $^" - $(Q) $(INSTALL) -d $(MAN8DIR) - $(Q) $(INSTALL_DATA) $^ $(MAN8DIR)/ - install: install_lvm2 install_device-mapper install_cluster install_all_man: install install_systemd_generators
man/lvm.8_main +0 -1
@@ -563,7 +563,6 @@ Prepends source file name and code line number with libdm debugging. .P .BR lvm-fullreport (8), .BR lvm-lvpoll (8), -.BR lvm2-activation-generator (8), .BR blkdeactivate (8), .BR lvmdump (8), .P
man/lvm2-activation-generator.8_main deleted +0 -58
58 lines not on this page · raw message
man/lvmautoactivation.7_main +12 -37
67 lines not on this page · raw message
man/see_also.end +0 -1
@@ -53,7 +53,6 @@ .P .BR lvm-fullreport (8), .BR lvm-lvpoll (8), -.BR lvm2-activation-generator (8), .BR blkdeactivate (8), .BR lvmdump (8), .P
scripts/Makefile.in +0 -14
@@ -15,9 +15,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -SOURCES = lvm2_activation_generator_systemd_red_hat.c -TARGETS = lvm2_activation_generator_systemd_red_hat - include $(top_builddir)/make.tmpl ifeq ("@BUILD_DMEVENTD@", "yes")
@@ -78,17 +75,6 @@ ifeq ("@BLKDEACTIVATE@", "yes") $(Q) $(INSTALL_SCRIPT) blk_availability_init_red_hat $(initdir)/blk-availability endif -CFLAGS_lvm2_activation_generator_systemd_red_hat.o += $(EXTRA_EXEC_CFLAGS) - -lvm2_activation_generator_systemd_red_hat: $(OBJECTS) $(LVMINTERNAL_LIBS) - @echo " [CC] $@" - $(Q) $(CC) -o $@ $(OBJECTS) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) $(LVMINTERNAL_LIBS) $(LIBS) - -install_systemd_generators: - @echo " [INSTALL] systemd_generators" - $(Q) $(INSTALL_DIR) $(systemd_generator_dir) - $(Q) $(INSTALL_PROGRAM) lvm2_activation_generator_systemd_red_hat $(systemd_generator_dir)/lvm2-activation-generator - install_systemd_units: install_dbus_service @echo " [INSTALL] systemd_units" $(Q) $(INSTALL_DIR) $(systemd_unit_dir)
scripts/blk_availability_systemd_red_hat.service.in +1 -1
@@ -1,7 +1,7 @@ [Unit] Description=Availability of block devices Before=shutdown.target -After=lvm2-activation.service iscsi-shutdown.service iscsi.service iscsid.service fcoe.service rbdmap.service +After=iscsi-shutdown.service iscsi.service iscsid.service fcoe.service rbdmap.service DefaultDependencies=no Conflicts=shutdown.target
scripts/generator-internals.c deleted +0 -221
221 lines not on this page · raw message
scripts/lvm2_activation_generator_systemd_red_hat.c deleted +0 -233
233 lines not on this page · raw message
scripts/lvm2_monitoring_systemd_red_hat.service.in +1 -1
@@ -2,7 +2,7 @@ Description=Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling Documentation=man:dmeventd(8) man:lvcreate(8) man:lvchange(8) man:vgchange(8) Requires=dm-event.socket -After=dm-event.socket dm-event.service lvm2-activation.service +After=dm-event.socket dm-event.service Before=local-fs-pre.target shutdown.target DefaultDependencies=no Conflicts=shutdown.target
spec/packages.inc +0 -4
@@ -101,9 +101,6 @@ fi %{_mandir}/man8/lvm-config.8.gz %{_mandir}/man8/lvm-dumpconfig.8.gz %{_mandir}/man8/lvm.8.gz -%if %{enable_systemd} - %{_mandir}/man8/lvm2-activation-generator.8.gz -%endif %{_mandir}/man8/lvmconfig.8.gz %{_mandir}/man8/lvmdevices.8.gz %{_mandir}/man8/lvmdiskscan.8.gz
@@ -190,7 +187,6 @@ fi %{_tmpfilesdir}/%{name}.conf %{_unitdir}/blk-availability.service %{_unitdir}/lvm2-monitor.service - %attr(555, -, -) %{_prefix}/lib/systemd/system-generators/lvm2-activation-generator %if %{have_service lvmpolld} %{_unitdir}/lvm2-lvmpolld.service %{_unitdir}/lvm2-lvmpolld.socket
test/unit/Makefile +0 -1
@@ -16,7 +16,6 @@ UNIT_SOURCE=\ device_mapper/vdo/status.c \ \ - test/unit/activation-generator_t.c \ test/unit/bcache_t.c \ test/unit/bcache_utils_t.c \ test/unit/bitset_t.c \
test/unit/activation-generator_t.c deleted +0 -268
268 lines not on this page · raw message
test/unit/units.h +0 -2
@@ -20,7 +20,6 @@//----------------------------------------------------------------- // Declare the function that adds tests suites here ... -void activation_generator_tests (struct dm_list *suites);void bcache_tests (struct dm_list *suites);void bcache_utils_tests (struct dm_list *suites);void bitset_tests (struct dm_list *suites);
@@ -37,7 +36,6 @@ void vdo_tests(struct dm_list *suites);// ... and call it in here. static inline void register_all_tests (struct dm_list *suites) { -activation_generator_tests (suites);bcache_tests (suites);bcache_utils_tests (suites);bitset_tests (suites);