-MDT="`do_facet $SINGLEMDS "lctl get_param -N mdt.\*MDT\*/stats 2>/dev/null | cut -d"." -f2" || true`"
-if [ ! -z "$MDT" ]; then
- do_facet $SINGLEMDS "mkdir -p $CONFDIR"
- IDENTITY_FLUSH=mdt.$MDT.identity_flush
- MDSCAPA=mdt.$MDT.capa
- CAPA_TIMEOUT=mdt.$MDT.capa_timeout
- MDSSECLEVEL=mdt.$MDT.sec_level
- LOCALMDT=$MDT
-else
- LOCALMDT=""
-fi
+MDT="`do_facet $SINGLEMDS "lctl get_param -N mdt.\*MDT\*.stats 2>/dev/null | cut -d"." -f2" || true`"
+[ -z "$MDT" ] && error "fail to get MDT device" && exit 1
+do_facet $SINGLEMDS "mkdir -p $CONFDIR"
+IDENTITY_FLUSH=mdt.$MDT.identity_flush
+MDSCAPA=mdt.$MDT.capa
+CAPA_TIMEOUT=mdt.$MDT.capa_timeout
+MDSSECLEVEL=mdt.$MDT.sec_level