mirror of
https://github.com/ceph/ceph
synced 2024-12-23 20:03:56 +00:00
de8f021204
* qa/rbd/common: create tempdir for script * qa/rbd/common: try harder to find monhost (try "mon addr" and also "mon.a addr") * qa/rbd/rbd.sh: honor $mnt parameter Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
50 lines
664 B
Bash
Executable File
50 lines
664 B
Bash
Executable File
#!/bin/bash -x
|
|
|
|
basedir=`echo $0 | sed 's/[^/]*$//g'`.
|
|
. $basedir/common.sh
|
|
|
|
rbd_test_init
|
|
|
|
|
|
create_multiple() {
|
|
for i in `seq 1 10`; do
|
|
rbd_create_image $i
|
|
done
|
|
|
|
for i in `seq 1 10`; do
|
|
rbd_add $i
|
|
done
|
|
for i in `seq 1 10`; do
|
|
devname=/dev/rbd`eval echo \\$rbd$i`
|
|
echo $devname
|
|
done
|
|
for i in `seq 1 10`; do
|
|
devid=`eval echo \\$rbd$i`
|
|
rbd_remove $devid
|
|
done
|
|
for i in `seq 1 10`; do
|
|
rbd_rm_image $i
|
|
done
|
|
}
|
|
|
|
test_dbench() {
|
|
rbd_create_image 0
|
|
rbd_add 0
|
|
|
|
devname=/dev/rbd$rbd0
|
|
|
|
mkfs -t ext3 $devname
|
|
mount -t ext3 $devname $mnt
|
|
|
|
dbench -D $mnt -t 30 5
|
|
sync
|
|
|
|
umount $mnt
|
|
rbd_remove $rbd0
|
|
rbd_rm_image 0
|
|
}
|
|
|
|
create_multiple
|
|
test_dbench
|
|
|