Whamcloud - gitweb
LU-2469 tests: use MDS/OSTDEV and MDS/OSTDEVBASE with zfs
[fs/lustre-release.git] / lustre / tests / test-framework.sh
index 76c6c3a..2fa0007 100644 (file)
@@ -2598,8 +2598,9 @@ ostdevname() {
                        #if $OSTDEVn isn't defined, default is $OSTDEVBASE + num
                        eval DEVPTR=${!DEVNAME:=${OSTDEVBASE}${num}};;
                zfs )
-                       #dataset name is independent of vdev device names
-                       eval DEVPTR=${FSNAME}-ost${num}/ost${num};;
+                       #try $OSTDEVn then $OSTDEVBASE + num then zfs default
+                       local foo=${OSTDEVBASE:-${FSNAME}-ost${num}/ost}${num}
+                       eval DEVPTR=${!DEVNAME:=$foo};;
                * )
                        error "unknown fstype!";;
        esac
@@ -2638,8 +2639,9 @@ mdsdevname() {
                        #if $MDSDEVn isn't defined, default is $MDSDEVBASE + num
                        eval DEVPTR=${!DEVNAME:=${MDSDEVBASE}${num}};;
                zfs )
-                       #dataset name is independent of vdev device names
-                       eval DEVPTR=${FSNAME}-mdt${num}/mdt${num};;
+                       # try $MDSDEVn then $MDSDEVBASE + num then zfs default
+                       local foo=${MDSDEVBASE:-${FSNAME}-mdt${num}/mdt}${num}
+                       eval DEVPTR=${!DEVNAME:=$foo};;
                * )
                        error "unknown fstype!";;
        esac