1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-18 10:04:20 +03:00
lvm2/scripts/lvm2_monitoring_systemd_red_hat.service.in
David Teigland ff0eb5823a add fixed event activation services
System startup runs two new fixed activation services:
lvm-activate-vgs-main and lvm-activate-vgs-last

These activate VGs that are present and complete at the
time of system startup.

The last service enables event activation by creating
the file /run/lvm/event-activation-on.  After that,
new devices that appear will be processed by event based
activation.

lvm.conf event_activation_options can be used to
configure service-based activation only, or event-based
activation only, or the default hybrid approach.
2021-10-11 14:22:23 -05:00

19 lines
531 B
SYSTEMD

[Unit]
Description=Monitor LVM Logical Volumes
Documentation=man:dmeventd(8) man:lvcreate(8) man:lvchange(8) man:vgchange(8)
Requires=dm-event.socket
After=dm-event.socket dm-event.service lvm-activate-vgs-last.service
Before=local-fs-pre.target shutdown.target
DefaultDependencies=no
Conflicts=shutdown.target
[Service]
Type=oneshot
Environment=LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1
ExecStart=@SBINDIR@/lvm vgchange --monitor y
ExecStop=@SBINDIR@/lvm vgchange --monitor n
RemainAfterExit=yes
[Install]
WantedBy=sysinit.target