Whamcloud - gitweb
LU-3264 tests: support failover testing with ZFS
authorJian Yu <jian.yu@intel.com>
Fri, 3 May 2013 16:48:24 +0000 (00:48 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 14 May 2013 05:50:53 +0000 (01:50 -0400)
commitfb8bf83fabd45730345b3eb8c5289334174462be
tree7773c91eae0d4dc1a0951b519032904289d19231
parent14325071012bfdf9723376123079ce66c79133d2
LU-3264 tests: support failover testing with ZFS

This patch improves test-framework.sh to support failover testing with
ZFS under shared storage configuration.

After formatting a ZFS target, "cachefile=none" property will be set
on the ZFS storage pool so that the pool is not automatically imported
on system startup. And then the pool will be exported so as to leave
the import and export operations handled by mount_facet() and stop().

For SOFT failure mode (unmount and mount), "zpool export …" will be
run on the active server node to export the ZFS storage pool, and
"zpool import -f …" will be run on the failover partner node to import
the pool.

For HARD failure mode (power off and on), since the "cachefile=none"
property has been set on the ZFS storage pool on the active server
node, after the node is power-cycled, the pool will not be imported.
Then on the failover partner node, "zpool import -f …" can be run to
import the pool.

Test-Parameters: envdefinitions=PTLDEBUG=-1,DEBUG_SIZE=128 \
mdtfilesystemtype=zfs mdsfilesystemtype=zfs ostfilesystemtype=zfs \
clientdistro=el6 serverdistro=el6 clientarch=x86_64 \
serverarch=x86_64 clientcount=4 osscount=2 mdscount=2 \
austeroptions=-R failover=true useiscsi=true \
testlist=recovery-double-scale

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I6b9646cb36f7fa4924af03a055ccb137187843a5
Reviewed-on: http://review.whamcloud.com/6258
Tested-by: Hudson
Reviewed-by: Li Wei <wei.g.li@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/test-framework.sh