summaryrefslogtreecommitdiff
path: root/community-testing/drbd/drbd.service
diff options
context:
space:
mode:
Diffstat (limited to 'community-testing/drbd/drbd.service')
-rw-r--r--community-testing/drbd/drbd.service19
1 files changed, 19 insertions, 0 deletions
diff --git a/community-testing/drbd/drbd.service b/community-testing/drbd/drbd.service
new file mode 100644
index 000000000..ddd6c62b7
--- /dev/null
+++ b/community-testing/drbd/drbd.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=Distributed Replicated Block Device
+After=systemd-modules-load.service network.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+
+# load config
+ExecStart=/usr/sbin/drbdadm adjust all
+# user interruptible version of wait-connect all
+ExecStart=/usr/sbin/drbdadm wait-con-int
+# become primary if configured
+ExecStart=/usr/sbin/drbdadm sh-b-pri all
+# disconnect and detach all resources
+ExecStop=/usr/sbin/drbdadm down all
+
+[Install]
+WantedBy=multi-user.target