summaryrefslogtreecommitdiffstats
path: root/lvm-fixed-lvm-thin-check.patch
diff options
context:
space:
mode:
Diffstat (limited to 'lvm-fixed-lvm-thin-check.patch')
-rw-r--r--lvm-fixed-lvm-thin-check.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/lvm-fixed-lvm-thin-check.patch b/lvm-fixed-lvm-thin-check.patch
new file mode 100644
index 0000000..c7f8f7a
--- /dev/null
+++ b/lvm-fixed-lvm-thin-check.patch
@@ -0,0 +1,31 @@
+From 920384c4128691941f9bd8819eae2b4f334aa7b1 Mon Sep 17 00:00:00 2001
+From: Harald Hoyer <harald@redhat.com>
+Date: Fri, 13 Dec 2013 11:05:39 +0100
+Subject: [PATCH] lvm: fixed lvm thin check
+
+---
+ modules.d/90lvm/module-setup.sh | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
+index 1206310..c62dc90 100755
+--- a/modules.d/90lvm/module-setup.sh
++++ b/modules.d/90lvm/module-setup.sh
+@@ -99,8 +99,13 @@ install() {
+
+ if [[ $hostonly ]] && type -P lvs &>/dev/null; then
+ for dev in "${!host_fs_types[@]}"; do
+- if [[ "$(lvs --noheadings -o segtype "$dev" 2>/dev/null)" == *thin* ]] ; then
++ [ -e /sys/block/${dev#/dev/}/dm/name ] || continue
++ dev=$(</sys/block/${dev#/dev/}/dm/name)
++ eval $(dmsetup splitname --nameprefixes --noheadings --rows "$dev" 2>/dev/null)
++ [[ ${DM_VG_NAME} ]] && [[ ${DM_LV_NAME} ]] || continue
++ if [[ "$(lvs --noheadings -o segtype ${DM_VG_NAME} 2>/dev/null)" == *thin* ]] ; then
+ inst_multiple -o thin_dump thin_restore thin_check thin_repair
++ break
+ fi
+ done
+ fi
+--
+1.8.4.2
+