summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/lvm2
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2017-09-21 04:04:42 -0400
committerMartin Jansa <Martin.Jansa@gmail.com>2017-09-22 22:50:48 +0000
commit82dc6280f4bb6cd00664ee89aa2ab33111da24b6 (patch)
treec4b533606b16546d618b28f45840aed25725f1a8 /meta-oe/recipes-support/lvm2
parent1a1595cbe453bfb37096efd2d953e5d8e8d5a4d3 (diff)
downloadmeta-openembedded-82dc6280f4bb6cd00664ee89aa2ab33111da24b6.tar.gz
lvm2: fix start lvm2-monitor.service failed
While systemd based, start lvm2-monitor.service failed. ... |Sep 21 05:37:34 qemux86-64 lvm[389]: /var/lock: stat failed: No such file or directory |Sep 21 05:37:34 qemux86-64 systemd[1]: lvm2-monitor.service: Main process exited, code=exited, status=5/NOTINSTALLED ... The failure of lvm2-monitor.service caused reboot hung when disk partion is lvm thin provision. While starting lvm2-monitor.service, it reqires the existence of locking dir "/var/lock" which is a symlink to "../run/lock" in oe-core, and "/run" is created in "/etc/fstab" which have to be be after the start of lvm2-monitor.service. So tweak the locking dir to "/tmp/lock" and make sure the dir existence (after tmp.mount). Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/lvm2')
-rw-r--r--meta-oe/recipes-support/lvm2/files/0006-start-lvm2-monitor.service-after-tmp.mount.patch32
-rw-r--r--meta-oe/recipes-support/lvm2/files/lvm.conf2
-rw-r--r--meta-oe/recipes-support/lvm2/lvm2.inc1
3 files changed, 34 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/lvm2/files/0006-start-lvm2-monitor.service-after-tmp.mount.patch b/meta-oe/recipes-support/lvm2/files/0006-start-lvm2-monitor.service-after-tmp.mount.patch
new file mode 100644
index 000000000..0e68d62fc
--- /dev/null
+++ b/meta-oe/recipes-support/lvm2/files/0006-start-lvm2-monitor.service-after-tmp.mount.patch
@@ -0,0 +1,32 @@
1From 24a2c47fd01dde1710f1fa66f5c30ce7010c5956 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Thu, 21 Sep 2017 15:28:10 +0800
4Subject: [PATCH] start lvm2-monitor.service after tmp.mount
5
6The lvm2-monitor.service reqires the existence of locking_dir
7("/tmp/lock/lvm"), and unit tmp.mount is to mount /tmp.
8So start lvm2-monitor.service after tmp.mount
9
10Upstream-Status: Inappropriate [oe specific]
11
12Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
13---
14 scripts/lvm2_monitoring_systemd_red_hat.service.in | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/scripts/lvm2_monitoring_systemd_red_hat.service.in b/scripts/lvm2_monitoring_systemd_red_hat.service.in
18index 22238b7..93b2bee 100644
19--- a/scripts/lvm2_monitoring_systemd_red_hat.service.in
20+++ b/scripts/lvm2_monitoring_systemd_red_hat.service.in
21@@ -2,7 +2,7 @@
22 Description=Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling
23 Documentation=man:dmeventd(8) man:lvcreate(8) man:lvchange(8) man:vgchange(8)
24 Requires=dm-event.socket lvm2-lvmetad.socket
25-After=dm-event.socket dm-event.service lvm2-lvmetad.socket lvm2-activation.service lvm2-lvmetad.service
26+After=dm-event.socket dm-event.service lvm2-lvmetad.socket lvm2-activation.service lvm2-lvmetad.service tmp.mount
27 Before=local-fs-pre.target
28 DefaultDependencies=no
29 Conflicts=shutdown.target
30--
311.8.3.1
32
diff --git a/meta-oe/recipes-support/lvm2/files/lvm.conf b/meta-oe/recipes-support/lvm2/files/lvm.conf
index 9e3b5fe29..c2bb85d8b 100644
--- a/meta-oe/recipes-support/lvm2/files/lvm.conf
+++ b/meta-oe/recipes-support/lvm2/files/lvm.conf
@@ -214,7 +214,7 @@ global {
214 214
215 # Local non-LV directory that holds file-based locks while commands are 215 # Local non-LV directory that holds file-based locks while commands are
216 # in progress. A directory like /tmp that may get wiped on reboot is OK. 216 # in progress. A directory like /tmp that may get wiped on reboot is OK.
217 locking_dir = "/var/lock/lvm" 217 locking_dir = "/tmp/lock/lvm"
218 218
219 # Other entries can go here to allow you to load shared libraries 219 # Other entries can go here to allow you to load shared libraries
220 # e.g. if support for LVM1 metadata was compiled as a shared library use 220 # e.g. if support for LVM1 metadata was compiled as a shared library use
diff --git a/meta-oe/recipes-support/lvm2/lvm2.inc b/meta-oe/recipes-support/lvm2/lvm2.inc
index 9791554a9..d2c147417 100644
--- a/meta-oe/recipes-support/lvm2/lvm2.inc
+++ b/meta-oe/recipes-support/lvm2/lvm2.inc
@@ -15,6 +15,7 @@ SRC_URI = "ftp://sources.redhat.com/pub/lvm2/old/LVM2.${PV}.tgz \
15 file://0004-tweak-MODPROBE_CMD-for-cross-compile.patch \ 15 file://0004-tweak-MODPROBE_CMD-for-cross-compile.patch \
16 file://0001-Avoid-bashisms-in-init-scripts.patch \ 16 file://0001-Avoid-bashisms-in-init-scripts.patch \
17 file://0005-do-not-build-manual.patch \ 17 file://0005-do-not-build-manual.patch \
18 file://0006-start-lvm2-monitor.service-after-tmp.mount.patch \
18 " 19 "
19S = "${WORKDIR}/LVM2.${PV}" 20S = "${WORKDIR}/LVM2.${PV}"
20 21