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