Wasn't sure if I should start a new thread for this, but I've run into some confusion as to how HAST synchronizes.
In the wiki (http://wiki.freebsd.org/HAST) it seems to indicate that HAST will simply figure out which is the best way to synchcronize and that might be primary->secondary, or secondary->primary, and of those either regular or full sync will be selected. These choices are based on the localcnt and remotecnt of dirty extents (ie modified data).
However, in the man page for hasd it says:
The last line in bold is the key and seems to indicate that sync only happens primary->secondary.
It seems intuitive that the "freshest" data should always reside on the Primary. So, my primary goes down, the secondary switches to primary, and it will have new data. I fire up the old primary and it should be set as secondary, then receive the changes from the current primary. I can then switch roles back if I so desire.
But if the WIKI is right, and a sync from secondary is possible, then the roles don't seem to play a part and so long as one is primary and the other secondary, hastd will figure it out.
Is this wishfull thinking?
Also, is there away to tell when synchronization is complete and, if applicable, which direction it is going? Update: yes, hastctl status for "complete" or not. Direction though? Does it matter?
In the wiki (http://wiki.freebsd.org/HAST) it seems to indicate that HAST will simply figure out which is the best way to synchcronize and that might be primary->secondary, or secondary->primary, and of those either regular or full sync will be selected. These choices are based on the localcnt and remotecnt of dirty extents (ie modified data).
However, in the man page for hasd it says:
The connection between two hastd daemons is always initiated from the one
running as primary to the one running as secondary. When primary hastd
is unable to connect or connection fails, it will try to re-establish
connection every few seconds. Once connection is established, primary
hastd will synchronize every extent that was modified during connection
outage to the secondary hastd.
The last line in bold is the key and seems to indicate that sync only happens primary->secondary.
It seems intuitive that the "freshest" data should always reside on the Primary. So, my primary goes down, the secondary switches to primary, and it will have new data. I fire up the old primary and it should be set as secondary, then receive the changes from the current primary. I can then switch roles back if I so desire.
But if the WIKI is right, and a sync from secondary is possible, then the roles don't seem to play a part and so long as one is primary and the other secondary, hastd will figure it out.
Is this wishfull thinking?
Also, is there away to tell when synchronization is complete and, if applicable, which direction it is going? Update: yes, hastctl status for "complete" or not. Direction though? Does it matter?