Blame SOURCES/0062-lvm-fixed-lvm-thin-check.patch

a56a5e
From 793beab60c416e0edf7331fa2e6881b08f2bece0 Mon Sep 17 00:00:00 2001
966cef
From: Harald Hoyer <harald@redhat.com>
966cef
Date: Fri, 13 Dec 2013 11:05:39 +0100
966cef
Subject: [PATCH] lvm: fixed lvm thin check
966cef
966cef
---
966cef
 modules.d/90lvm/module-setup.sh | 9 ++++++++-
966cef
 1 file changed, 8 insertions(+), 1 deletion(-)
966cef
966cef
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
1755ca
index 877631bb..f0c9b964 100755
966cef
--- a/modules.d/90lvm/module-setup.sh
966cef
+++ b/modules.d/90lvm/module-setup.sh
966cef
@@ -97,9 +97,16 @@ install() {
966cef
 
966cef
     if [[ $hostonly ]] && type -P lvs &>/dev/null; then
966cef
         for dev in "${!host_fs_types[@]}"; do
966cef
-            if [[ "$(lvs --noheadings -o segtype "$dev" 2>/dev/null)" == *thin* ]] ; then
966cef
+            [ -e /sys/block/${dev#/dev/}/dm/name ] || continue
966cef
+            dev=$(
966cef
+            eval $(dmsetup splitname --nameprefixes --noheadings --rows "$dev" 2>/dev/null)
966cef
+            [[ ${DM_VG_NAME} ]] && [[ ${DM_LV_NAME} ]] || continue
966cef
+            if [[ "$(lvs --noheadings -o segtype ${DM_VG_NAME} 2>/dev/null)" == *thin* ]] ; then
966cef
                 inst_multiple -o thin_dump thin_restore thin_check thin_repair
966cef
+                break
966cef
             fi
966cef
         done
966cef
+    else
966cef
+        inst_multiple -o thin_dump thin_restore thin_check thin_repair
966cef
     fi
966cef
 }