1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-06 17:18:29 +03:00
lvm2/scripts/lvm2_monitoring_systemd_red_hat.service.in

19 lines
531 B
SYSTEMD
Raw Normal View History

2011-07-28 16:54:28 +04:00
[Unit]
add fixed event activation services Add two new fixed activation services for startup: lvm-activate-vgs-main and lvm-activate-vgs-last. The -main service runs early, without service dependencies. The -last service runs later, after other services have started (other services that may set up devices for PVs, like mulitpathd.) The lvm-activate-vgs services both run "vgchange -aay" to activate all VGs that are preset and complete at the time of system startup. When there are many VGs, these two vgchange commands will replace many per-VG vgchange commands. 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 autoactivation commands. Prior to the existence of the event-activation-on file, event-based commands do nothing. lvm.conf event_activation_options can be used to configure service-based activation only, or event-based activation only, or the approach described above which begins with service based activation and then switches to event-based. service_only: only the -main and -last services will activate VGs. VGs on devices that appear later will not be autoactivated. event_only: the -main and -last services will not activate any VGs, and all VGs will be activated from per-VG event-based activation commands. service_to_event: the -main and -last services will activate VGs that are complete at the time the services run, and VGs that appear later will be activated from per-VG event-based activation commands.
2021-09-03 00:55:04 +03:00
Description=Monitor LVM Logical Volumes
Documentation=man:dmeventd(8) man:lvcreate(8) man:lvchange(8) man:vgchange(8)
Requires=dm-event.socket
add fixed event activation services Add two new fixed activation services for startup: lvm-activate-vgs-main and lvm-activate-vgs-last. The -main service runs early, without service dependencies. The -last service runs later, after other services have started (other services that may set up devices for PVs, like mulitpathd.) The lvm-activate-vgs services both run "vgchange -aay" to activate all VGs that are preset and complete at the time of system startup. When there are many VGs, these two vgchange commands will replace many per-VG vgchange commands. 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 autoactivation commands. Prior to the existence of the event-activation-on file, event-based commands do nothing. lvm.conf event_activation_options can be used to configure service-based activation only, or event-based activation only, or the approach described above which begins with service based activation and then switches to event-based. service_only: only the -main and -last services will activate VGs. VGs on devices that appear later will not be autoactivated. event_only: the -main and -last services will not activate any VGs, and all VGs will be activated from per-VG event-based activation commands. service_to_event: the -main and -last services will activate VGs that are complete at the time the services run, and VGs that appear later will be activated from per-VG event-based activation commands.
2021-09-03 00:55:04 +03:00
After=dm-event.socket dm-event.service lvm-activate-vgs-last.service
Before=local-fs-pre.target shutdown.target
2011-07-28 16:54:28 +04:00
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
2011-07-28 16:54:28 +04:00
RemainAfterExit=yes
[Install]
WantedBy=sysinit.target