From e9b6cdd6e65196d6ada6ce54e8d256c3dc57329b Mon Sep 17 00:00:00 2001 From: David Teigland Date: Thu, 13 Sep 2018 10:50:50 -0500 Subject: [PATCH] add lvmlocks service to start and stop lockspaces --- scripts/lvmlocks.service.in | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 scripts/lvmlocks.service.in diff --git a/scripts/lvmlocks.service.in b/scripts/lvmlocks.service.in new file mode 100644 index 000000000..79598db8f --- /dev/null +++ b/scripts/lvmlocks.service.in @@ -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 +