summaryrefslogtreecommitdiff
path: root/scripts/lvm2-pvscan.service.in
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2018-11-26 12:49:39 -0600
committerDavid Teigland <teigland@redhat.com>2018-11-26 14:33:31 -0600
commit4b5d6de86b3fd3a06b913708e477b603627c8614 (patch)
tree261c36252b0f0973f4e5ccb93ee7533e8fae14b7 /scripts/lvm2-pvscan.service.in
parent229e63b6388ae384fad08dfbf659b360b95753bc (diff)
downloadlvm2-4b5d6de86b3fd3a06b913708e477b603627c8614.tar.gz
pvscan systemd service for event based activation
The pvscan systemd service for autoactivation was mistakenly dropped along with the lvmetad related services. The activation generator program now looks at the new lvm.conf setting "event_activation" (default 1) to switch between event activation and direct activation. Previously, the old use_lvmetad setting was used to switch between event and direct activation.
Diffstat (limited to 'scripts/lvm2-pvscan.service.in')
-rw-r--r--scripts/lvm2-pvscan.service.in14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/lvm2-pvscan.service.in b/scripts/lvm2-pvscan.service.in
new file mode 100644
index 000000000..93fe062d0
--- /dev/null
+++ b/scripts/lvm2-pvscan.service.in
@@ -0,0 +1,14 @@
+[Unit]
+Description=LVM event activation on device %i
+Documentation=man:pvscan(8)
+DefaultDependencies=no
+StartLimitInterval=0
+BindsTo=dev-block-%i.device
+Before=shutdown.target
+Conflicts=shutdown.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=@SBINDIR@/lvm pvscan --cache --activate ay %i
+ExecStop=@SBINDIR@/lvm pvscan --cache %i