[sheepdog] data corruption under cache enabled node

tuji tuji at atworks.co.jp
Fri Feb 7 07:10:31 CET 2014


Hi

I got corruption on my vm under enabled cache function.
And I have reproduce the problem by dog command.

The vm was moved by live migration. so I believe 
same data corruption was happen for my vm.

node002 and node003 are with cache. 
sheep -p 7000 /home/sheepdog,/home/sheepdog/obj1,/home/sheepdog/obj2 -w size=30000,directio,dir=/home/sheepdog > /dev/null 2>&1

node001 and node004 are with out cache sheepdog. 
sheep -p 7000 /home/sheepdog,/home/sheepdog/obj1,/home/sheepdog/obj2  > /dev/null 2>&1

Sheepdog version is 0.7.6

[root at node001 ~]# ssh node001 dog vdi create sheeptest 1024
[root at node001 ~]# ssh node001 "echo aaaa |dog vdi write sheeptest"
[root at node001 ~]# ssh node001 dog vdi read sheeptest
aaaa
[root at node001 ~]# ssh node002 dog vdi read sheeptest
aaaa
[root at node001 ~]# ssh node003 dog vdi read sheeptest
aaaa
[root at node001 ~]# ssh node004 dog vdi read sheeptest
aaaa
[root at node001 ~]# ssh node002 "echo 1234 |dog vdi write sheeptest"
[root at node001 ~]# ssh node001 dog vdi read sheeptest
1234
[root at node001 ~]# ssh node002 dog vdi read sheeptest
1234
[root at node001 ~]# ssh node003 dog vdi read sheeptest
aaaa
[root at node001 ~]# ssh node004 dog vdi read sheeptest
1234

The data was not updated for node003 after new data was written.

And I found corruption is solved by "dog vdi cache delete".

[root at node001 ~]# ssh node002 dog vdi cache flush sheeptest
[root at node001 ~]# ssh node001 dog vdi read sheeptest
1234
[root at node001 ~]# ssh node002 dog vdi read sheeptest
1234
[root at node001 ~]# ssh node003 dog vdi read sheeptest
aaaa
[root at node001 ~]# ssh node004 dog vdi read sheeptest
1234
[root at node001 ~]# ssh node002 dog vdi cache delete sheeptest
[root at node001 ~]# ssh node001 dog vdi read sheeptest
1234
[root at node001 ~]# ssh node002 dog vdi read sheeptest
1234
[root at node001 ~]# ssh node003 dog vdi read sheeptest
1234
[root at node001 ~]# ssh node004 dog vdi read sheeptest
1234



--------------------------
Masahiro Tsuji

A.T.WORKS, INC
URL http://www.atworks.co.jp




More information about the sheepdog mailing list