File: 024

package info (click to toggle)
sheepdog 0.8.3-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,364 kB
  • ctags: 3,951
  • sloc: ansic: 30,552; sh: 3,573; perl: 2,924; asm: 453; makefile: 391; python: 192
file content (36 lines) | stat: -rwxr-xr-x 808 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash

# Make sure data written to the cluster can be read from a newly joined node

. ./common

if [[ "$DRIVER" == zoo* ]];then
	DRIVER=${DRIVER/1000/5000}
fi

VDI_NAME="test"
VDI_SIZE="300M"

echo "starting first sheep"
for i in `seq 0 5`; do _start_sheep $i; done
_wait_for_sheep 6

echo "formatting cluster"
_cluster_format -c 1

echo "creating vdi ${NAME}"
_vdi_create ${VDI_NAME} ${VDI_SIZE}
sleep 1

echo "filling ${VDI_NAME} with data"
$QEMU_IO -c "write 0 ${VDI_SIZE}" sheepdog:${VDI_NAME} | _filter_qemu_io

echo "reading back ${VDI_NAME}"
$QEMU_IO -c "read 0 1m" sheepdog:${VDI_NAME} | _filter_qemu_io

echo "starting second sheep"
_start_sheep 6
_wait_for_sheep 7

echo "reading data from second sheep"
$QEMU_IO -c "read 0 ${VDI_SIZE}" sheepdog:localhost:7001:${VDI_NAME} | _filter_qemu_io