lvm: add cache tools for dm-cache usage
(cherry picked from commit 70598ac292
)
parent
28be8992c3
commit
77ffc465b9
|
@ -107,12 +107,19 @@ install() {
|
||||||
dev=$(</sys/block/${dev#/dev/}/dm/name)
|
dev=$(</sys/block/${dev#/dev/}/dm/name)
|
||||||
eval $(dmsetup splitname --nameprefixes --noheadings --rows "$dev" 2>/dev/null)
|
eval $(dmsetup splitname --nameprefixes --noheadings --rows "$dev" 2>/dev/null)
|
||||||
[[ ${DM_VG_NAME} ]] && [[ ${DM_LV_NAME} ]] || continue
|
[[ ${DM_VG_NAME} ]] && [[ ${DM_LV_NAME} ]] || continue
|
||||||
if [[ "$(lvs --noheadings -o segtype ${DM_VG_NAME} 2>/dev/null)" == *thin* ]] ; then
|
case "$(lvs --noheadings -o segtype ${DM_VG_NAME} 2>/dev/null)" in
|
||||||
inst_multiple -o thin_dump thin_restore thin_check thin_repair
|
*thin*|*cache*|*era*)
|
||||||
break
|
inst_multiple -o thin_dump thin_restore thin_check thin_repair \
|
||||||
fi
|
cache_dump cache_restore cache_check cache_repair \
|
||||||
|
era_check era_dump era_invalidate era_restore
|
||||||
|
break;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
else
|
fi
|
||||||
inst_multiple -o thin_dump thin_restore thin_check thin_repair
|
|
||||||
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue