Check for multipath module before running multipath tests
Some systems do not ship the md multipath module. If not available simply skip any multipath tests. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
3b2aad6e8b
commit
04c1ca5f29
6
test
6
test
|
@ -19,6 +19,12 @@ then
|
|||
echo >&2 "test: $mdadm isn't usable."
|
||||
fi
|
||||
|
||||
# Check whether to run multipath tests
|
||||
modprobe multipath 2> /dev/null
|
||||
if grep -s 'Personalities : .*multipath' > /dev/null /proc/mdstat ; then
|
||||
MULTIPATH="yes"
|
||||
fi
|
||||
|
||||
# assume md0, md1, md2 exist in /dev
|
||||
md0=/dev/md0 md1=/dev/md1 md2=/dev/md2
|
||||
mdp0=/dev/md_d0
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
#
|
||||
# create a multipath, and fail and stuff
|
||||
|
||||
if [ "$MULTIPATH" != "yes" ]; then
|
||||
echo -ne 'skipping... '
|
||||
exit 0
|
||||
fi
|
||||
|
||||
mdadm -CR $md1 -l multipath -n2 $path0 $path1
|
||||
|
||||
testdev $md1 1 $mdsize12 1
|
||||
|
|
Loading…
Reference in New Issue