|
|
64b87c |
From 77ffc465b9c5615040b427dfdf35a3487ef9943c Mon Sep 17 00:00:00 2001
|
|
|
64b87c |
From: Harald Hoyer <harald@redhat.com>
|
|
|
64b87c |
Date: Wed, 28 Jan 2015 13:25:09 +0000
|
|
|
64b87c |
Subject: [PATCH] lvm: add cache tools for dm-cache usage
|
|
|
64b87c |
|
|
|
64b87c |
(cherry picked from commit 70598ac292bce6e554cf0dc327426a7dbf92c65f)
|
|
|
64b87c |
---
|
|
|
64b87c |
modules.d/90lvm/module-setup.sh | 19 +++++++++++++------
|
|
|
64b87c |
1 file changed, 13 insertions(+), 6 deletions(-)
|
|
|
64b87c |
|
|
|
64b87c |
diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh
|
|
|
64b87c |
index 5ec6281..90bc39f 100755
|
|
|
64b87c |
--- a/modules.d/90lvm/module-setup.sh
|
|
|
64b87c |
+++ b/modules.d/90lvm/module-setup.sh
|
|
|
64b87c |
@@ -107,12 +107,19 @@ install() {
|
|
|
64b87c |
dev=$(
|
|
|
64b87c |
eval $(dmsetup splitname --nameprefixes --noheadings --rows "$dev" 2>/dev/null)
|
|
|
64b87c |
[[ ${DM_VG_NAME} ]] && [[ ${DM_LV_NAME} ]] || continue
|
|
|
64b87c |
- if [[ "$(lvs --noheadings -o segtype ${DM_VG_NAME} 2>/dev/null)" == *thin* ]] ; then
|
|
|
64b87c |
- inst_multiple -o thin_dump thin_restore thin_check thin_repair
|
|
|
64b87c |
- break
|
|
|
64b87c |
- fi
|
|
|
64b87c |
+ case "$(lvs --noheadings -o segtype ${DM_VG_NAME} 2>/dev/null)" in
|
|
|
64b87c |
+ *thin*|*cache*|*era*)
|
|
|
64b87c |
+ inst_multiple -o thin_dump thin_restore thin_check thin_repair \
|
|
|
64b87c |
+ cache_dump cache_restore cache_check cache_repair \
|
|
|
64b87c |
+ era_check era_dump era_invalidate era_restore
|
|
|
64b87c |
+ break;;
|
|
|
64b87c |
+ esac
|
|
|
64b87c |
done
|
|
|
64b87c |
- else
|
|
|
64b87c |
- inst_multiple -o thin_dump thin_restore thin_check thin_repair
|
|
|
64b87c |
+ fi
|
|
|
64b87c |
+
|
|
|
64b87c |
+ if ! [[ $hostonly ]]; then
|
|
|
64b87c |
+ inst_multiple -o thin_dump thin_restore thin_check thin_repair \
|
|
|
64b87c |
+ cache_dump cache_restore cache_check cache_repair \
|
|
|
64b87c |
+ era_check era_dump era_invalidate era_restore
|
|
|
64b87c |
fi
|
|
|
64b87c |
}
|