Restoring a PFS from a backup

Aleksej Lebedev root at zta.lk
Tue Oct 30 03:48:17 PDT 2018


On 2018-10-29 15:42, Aleksej Lebedev wrote:
> On 2018-10-29 15:12, Tim Darby wrote:
> 
>> This is an issue I've reported: 
>> http://bugs.dragonflybsd.org/issues/2915
>> 
>> My way around this is to create the new master and use cpdup to copy 
>> the PFS slave to it.
>> 
>> Tim
> 
> Hi, Tim.
> 
> Thanks for your reply.
> Your problem does look similar to mine. But I now think it might not
> be a bug: latest transactions might not be commited.
> Reading through the manual once more I noticed there is a command
> "hammer synctid" which syncs the PFS and gives you the TID that you
> might use to check that mirror-copy/stream reached it.
> 
> I will experiment with it a bit more and let you know if the problem 
> resolves.

I ended up deleting my PFS restored from a backup and re-restoring it 
again, now making sure its sync-end-tid is the same as in the backup 
PFS.
After it's done I checked that it contained exactly the same data - it 
did.
Then I tried to do mirror-copy back, i.e. from just restored PFS to the 
backup - it worked instantly.
Then I upgraded my restored PFS to master, made some changes and checked 
if mirror-copy/stream picks them up - all worked as expected.

So it looks like the only problem was last time that I upgraded my 
recovered PFS too early - before hammer committed the last transaction.

Having said that, I tried to reproduce the scenario from the ticket you 
reported and indeed there was a problem. I even checked that the 
sync-end-tid is the same after mirror-copy - still the problem 
persisted.

I am surprised this ticket is 2 years old and there are no comments. If 
it's really a bug in hammer, it very important.

-- 
Aleksej Lebedev




More information about the Users mailing list