- # The MMP feature is automatically enabled by mkfs.lustre for
- # new file system at format time if failover is being used.
- # Otherwise, the Lustre administrator has to manually enable
- # this feature when the file system is unmounted.
-
- local var=${MMP_MDS}failover_HOST
- if [ -z "${!var}" ]; then
- log "Failover is not used on MDS, enabling MMP manually..."
- enable_mmp $MMP_MDS $MMP_MDSDEV || \
- error "failed to enable MMP on $MMP_MDSDEV on $MMP_MDS"
- fi
+ mmp_is_enabled $MMP_MDS $MMP_MDSDEV ||
+ {
+ log "MMP is not enabled on MDS, enabling it manually..."
+ enable_mmp $MMP_MDS $MMP_MDSDEV ||
+ error "failed to enable MMP on $MMP_MDSDEV on $MMP_MDS"
+ I_ENABLED_MDS=1
+ }