<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Thanks Bingpeng.<br>
I also encountered this problem.<br>
I suggest sheep should scan oid.tmp files and remove them when it is
being started.<br>
<br>
<div class="moz-cite-prefix">On 2014年09月15日 00:14, Bingpeng Zhu
wrote:<br>
</div>
<blockquote cite="mid:tencent_50CAD2107E54BE6745F0D189@qq.com"
type="cite">
<div>
<div>Hi, all:</div>
<div> I have a problem in using sheepdog. I create a erasure
coded VDI and write</div>
<div> some data to it. Then, I unplug disk and stop/restart one
sheep in a short</div>
<div> time. After recovery is completed in the latest epoch, I
find some replica is</div>
<div> lost and only the corresponding oid.tmp file exists in
the data directory. I tried</div>
<div> to rebuild the replica using "dog vdi check", but it
didn't work. I think it is</div>
<div> caused by oid.tmp file. I have to delete the oid.tmp file
manually and then</div>
<div> "dog vdi check" successfully recoverd the lost replica.</div>
<div> In function default_create_and_write() <span
style="line-height: 1.5;">of sheep/plain_store.c, it returns</span></div>
<div><span style="line-height: 1.5;"> success directly if
oid.tmp file exists.</span><span style="line-height: 1.5;"> I
have read the comment in this function carefully,</span></div>
<div><span style="line-height: 1.5;"> it says gateway and
recovery thread </span><span style="line-height: 1.5;">may
try to write the SAME data, so it is okay</span></div>
<div><span style="line-height: 1.5;"> to simply return success
here. To solve </span><span style="line-height: 1.5;">this
problem, I want to change the code of</span></div>
<div><span style="line-height: 1.5;">
default_create_and_write() so that replica data </span><span
style="line-height: 1.5;">will be written even oid.tmp file
exists.</span></div>
<div><span style="line-height: 1.5;"> If oid.tmp exists, the
function should overwrite </span><span style="line-height:
1.5;">it.</span></div>
</div>
<div><span style="line-height: 1.5;"> </span>I am not sure if
this change will work good for all scenario. Especially, I doubt
whether</div>
<div> this change will lead to old data overwriting new data. But
I haven't thought out any scenario</div>
<div><span style="line-height: 1.5;"> that will lead to old data
overwriting new data. Can someone give me some advice to solve
this problem?</span></div>
<div><br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<br>
</body>
</html>