2-Node VSAN Error on Windows Server 2022 Standard

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

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

Post Reply
nlachica
Posts: 1
Joined: Thu Dec 07, 2023 8:26 pm

Thu Dec 07, 2023 8:33 pm

Hi,

I'm trying to run the CreateHA_2.ps1 script for the two nodes, but I'm getting the following error:
200 Failed: invalid partner info..

Here is the NIC Configuration:

Node 1:
10.10.1.21 - Host
10.10.10.21 - Synchronization
10.10.20.21 - iSCSI/HB
10.10.1.201 - iSCSI/HB2

Node 2:
10.10.1.22 - Host
10.10.10.22 - Synchronization
10.10.20.22 - iSCSI/HB
10.10.1.202 - iSCSI/HB2

Here is the script I am currently using:

Code: Select all

param($addr="10.10.1.21", $port=3261, $user="root", $password="starwind",
   $addr2="10.10.1.22", $port2=$port, $user2=$user, $password2=$password,
#common
   $initMethod="SyncFromFirst",
   $size=1200,
   $sectorSize=512,
   $failover=0,
#primary node
   $imagePath="My computer\D",
   $imageName="masterImg21",
   $createImage=$true,
   $storageName="",
   $targetAlias="targetha21",
   $autoSynch=$true,
   $poolName="pool1",
   $syncSessionCount=1,
   $aluaOptimized=$true,
   $cacheMode="wb",
   $cacheSize=128,
   $syncInterface="#p2=10.10.10.22:3260" -f $addr2,
   $hbInterface="#p2=10.10.20.22:3260,10.10.1.202:3260" -f $addr2,
   $createTarget=$true,
#secondary node
   $imagePath2="My computer\D",
   $imageName2="partnerImg22",
   $createImage2=$true,
   $storageName2="",
   $targetAlias2="partnerha22",
   $autoSynch2=$true,
   $poolName2="pool1",
   $syncSessionCount2=1,
   $aluaOptimized2=$true,
   $cacheMode2=$cacheMode,
   $cacheSize2=$cacheSize,
   $syncInterface2="#p1=10.10.10.21:3260" -f $addr,
   $hbInterface2="#p1=10.10.20.21:3260,10.10.1.201:3260" -f $addr,
   $createTarget2=$true
   )

Import-Module StarWindX

try
{
	Enable-SWXLog

	$server = New-SWServer -host $addr -port $port -user $user -password $password

	$server.Connect()

	$firstNode = new-Object Node

	$firstNode.HostName = $addr
	$firstNode.HostPort = $port
	$firstNode.Login = $user
	$firstNode.Password = $password
	$firstNode.ImagePath = $imagePath
	$firstNode.ImageName = $imageName
	$firstNode.Size = $size
	$firstNode.CreateImage = $createImage
	$firstNode.StorageName = $storageName
	$firstNode.TargetAlias = $targetAlias
	$firstNode.AutoSynch = $autoSynch
	$firstNode.SyncInterface = $syncInterface
	$firstNode.HBInterface = $hbInterface
	$firstNode.PoolName = $poolName
	$firstNode.SyncSessionCount = $syncSessionCount
	$firstNode.ALUAOptimized = $aluaOptimized
	$firstNode.CacheMode = $cacheMode
	$firstNode.CacheSize = $cacheSize
	$firstNode.FailoverStrategy = $failover
	$firstNode.CreateTarget = $createTarget
    
	#
	# device sector size. Possible values: 512 or 4096(May be incompatible with some clients!) bytes. 
	#
	$firstNode.SectorSize = $sectorSize
    
	$secondNode = new-Object Node

	$secondNode.HostName = $addr2
	$secondNode.HostPort = $port2
	$secondNode.Login = $user2
	$secondNode.Password = $password2
	$secondNode.ImagePath = $imagePath2
	$secondNode.ImageName = $imageName2
	$secondNode.CreateImage = $createImage2
	$secondNode.StorageName = $storageName2
	$secondNode.TargetAlias = $targetAlias2
	$secondNode.AutoSynch = $autoSynch2
	$secondNode.SyncInterface = $syncInterface2
	$secondNode.HBInterface = $hbInterface2
	$secondNode.SyncSessionCount = $syncSessionCount2
	$secondNode.ALUAOptimized = $aluaOptimized2
	$secondNode.CacheMode = $cacheMode2
	$secondNode.CacheSize = $cacheSize2
	$secondNode.FailoverStrategy = $failover
	$secondNode.CreateTarget = $createTarget2
        
	$device = Add-HADevice -server $server -firstNode $firstNode -secondNode $secondNode -initMethod $initMethod
    
	while ($device.SyncStatus -ne [SwHaSyncStatus]::SW_HA_SYNC_STATUS_SYNC)
	{
		$syncPercent = $device.GetPropertyValue("ha_synch_percent")
	        Write-Host "Synchronizing: $($syncPercent)%" -foreground yellow

		Start-Sleep -m 2000

		$device.Refresh()
	}
}
catch
{
	Write-Host $_ -foreground red 
}
finally
{
	$server.Disconnect()
}
I have stopped the Starwind service, formatted the drives to try anew as mentioned in another thread.
I have also tried following the steps in this https://forums.starwindsoftware.com/vie ... p+3#p31505 thread.

Any assistance would be much appreciated.
Thanks!
yaroslav (staff)
Staff
Posts: 2361
Joined: Mon Nov 18, 2019 11:11 am

Thu Dec 07, 2023 10:04 pm

Welcome to StarWind Forum!
Can you please check if there are any masterImg21 and targetha21 on node1's StarWind.cfg and targetha22 and masterImg22 on node2's in StarWind.cfg file? Thanks!
Post Reply