From: Harald Hoyer Date: Wed, 28 Jan 2015 13:25:09 +0000 (+0000) Subject: lvm: add cache tools for dm-cache usage X-Git-Tag: 041~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=70598ac292bce6e554cf0dc327426a7dbf92c65f;p=thirdparty%2Fdracut.git lvm: add cache tools for dm-cache usage --- diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh index 592a2e28a..c799a1cfb 100755 --- a/modules.d/90lvm/module-setup.sh +++ b/modules.d/90lvm/module-setup.sh @@ -111,12 +111,19 @@ install() { dev=$(/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 + case "$(lvs --noheadings -o segtype ${DM_VG_NAME} 2>/dev/null)" in + *thin*|*cache*|*era*) + inst_multiple -o thin_dump thin_restore thin_check thin_repair \ + cache_dump cache_restore cache_check cache_repair \ + era_check era_dump era_invalidate era_restore + break;; + esac done - else - inst_multiple -o thin_dump thin_restore thin_check thin_repair + fi + + if ! [[ $hostonly ]]; then + inst_multiple -o thin_dump thin_restore thin_check thin_repair \ + cache_dump cache_restore cache_check cache_repair \ + era_check era_dump era_invalidate era_restore fi }