Page 1 of 2

1 node = Heartbeat 1 node= node majority

Posted: Fri Mar 08, 2024 5:35 pm
by networkeng123
Hi,

I have installed starwind free and have noticed that 1 node has been configured as heartbeat and the other is node majority.

Should they be the same and how do I rectify it?

Re: 1 node = Heartbeat 1 node= node majority

Posted: Fri Mar 08, 2024 7:04 pm
by yaroslav (staff)
Welcome to StarWind Forum.
The Failover strategy is the HA-device-level property. Do you mean that you have different devices configured with different Failover strategies?
If the device does not have any data on it, simply recreate it.

Re: 1 node = Heartbeat 1 node= node majority

Posted: Sat Mar 09, 2024 12:45 am
by networkeng123
Hi,

It says that they are synced, but when I reboot the one with the heartbeat setting it doesn't failover.

What do I need to set in the poweshell to set the heartbeat failover strategy?

Re: 1 node = Heartbeat 1 node= node majority

Posted: Sat Mar 09, 2024 1:06 am
by yaroslav (staff)
Do you have iSCSI connections to both HA devices?
Can you please tell me more about hypervisor. Also, can you share a short video/series of screenshots how the issue manifests itself?

Re: 1 node = Heartbeat 1 node= node majority

Posted: Mon Mar 11, 2024 9:35 am
by networkeng123
HI,

I have attached some screen shots.
One server is set to heartbeat the other is node majority.

Re: 1 node = Heartbeat 1 node= node majority

Posted: Mon Mar 11, 2024 9:46 am
by networkeng123
It works fine under normal circumstances, however it doesn't failover if the the primary server goes offline.

Re: 1 node = Heartbeat 1 node= node majority

Posted: Mon Mar 11, 2024 10:03 am
by yaroslav (staff)
Thank you for your update.
Is it the same HA device or different devices?
StarWind HA device with node majority is not intended to present the storage when in isolated mode by design. HA devcies with node majority are intended for 3-way replicas or 2-way replica + witness.

Re: 1 node = Heartbeat 1 node= node majority

Posted: Mon Mar 11, 2024 10:15 am
by networkeng123
Hi,

They are different devices, I created using the powershell scripts, heartbeat failover mode is what we want for a 2 node system?
Which parameter in the script sets the failover mode to heartbeat if I was to delete it and reconfigure it?

Re: 1 node = Heartbeat 1 node= node majority

Posted: Mon Mar 11, 2024 10:51 am
by yaroslav (staff)
Thanks for your questions!
heartbeat failover mode is what we want for a 2 node system?
This is a tricky one. It depends on network configuration and preferences.
See more on Node Majority https://www.starwindsoftware.com/help/N ... ategy.html. See more on system requirements https://www.starwindsoftware.com/system-requirements. In a nutshell: If your networking does not meet system requirements you need 2 data nodes and a witness on a separate hardware or 3-way mirror with Node Majority without a witness.
Which parameter in the script sets the failover mode to heartbeat if I was to delete it and reconfigure it?
There are 2 separate scripts for HA devices with Node majority (CreateHAPartherWitness.ps1 and CreateHASmbWitness.ps1). It all depends on the use case.
CreateHAPartherWitness.ps1 creates a HA device HA device with majority+witness
CreateHASmbWitness.ps1 creates HA device and SMB share.

Re: 1 node = Heartbeat 1 node= node majority

Posted: Mon Mar 11, 2024 11:32 am
by networkeng123
HI,

I used the "createimagefile" and then the "CreateHA_2" powershell script when creating them

Which part of the script creates the failover strategy is in the "createHA_2" script or the "createimagefile"?

"Createimagefile":
param($addr="127.0.0.1", $port=3261, $user="root", $password="starwind",
$fileName="img1",
$filePath="My Computer\C\Starwind",
$size=12,
$targetAlias="targetimg1",
$sectorSize=512,
$numaNode=0,
$cacheMode="wb",
$cacheSize=128)


CreateHA_2:

param($addr="192.168.0.1", $port=3261, $user="root", $password="starwind",
$addr2="192.168.0.2", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="Clear",
$size=12,
$sectorSize=512,
$failover=0,
$bmpType=1,
$bmpStrategy=0,
#primary node
$imagePath="My computer\C\starwind",
$imageName="masterImg21",
$createImage=$true,
$storageName="",
$targetAlias="targetha21",
$autoSynch=$true,
$poolName="pool1",
$syncSessionCount=1,
$aluaOptimized=$true,
$cacheMode="wb",
$cacheSize=128,
$syncInterface="#p2={0}:3260" -f $addr2,
$hbInterface="",
$createTarget=$true,
$bmpFolderPath="",
#secondary node
$imagePath2="My computer\C\starwind",
$imageName2="partnerImg22",
$createImage2=$true,
$storageName2="",
$targetAlias2="partnerha22",
$autoSynch2=$true,
$poolName2="pool1",
$syncSessionCount2=1,
$aluaOptimized2=$false,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$syncInterface2="#p1={0}:3260" -f $addr,
$hbInterface2="",
$createTarget2=$true,
$bmpFolderPath2=""
)

Re: 1 node = Heartbeat 1 node= node majority

Posted: Mon Mar 11, 2024 12:08 pm
by yaroslav (staff)
This is not a correct script. It is not possible to promote ImageFile to a HA device with the script.
Please use the scripts I referred to above.
In CreateHA you can use $failover=0 for Heartbeat and $failover=1, for Node Majority

P.S. Use $initMethod="syncfromfirst",

Re: 1 node = Heartbeat 1 node= node majority

Posted: Mon Mar 11, 2024 12:20 pm
by networkeng123
Hi,

I copied it straight out of the scripts folder?

Re: 1 node = Heartbeat 1 node= node majority

Posted: Mon Mar 11, 2024 12:57 pm
by networkeng123
HI,
When I change this:
$failover=1

It doesn't work I get this error:
Invalid channel format [2]

Re: 1 node = Heartbeat 1 node= node majority

Posted: Mon Mar 11, 2024 3:31 pm
by yaroslav (staff)
Thanks for your update, this is not the best script for this task.
There are no heartbeat interfaces for Node Majority, only synchronization.
Please consider checking CreateHAPartherWitness.ps1 and CreateHASmbWitness.ps1
The script you are referring to is for adding HA device to the existing HA device rather than turning an ImageFile into HA.

Re: 1 node = Heartbeat 1 node= node majority

Posted: Mon Mar 11, 2024 5:00 pm
by networkeng123
Hi,

But I want to set it up as heartbeat strategy, I would use that template right?

From the manual (https://www.starwindsoftware.com/help/H ... ategy.html), the file in the instructions looks out of date cmpared to the powershell script in the latest version I have downloaded?

FYI its the same for this "quick start guide" https://www.starwindsoftware.com/techni ... n-free.pdf