1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-06 17:18:29 +03:00
lvm2/scripts
David Teigland a7de7a7bc0 add activation services
New systemd services for startup:

lvm-devices-wait.service
  Used in place of systemd-udev-settle, this service waits
  for udev+pvscan to process PVs listed in system.devices.
  It runs the command "lvmdevices --wait pvsonline".
  This only waits for PVs that can be matched to a device in
  sysfs, so it only waits for devices attached to the system.
  It waits specifically for the /run/lvm/pvs_online/<pvid>
  files to be created by pvscan.  It quits waiting after a
  configurable number of seconds.  This service gives the
  first activation service a chance to activate VGs from
  PVs that are available immediately at startup.  If this
  service quits waiting before all the expected pvid files
  appear, then the VG associated with those PVs will most
  likely be activated by the -last service rather than the
  initial -main service.  If those PVs are even slower to
  complete processing than the -last service, then the VG
  will be activated by event activation whenever they are
  finally complete.

lvm-activate-vgs-main.service
  Calls "vgchange -aay", after lvm-devices-wait, to activate
  complete VGs.  It only considers PVs that have been
  processed by udev+pvscan and have pvs_online files.
  This is expected to activate VGs from basic devices
  (not virtual device types) that are present at startup.

lvm-activate-vgs-last.service
  Calls "vgchange -aay", after multipathd has started, to
  activate VGs that became available after virtual device
  services were started, e.g. VGs on multipath devices.
  Like -main, it only looks at PVs that have been processed
  by pvscan.

This vgchange in the -last service enables event activation
by creating the /run/lvm/event-activation-on file.  Event
activation will activate any further VGs that appear on the
system (or complete udev processing) after the -last service.
In the case of event activation, the udev rule will run
vgchange -aay <vgname> via a transient service
lvm-activate-<vgname>.service.  This vgchange only scans
PVs in the VG being activated, also based on the pvs_online
files from pvscan.

When there are many VGs that need activation during system
startup, the two fixed services can activate them all much
faster than activating each VG individually via events.

lvm.conf auto_activation_settings can be used to configure
the behavior (default ["service_and_event", "pvscan_hints"]).

"service_and_event" - the behavior described above, where
activation services are used first, and event activation
is used afterward.

"service_only" - only lvm-activate-vgs-* are used, and
no event-based activation occurs after the services finish.
(Equivalent to setting lvm.conf event_activation=0.)

"event_only" - the lvm-activate-vgs* services are skipped,
and all VGs are activated individually with event-based
activation.

"pvscan_hints" - the vgchange autoactivation commands
use pvs_online files created by pvscan.  This optimization
limits the devices scanned by the vgchange command to only
PVs that have been processed by pvscan.
2021-10-29 16:29:42 -05:00
..
lvm2create_initrd doc: change fsf address 2016-01-21 12:11:37 +01:00
.gitignore git: update .gitignore 2021-03-19 23:21:18 +01:00
blk_availability_init_red_hat.in shellcheck: some apostrophe changes and cleanups 2017-10-25 22:02:54 +02:00
blk_availability_systemd_red_hat.service.in add activation services 2021-10-29 16:29:42 -05:00
blkdeactivate.sh.in blkdeactivate: add missing VDO_AVAILABLE check in deactivate_vdo 2020-06-08 15:41:35 +02:00
cmirrord_init_red_hat.in shellcheck: some apostrophe changes and cleanups 2017-10-25 22:02:54 +02:00
code-stats.rb scripts/code-stats.rb: count files better, handle bad utf8 2018-05-17 09:52:13 +01:00
com.redhat.lvmdbus1.conf lvmdbus: Add new daemon. 2016-02-17 23:53:35 +00:00
com.redhat.lvmdbus1.service.in systemd: use proper sbindir path 2017-10-25 22:02:54 +02:00
dm_event_systemd_red_hat.service.in systemd: remove Install sections from socket-activated services 2017-11-01 15:37:19 +01:00
dm_event_systemd_red_hat.socket.in systemd: use RemoveOnStop for dm-event.socket and lvm2-lvmetad.socket 2014-06-13 15:45:25 +02:00
fsadm.sh shellcheck: updates 2021-04-23 23:00:55 +02:00
gdbinit doc: change fsf address 2016-01-21 12:11:37 +01:00
generator-internals.c generators: avoid contacting syslog with generators 2019-01-08 13:13:54 +01:00
lvm2_activation_generator_systemd_red_hat.c systemd: add missing Before=shutdown.target to LVM2 services to fix shutdown ordering 2019-04-09 12:24:37 +02:00
lvm2_cmirrord_systemd_red_hat.service.in systemd: add missing Before=shutdown.target to LVM2 services to fix shutdown ordering 2019-04-09 12:24:37 +02:00
lvm2_lvmdbusd_systemd_red_hat.service.in systemd: use proper sbindir path 2017-10-25 22:02:54 +02:00
lvm2_lvmpolld_init_red_hat.in shellcheck: some apostrophe changes and cleanups 2017-10-25 22:02:54 +02:00
lvm2_lvmpolld_systemd_red_hat.service.in systemd: add missing Before=shutdown.target to LVM2 services to fix shutdown ordering 2019-04-09 12:24:37 +02:00
lvm2_lvmpolld_systemd_red_hat.socket.in systemd: put back DefaultDependencies=no for lvmpolld socket unit 2019-04-11 12:18:02 +02:00
lvm2_monitoring_init_red_hat.in shellcheck: some apostrophe changes and cleanups 2017-10-25 22:02:54 +02:00
lvm2_monitoring_init_rhel4 doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm2_monitoring_systemd_red_hat.service.in add activation services 2021-10-29 16:29:42 -05:00
lvm2_tmpfiles_red_hat.conf.in Use 'd' instead of 'D' in tmpfiles configuration to not overwrite any existing directory. 2012-02-23 14:24:30 +00:00
lvm2-pvscan.service.in pvscan service: use StartLimitIntervalSec 2019-02-28 08:50:37 -06:00
lvm_import_vdo.sh shellcheck: warning enhancements 2021-09-21 21:03:47 +02:00
lvm-activate-vgs-last.service.in add activation services 2021-10-29 16:29:42 -05:00
lvm-activate-vgs-main.service.in add activation services 2021-10-29 16:29:42 -05:00
lvm-devices-wait.service.in add activation services 2021-10-29 16:29:42 -05:00
lvmdump.sh.in shellcheck: updates 2021-04-23 23:00:55 +02:00
lvmlockd.service.in More cleanup needed for dropped scripts 2018-09-13 11:09:25 -05:00
lvmlocks.service.in Fix scripts/lvmlocks.service.in using nonexistent --lock-opt autowait 2020-04-21 16:52:45 -05:00
Makefile.in add activation services 2021-10-29 16:29:42 -05:00
relpath.awk doc: change fsf address 2016-01-21 12:11:37 +01:00
vgimportclone.sh shellcheck: updates 2021-04-23 23:00:55 +02:00
VolumeGroup.ocf Add OCF support 2010-11-05 16:18:38 +00:00