Bug#796625: [PATCH] clvm: ship native systemd units in debian package

Ulf Norberg ulf.norberg at zoologi.su.se
Fri Jun 17 14:53:07 UTC 2016


Hi Andreas,

thanks for the patch, but I am afraid we cannot test clvmd from the
testing branch - it will pull too many dependencies from testing that
we cannot deal with right now.

However, the attached patch on the stable version of lvm2 works on our
cluster.  After installation, run:

systemctl enable lvm2-cluster-activation.service
systemctl start lvm2-cluster-activation.service


About the cman.service - it comes from LSB script /etc/init.d/cman
(package: cman) and is used to start dlm (and other stuff...).

Best,
Ulf

On 13:31 Mon 13 Jun     , Andreas Henriksson wrote:

> Ulf Norberg it would be very appreciated if you could test building
> a package with the patch attached and report back on status.
-------------- next part --------------
diff -Nru lvm2-2.02.111/debian/changelog lvm2-2.02.111/debian/changelog
--- lvm2-2.02.111/debian/changelog	2016-05-27 11:04:18.000000000 +0200
+++ lvm2-2.02.111/debian/changelog	2016-06-17 16:22:53.000000000 +0200
@@ -1,3 +1,10 @@
+lvm2 (2.02.111-2.2+deb8u1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * clvm systemd fixes (for details see #796625)
+
+ -- Ulf Norberg <ulf.norberg at zoologi.su.se>  Fri, 17 Jun 2016 13:55:32 +0200
+
 lvm2 (2.02.111-2.2+deb8u1) jessie; urgency=medium
 
   * Set default pid directory to /run. (closes: #783120)
diff -Nru lvm2-2.02.111/debian/clvm.links lvm2-2.02.111/debian/clvm.links
--- lvm2-2.02.111/debian/clvm.links	1970-01-01 01:00:00.000000000 +0100
+++ lvm2-2.02.111/debian/clvm.links	2016-06-17 13:31:48.000000000 +0200
@@ -0,0 +1 @@
+dev/null lib/systemd/system/clvm.service
diff -Nru lvm2-2.02.111/debian/patches/lvm2-cluster-services.patch lvm2-2.02.111/debian/patches/lvm2-cluster-services.patch
--- lvm2-2.02.111/debian/patches/lvm2-cluster-services.patch	1970-01-01 01:00:00.000000000 +0100
+++ lvm2-2.02.111/debian/patches/lvm2-cluster-services.patch	2016-06-17 15:37:49.000000000 +0200
@@ -0,0 +1,49 @@
+Index: lvm2-2.02.111/scripts/lvm2_cluster_activation_systemd_red_hat.service.in
+===================================================================
+--- lvm2-2.02.111.orig/scripts/lvm2_cluster_activation_systemd_red_hat.service.in
++++ lvm2-2.02.111/scripts/lvm2_cluster_activation_systemd_red_hat.service.in
+@@ -9,9 +9,9 @@ Conflicts=shutdown.target
+ [Service]
+ Type=simple
+ RemainAfterExit=yes
+-EnvironmentFile=- at sysconfdir@/sysconfig/clvmd
+-ExecStart=@systemdutildir@/lvm2-cluster-activation activate
+-ExecStop=@systemdutildir@/lvm2-cluster-activation deactivate
++EnvironmentFile=-/etc/default/clvm
++ExecStart=/lib/systemd/lvm2-cluster-activation activate
++ExecStop=/lib/systemd/lvm2-cluster-activation deactivate
+ 
+ [Install]
+ WantedBy=multi-user.target
+Index: lvm2-2.02.111/scripts/lvm2_clvmd_systemd_red_hat.service.in
+===================================================================
+--- lvm2-2.02.111.orig/scripts/lvm2_clvmd_systemd_red_hat.service.in
++++ lvm2-2.02.111/scripts/lvm2_clvmd_systemd_red_hat.service.in
+@@ -1,9 +1,9 @@
+ [Unit]
+ Description=Clustered LVM daemon
+ Documentation=man:clvmd(8)
+-After=dlm.service corosync.service
+-Before=remote-fs.target
+-Requires=network.target dlm.service corosync.service
++After=cman.service corosync.service
++Before=remote-fs-pre.target
++Requires=network.target cman.service corosync.service
+ RefuseManualStart=true
+ RefuseManualStop=true
+ StopWhenUnneeded=true
+@@ -13,11 +13,11 @@ Conflicts=shutdown.target
+ [Service]
+ Type=forking
+ Environment=CLVMD_OPTS=-T30
+-EnvironmentFile=- at sysconfdir@/sysconfig/clvmd
+-ExecStart=@sbindir@/clvmd $CLVMD_OPTS
++EnvironmentFile=-/etc/default/clvm
++ExecStart=/usr/sbin/clvmd $CLVMD_OPTS
+ SuccessExitStatus=5
+ TimeoutStartSec=30
+ TimeoutStopSec=10
+ OOMScoreAdjust=-1000
+ Restart=on-abort
+-PIDFile=@CLVMD_PIDFILE@
++PIDFile=/var/run/clvmd.pid
diff -Nru lvm2-2.02.111/debian/patches/series lvm2-2.02.111/debian/patches/series
--- lvm2-2.02.111/debian/patches/series	2015-01-17 18:13:22.000000000 +0100
+++ lvm2-2.02.111/debian/patches/series	2016-06-17 15:34:57.000000000 +0200
@@ -8,3 +8,4 @@
 udev.patch
 systemd.patch
 clvmd-openais-format.patch
+lvm2-cluster-services.patch


More information about the pkg-lvm-maintainers mailing list