1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/scripts/lvm2_lvmlocking_systemd_red_hat.service.in

25 lines
696 B
SYSTEMD
Raw Normal View History

2015-03-05 23:00:44 +03:00
[Unit]
Description=Availability of lockspaces in lvmlockd
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
2015-03-05 23:00:44 +03:00
# auto activate LVs in the newly started lockd VGs
ExecStart=@SBINDIR@/lvm vgchange -aay -S 'locktype=sanlock || locktype=dlm'
2015-03-05 23:00:44 +03:00
# deactivate LVs in lockd VGs
ExecStop=@SBINDIR@/lvm vgchange -an -S 'locktype=sanlock || locktype=dlm'
2015-03-05 23:00:44 +03:00
# stop lockspaces and wait for them to finish stopping
ExecStop=@SBINDIR@/lvmlockctl --stop-lockspaces --wait 1
2015-03-05 23:00:44 +03:00
[Install]
WantedBy=multi-user.target