Add the --unlink option to mirror

This deletes the local file before tearing down the mirror connection,
allowing us to avoid an ambiguous recovery situation.
This commit is contained in:
Alex Young
2012-07-23 13:39:27 +01:00
parent fd935ce4c9
commit 33f95e1986
9 changed files with 140 additions and 44 deletions

View File

@@ -73,6 +73,10 @@ class Environment
@nbd1.mirror_unchecked( @nbd2.ip, @nbd2.port, nil, nil, 10 )
end
def mirror12_unlink
@nbd1.mirror_unlink( @nbd2.ip, @nbd2.port, 2 )
end
def writefile1(data)
@file1 = FileWriter.new(@filename1, @blocksize).write(data)