1 node = Heartbeat 1 node= node majority

Software-based VM-centric and flash-friendly VM storage + free version

Moderators: anton (staff), art (staff), Max (staff), Anatoly (staff)

networkeng123
Posts: 15
Joined: Thu Jul 13, 2023 1:01 pm

Fri Mar 08, 2024 5:35 pm

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?
yaroslav (staff)
Staff
Posts: 2361
Joined: Mon Nov 18, 2019 11:11 am

Fri Mar 08, 2024 7:04 pm

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.
networkeng123
Posts: 15
Joined: Thu Jul 13, 2023 1:01 pm

Sat Mar 09, 2024 12:45 am

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?
yaroslav (staff)
Staff
Posts: 2361
Joined: Mon Nov 18, 2019 11:11 am

Sat Mar 09, 2024 1:06 am

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?
networkeng123
Posts: 15
Joined: Thu Jul 13, 2023 1:01 pm

Mon Mar 11, 2024 9:35 am

HI,

I have attached some screen shots.
One server is set to heartbeat the other is node majority.
Attachments
screenshot1.png
screenshot1.png (12.04 KiB) Viewed 14263 times
screenshot 2.png
screenshot 2.png (11.13 KiB) Viewed 14263 times
networkeng123
Posts: 15
Joined: Thu Jul 13, 2023 1:01 pm

Mon Mar 11, 2024 9:46 am

It works fine under normal circumstances, however it doesn't failover if the the primary server goes offline.
yaroslav (staff)
Staff
Posts: 2361
Joined: Mon Nov 18, 2019 11:11 am

Mon Mar 11, 2024 10:03 am

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.
networkeng123
Posts: 15
Joined: Thu Jul 13, 2023 1:01 pm

Mon Mar 11, 2024 10:15 am

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?
yaroslav (staff)
Staff
Posts: 2361
Joined: Mon Nov 18, 2019 11:11 am

Mon Mar 11, 2024 10:51 am

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.
networkeng123
Posts: 15
Joined: Thu Jul 13, 2023 1:01 pm

Mon Mar 11, 2024 11:32 am

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=""
)
yaroslav (staff)
Staff
Posts: 2361
Joined: Mon Nov 18, 2019 11:11 am

Mon Mar 11, 2024 12:08 pm

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",
networkeng123
Posts: 15
Joined: Thu Jul 13, 2023 1:01 pm

Mon Mar 11, 2024 12:20 pm

Hi,

I copied it straight out of the scripts folder?
networkeng123
Posts: 15
Joined: Thu Jul 13, 2023 1:01 pm

Mon Mar 11, 2024 12:57 pm

HI,
When I change this:
$failover=1

It doesn't work I get this error:
Invalid channel format [2]
yaroslav (staff)
Staff
Posts: 2361
Joined: Mon Nov 18, 2019 11:11 am

Mon Mar 11, 2024 3:31 pm

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.
networkeng123
Posts: 15
Joined: Thu Jul 13, 2023 1:01 pm

Mon Mar 11, 2024 5:00 pm

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
Post Reply