File: 047

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 (38 lines) | stat: -rwxr-xr-x 642 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
37
38
#!/bin/bash

# Test journal file replay

. ./common

_start_sheep 0 "-j size=64M"

_wait_for_sheep 1

_cluster_format -c 1

$DOG vdi create test 4G

# write something to vdi 'test'
echo "hello" | $DOG vdi write test 0 512
echo "sheepdog" | $DOG vdi write test 4M 512
# corrupt the vdi...
_kill_sheep 0
if $MD; then
	rm $STORE/0/d*/807c2b2500000000
	rm $STORE/0/d*/007c2b25*
else
	rm $STORE/0/obj/807c2b2500000000
	rm $STORE/0/obj/007c2b25*
fi

# do the journal replay
_start_sheep 0 "-j size=64M"
_wait_for_sheep 1

sleep 3

_vdi_list
$DOG vdi read test 0 512 | tr -d [:cntrl:]
echo -n ' '
$DOG vdi read test 4M 512 | tr -d [:cntrl:]
echo ''