+
+ if [ "$SANITYN" != "no" ]; then
+ title sanityN
+ $DEBUG_OFF
+
+ mkdir -p $MOUNT2
+ mount_client $MOUNT2
+ #echo "can't mount2 for '$NAME', skipping sanityN.sh"
+ START=: CLEAN=: bash sanityN.sh
+ umount $MOUNT2
+
+ $DEBUG_ON
+ $CLEANUP
+ $SETUP
+ SANITYN="done"
+ fi
+
+ remote_mds && log "Remote MDS, skipping LFSCK test" && LFSCK=no
+ remote_ost && log "Remote OST, skipping LFSCK test" && LFSCK=no
+
+ if [ "$LFSCK" != "no" -a -x /usr/sbin/lfsck ]; then
+ title lfsck
+ E2VER=`e2fsck -V 2>&1 | head -n 1 | cut -d' ' -f 2`
+ if [ `echo $E2VER | cut -d. -f2` -ge 39 ] && \
+ [ "`echo $E2VER | grep cfs`" -o \
+ "`echo $E2VER | grep sun`" ]; then
+ bash lfscktest.sh
+ else
+ e2fsck -V
+ echo "e2fsck does not support lfsck, skipping"
+ fi
+ LFSCK="done"
+ fi
+
+ [ "$NETTYPE" = "tcp" -o "$NETTYPE" = "ptl" ] || LIBLUSTRE=no # bug 15660
+ if [ "$LIBLUSTRE" != "no" ]; then
+ title liblustre
+ assert_env MGSNID MOUNT2
+ $CLEANUP
+ unload_modules
+ # Liblustre needs accept=all, noacl
+ [ -f /etc/modprobe.conf ] && MODPROBECONF=/etc/modprobe.conf
+ [ -f /etc/modprobe.d/Lustre ] && MODPROBECONF=/etc/modprobe.d/Lustre
+
+ LNETOPTS="$(awk '/^options lnet/ { print $0}' $MODPROBECONF | \
+ sed 's/^options lnet //g; s/"//g') accept=all" \
+ MDS_MOUNT_OPTS=$(echo $MDS_MOUNT_OPTS | sed 's/^[ \t]*//;s/[ \t]*$//') \
+ MDS_MOUNT_OPTS="${MDS_MOUNT_OPTS},noacl" \
+ MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS/#,/-o } \
+ $SETUP
+ export LIBLUSTRE_MOUNT_POINT=$MOUNT2
+ export LIBLUSTRE_MOUNT_TARGET=$MGSNID:/$FSNAME
+ export LIBLUSTRE_TIMEOUT=`cat /proc/sys/lustre/timeout`
+ #export LIBLUSTRE_DEBUG_MASK=`cat /proc/sys/lnet/debug`
+ if [ -x $LIBLUSTRETESTS/sanity ]; then
+ mkdir -p $MOUNT2
+ echo $LIBLUSTRETESTS/sanity --target=$LIBLUSTRE_MOUNT_TARGET
+ $LIBLUSTRETESTS/sanity --target=$LIBLUSTRE_MOUNT_TARGET
+ fi
+ $CLEANUP
+ #$SETUP
+ LIBLUSTRE="done"
+ fi
+
+ $CLEANUP