From: Harald Hoyer Date: Fri, 13 Dec 2013 10:05:39 +0000 (+0100) Subject: lvm: fixed lvm thin check X-Git-Tag: 035~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=831625d29ed6f174b276cd738e34bfebc5052e1c;p=thirdparty%2Fdracut.git lvm: fixed lvm thin check --- diff --git a/modules.d/90lvm/module-setup.sh b/modules.d/90lvm/module-setup.sh index 1206310ba..a64e5d662 100755 --- a/modules.d/90lvm/module-setup.sh +++ b/modules.d/90lvm/module-setup.sh @@ -99,9 +99,16 @@ install() { if [[ $hostonly ]] && type -P lvs &>/dev/null; then for dev in "${!host_fs_types[@]}"; do - if [[ "$(lvs --noheadings -o segtype "$dev" 2>/dev/null)" == *thin* ]] ; then + [ -e /sys/block/${dev#/dev/}/dm/name ] || continue + 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 done + else + inst_multiple -o thin_dump thin_restore thin_check thin_repair fi }