Page 1 of 1

switch primary/secondary priority syncronization?

Posted: Wed Nov 20, 2019 7:16 pm
by dupie
In the free version is it possible to switch which node is the primary and which one is secondary after the device has been created? Took a look but can't find anything in the documentation/powershell scripts
Thanks!

Re: switch primary/secondary priority syncronization?

Posted: Thu Nov 21, 2019 9:38 am
by Boris (staff)
StarWind VSAN uses active-active replication, so there is no notion of primary/secondary. If you feel I might have misunderstood the question, just provide me with more information regarding it.

Re: switch primary/secondary priority syncronization?

Posted: Thu Nov 21, 2019 11:18 pm
by dupie
Annotation 2019-11-21 161321.png
Annotation 2019-11-21 161321.png (83.47 KiB) Viewed 6406 times
Maybe I misunderstood what does the Priority field indicated in the attached screenshot really mean then?

Re: switch primary/secondary priority syncronization?

Posted: Mon Nov 25, 2019 7:48 pm
by danswartz
I was wondering too. I see the 2 nodes with priority 3rd and 4th, and there are only 2 nodes!

Re: switch primary/secondary priority syncronization?

Posted: Tue Nov 26, 2019 12:15 pm
by yaroslav (staff)
Let me clarify where synchronization priority comes from and why you may (or may not) want to change it.
While replicating a StarWind disk, the device which is used as a source gets greater priority (e.g., First priority). Its copy, in turn, has lower priority (e.g., Second, Third, etc.).These numbers are important only after the synchronization connection fails and is subsequently restored. The device of higher priority is considered synchronized and may lead to data corruption if tuned wrong (with the values you get automatically things work just fine). If you change synchronization priorities, data flow during synchronization may cause data corruption someday. If I were you, I would not change the node synchronization priority. There is a way to do that (and I can share the steps with you in case you might really need it).
Devices with “strange” (neither first nor second) priority appear after you remove the replica on one site and create it again. Say, you have a device on node #1 replicated to node #2 (2-node HA cluster). If you remove the replica from node #1, where it had the First priority, and create the replica again, the device priority will be changed to Third. While you have the synchronization channel up, everything works fine. Once the sync channel is down, the device of higher priority (i.e., First in our case) is supposed to stay active, while the other one will stop accepting iSCSI sessions. This is where the heartbeat links come into play, too, as in absence of sync links they allow services to communicate with one another. After the connection is restored, synchronization starts from there.
The main thing you need to understand about the priorities is that one StarWind node is supposed to have priorities for all devices higher than the partner node:
1 - 2
3 - 4
2 - 3
1 - 2
The above example is totally fine to be used.
If you see anything similar to the below:
1 - 2
2 - 1
3 - 4
3 - 2
then you may want to change the device priority settings, which is done by editing HA device header files. Feel free to get back for additional instruction on how to perform that if needed.

Re: switch primary/secondary priority syncronization?

Posted: Fri Jan 03, 2020 2:29 pm
by SupeBoss16v
@yaroslav

Could you sent me the instructions on how to change the device priority.

BR

Re: switch primary/secondary priority syncronization?

Posted: Sun Jan 05, 2020 8:43 pm
by Boris (staff)
There is no publicly available instruction at the moment, as this is something users are not supposed to play with. Wrong actions when changing device priority settings may result in incorrect behavior of the software at the moment when you would rely on its correct behavior.
Could you give us more information on what's your intended use case for this operation and why you would like to change this setting?