[systemd/f15] Temporary workaround to detect LVM VGs on encrypted PVs. (BZ#708684)

Michal Schmidt michich at fedoraproject.org
Mon Jun 20 08:04:23 UTC 2011


commit 5e991dc3d01d65ebbcd637079dc3d4efe3088c5a
Author: Michal Schmidt <mschmidt at redhat.com>
Date:   Mon Jun 20 10:02:20 2011 +0200

    Temporary workaround to detect LVM VGs on encrypted PVs. (BZ#708684)

 fedora-storage-detect-encrypted-PVs.patch |   26 ++++++++++++++++++++++++++
 systemd.spec                              |    7 ++++++-
 2 files changed, 32 insertions(+), 1 deletions(-)
---
diff --git a/fedora-storage-detect-encrypted-PVs.patch b/fedora-storage-detect-encrypted-PVs.patch
new file mode 100644
index 0000000..a4343c4
--- /dev/null
+++ b/fedora-storage-detect-encrypted-PVs.patch
@@ -0,0 +1,26 @@
+allow fedora-storage-init to detect encrypted PVs
+
+After unlocking an encrypted volume, let LVM detect a possible PV on it.
+This way fedora-storage-init-late.service will be able to activate the VG.
+
+This is a non-upstream patch and it is only temporary until lvm2 is updated
+to use udev and to get rid of /etc/lvm/cache. According to Milan Brož it is
+already implemented upstream.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=708684
+
+Index: systemd-26/src/cryptsetup-generator.c
+===================================================================
+--- systemd-26.orig/src/cryptsetup-generator.c
++++ systemd-26/src/cryptsetup-generator.c
+@@ -131,8 +131,10 @@ static int create_disk(
+                 "RemainAfterExit=yes\n"
+                 "TimeoutSec=0\n" /* the binary handles timeouts anyway */
+                 "ExecStart=" SYSTEMD_CRYPTSETUP_PATH " attach '%s' '%s' '%s' '%s'\n"
++                "ExecStart=-/sbin/pvs -o pv_uuid '/dev/mapper/%s'\n"
+                 "ExecStop=" SYSTEMD_CRYPTSETUP_PATH " detach '%s'\n",
+                 name, u, strempty(password), strempty(options),
++                name,
+                 name);
+ 
+         if (has_option(options, "tmp"))
diff --git a/systemd.spec b/systemd.spec
index 70a9bf1..dacf936 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -2,7 +2,7 @@ Name:           systemd
 Url:            http://www.freedesktop.org/wiki/Software/systemd
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Version:        26
-Release:        4%{?dist}
+Release:        5%{?dist}
 License:        GPLv2+
 Group:          System Environment/Base
 Summary:        A System and Service Manager
@@ -46,6 +46,7 @@ Patch6:         0001-readahead-common-fix-total-memory-size-detection.patch
 Patch7:         0001-systemctl-fix-is-enabled-for-native-units-under-lib.patch
 Patch8:         0001-dbus-fix-name-of-capability-property.patch
 Patch9:         0001-pam-module-add-debug-parameter.patch
+Patch100:       fedora-storage-detect-encrypted-PVs.patch
 
 # For sysvinit tools
 Obsoletes:      SysVinit < 2.86-24, sysvinit < 2.86-24
@@ -109,6 +110,7 @@ SysV compatibility tools for systemd
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
+%patch100 -p1
 
 %build
 %configure --with-rootdir= --with-distro=fedora
@@ -311,6 +313,9 @@ fi
 %{_bindir}/systemd-sysv-convert
 
 %changelog
+* Mon Jun 20 2011 Michal Schmidt <mschmidt at redhat.com> - 26-5
+- Temporary workaround to detect LVM VGs on encrypted PVs. (BZ#708684)
+
 * Wed Jun 15 2011 Michal Schmidt <mschmidt at redhat.com> - 26-4
 - Pick bugfixes from upstream:
 - systemctl: fix 'is-enabled' for native units under /lib (BZ#699027)


More information about the scm-commits mailing list