Skip to contentSkip to conversation

master - add lvmlocks service to start and stop lockspaces

PATCH David Teigland 1 participant 1 message Sep 13, 2018

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e9b6cdd6e65196d6ada6ce54e8d256c3dc57329b
Commit:        e9b6cdd6e65196d6ada6ce54e8d256c3dc57329b
Parent:        81ca0cb1619b6ea22fa68f54783cd62dafbd2eaf
Author:        David Teigland <[email protected]>
AuthorDate:    Thu Sep 13 10:50:50 2018 -0500
Committer:     David Teigland <[email protected]>
CommitterDate: Thu Sep 13 10:50:50 2018 -0500

add lvmlocks service to start and stop lockspaces

---
 scripts/lvmlocks.service.in |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
scripts/lvmlocks.service.in new file +18 -0
new file mode 100644
index 0000000..79598db
@@ -0,0 +1,18 @@
+[Unit]
+Description=LVM locking start and stop
+Documentation=man:lvmlockd(8)
+After=lvm2-lvmlockd.service sanlock.service dlm.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+
+# start lockspaces and wait for them to finish starting
+ExecStart=@SBINDIR@/lvm vgchange --lock-start --lock-opt autowait
+
+# stop lockspaces and wait for them to finish stopping
+ExecStop=@SBINDIR@/lvmlockctl --stop-lockspaces --wait 1
+
+[Install]
+WantedBy=multi-user.target
+