diff --git a/0018-lvm-always-install-thin-utils-for-lvm.patch b/0018-lvm-always-install-thin-utils-for-lvm.patch new file mode 100644 index 0000000..e88869a --- /dev/null +++ b/0018-lvm-always-install-thin-utils-for-lvm.patch @@ -0,0 +1,76 @@ +From 5d623b1775ebc7dc17bc23f2839906f418b17383 Mon Sep 17 00:00:00 2001 +From: Harald Hoyer +Date: Mon, 21 Oct 2013 09:09:26 +0200 +Subject: [PATCH] lvm: always install thin utils for lvm + +--- + modules.d/90lvm/module-setup.sh | 33 +++++++-------------------------- + 1 file changed, 7 insertions(+), 26 deletions(-) + +diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh +index cbdf4a2..87374da 100755 +--- a/modules.d/90lvm/module-setup.sh ++++ b/modules.d/90lvm/module-setup.sh +@@ -24,7 +24,8 @@ depends() { + return 0 + } + +-get_host_lvs() { ++# called by dracut ++cmdline() { + local _activated + declare -A _activated + +@@ -37,37 +38,20 @@ get_host_lvs() { + eval $(dmsetup splitname --nameprefixes --noheadings --rows "$dev" 2>/dev/null) + [[ ${DM_VG_NAME} ]] && [[ ${DM_LV_NAME} ]] || return 1 + if ! [[ ${_activated[${DM_VG_NAME}/${DM_LV_NAME}]} ]]; then +- printf "%s\n" "${DM_VG_NAME}/${DM_LV_NAME} " ++ printf " rd.lvm.lv=%s\n" "${DM_VG_NAME}/${DM_LV_NAME} " + _activated["${DM_VG_NAME}/${DM_LV_NAME}"]=1 + fi + done + } + + # called by dracut +-cmdline() { +- get_host_lvs | while read line; do +- printf " rd.lvm.lv=$line" +- done +-} +- +-# called by dracut + install() { +- local _i _needthin ++ local _i + + inst lvm + +- if [[ $hostonly ]]; then +- while read line; do +- [[ -n "$line" ]] || continue +- printf "%s" " rd.lvm.lv=$line" +- if ! [[ $_needthin ]]; then +- [[ "$(lvs --noheadings -o segtype ${line%%/*} 2>/dev/null)" == *thin* ]] && _needthin=1 +- fi +- done <<<$(get_host_lvs) >> "${initdir}/etc/cmdline.d/90lvm.conf" +- echo >> "${initdir}/etc/cmdline.d/90lvm.conf" +- else +- _needthin=1 +- fi ++ cmdline >> "${initdir}/etc/cmdline.d/90lvm.conf" ++ echo >> "${initdir}/etc/cmdline.d/90lvm.conf" + + inst_rules "$moddir/64-lvm.rules" + +@@ -103,9 +87,6 @@ install() { + + inst_libdir_file "libdevmapper-event-lvm*.so" + +- if [[ $_needthin ]]; then +- inst_multiple -o thin_dump thin_restore thin_check thin_repair +- fi +- ++ inst_multiple -o thin_dump thin_restore thin_check thin_repair + } + diff --git a/dracut.spec b/dracut.spec index 335604f..da5ae8c 100644 --- a/dracut.spec +++ b/dracut.spec @@ -10,7 +10,7 @@ Name: dracut Version: 034 -Release: 18.git20131018%{?dist} +Release: 19.git20131021%{?dist} Summary: Initramfs generator using udev %if 0%{?fedora} || 0%{?rhel} @@ -46,6 +46,7 @@ Patch14: 0014-network-fcoe-only-redirect-output-to-loginit.pipe-if.patch Patch15: 0015-mkdir-basic-dirs-in-run.patch Patch16: 0016-dracut-functions.sh-check_block_and_slaves-skip-LVM-.patch Patch17: 0017-kernel-modules-ARM-add-mmc_block-usb_storage-to-stat.patch +Patch18: 0018-lvm-always-install-thin-utils-for-lvm.patch BuildRequires: bash git @@ -466,6 +467,11 @@ rm -rf -- $RPM_BUILD_ROOT %endif %changelog +* Mon Oct 21 2013 Harald Hoyer 034-19.git20131021 +- Fixed LVM with thin provisioning +Resolves: rhbz#1013767 +Resolves: rhbz#1021083 + * Fri Oct 18 2013 Harald Hoyer 034-18.git20131018 - Fixed LVM with thin provisioning Resolves: rhbz#1013767