Can't Establish Connection to Partner

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

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

Post Reply
pmclean
Posts: 3
Joined: Sun Nov 19, 2023 11:02 pm

Sun Nov 19, 2023 11:05 pm

VSAN Free

I've got 2 direct connected SFP+ servers, can confirm they can ping each other.

Trying to run the CreateHA_2.ps1 with my modified files. I can see the targets and images being created on the webUI, but then I get this error. Not sure where to go from here?

Error I get is:

control 0x0000000005DB0F00 -InitSynchronize:"" -SynchronizationType:"3"
-
200 Failed: can't establish connection with the partner(s)..

On a side note, can anyone tell me how to delete my existing images/targets? I have to change the target and image name every time I run the script because otherwise I get a different error saying the target or image already exists.
yaroslav (staff)
Staff
Posts: 2361
Joined: Mon Nov 18, 2019 11:11 am

Mon Nov 20, 2023 4:13 am

Hi,

Can you please share the script?
Make sure to use the IPs of the partner as shown here https://forums.starwindsoftware.com/vie ... p+3#p31505
Also, there is a script to remove HA partner, or, you can stop the service and remove them from the underlying storage and StarWind.cfg.
pmclean
Posts: 3
Joined: Sun Nov 19, 2023 11:02 pm

Mon Nov 20, 2023 3:10 pm

BTW These are linux CVM on Hyper-V

Code: Select all

param($addr="10.20.0.24", $port=3261, $user="root", $password="starwind",
	$addr2="10.20.0.27", $port2=$port, $user2=$user, $password2=$password,
#common
	$initMethod="Clear",
	$size=2048,
	$sectorSize=512,
	$failover=0,
	$bmpType=1,
	$bmpStrategy=0,
#primary node
	$imagePath="VSA Storage\mnt\sw1d1",
	$imageName="img1",
	$createImage=$true,
	$storageName="",
	$targetAlias="target1",
	$autoSynch=$true,
	$poolName="pool1",
	$syncSessionCount=1,
	$aluaOptimized=$true,
	$cacheMode="none",
	$cacheSize=0,
	$syncInterface="#p2=172.16.10.2:3260",
	$hbInterface="#p2=172.16.20.2:3260",
	$createTarget=$true,
	$bmpFolderPath="", 
#secondary node
	$imagePath2="VSA Storage\mnt\sw2d1",
	$imageName2="img2",
	$createImage2=$true,
	$storageName2="",
	$targetAlias2="target2",
	$autoSynch2=$true,
	$poolName2="pool1",
	$syncSessionCount2=1,
	$aluaOptimized2=$false,
	$cacheMode2=$cacheMode,
	$cacheSize2=$cacheSize,
	$syncInterface2="#p1=172.16.10.1:3260",
	$hbInterface2="#p1=172.16.20.1:3260",
	$createTarget2=$true,
	$bmpFolderPath2=""
	)
	
Import-Module StarWindX
 
try
{
	Enable-SWXLog -level SW_LOG_LEVEL_DEBUG
 
	$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
	$firstNode.BitmapStoreType = $bmpType
	$firstNode.BitmapStrategy = $bmpStrategy
	$firstNode.BitmapFolderPath = $bmpFolderPath
    
	#
	# 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
	$secondNode.BitmapFolderPath = $bmpFolderPath2
        
	$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()
}
yaroslav (staff)
Staff
Posts: 2361
Joined: Mon Nov 18, 2019 11:11 am

Mon Nov 20, 2023 3:43 pm

Comment all data about bitmap and bitmap file location.
See more on the script here https://www.starwindsoftware.com/resour ... r-vsphere/. You can also refer to the script I shared above to make sure that the physical network redundancy requirements are met (it should work for CVM too).
pmclean
Posts: 3
Joined: Sun Nov 19, 2023 11:02 pm

Mon Nov 20, 2023 6:03 pm

Now I get an entirely different error:

Request to 10.20.0.24 ( 10.20.0.24 ) : 3261
-
control HAImage -CreateHeader:"" -DeviceHeaderPath:"VSA Storage\mnt\sw1d1\master11_HA.swdsk" -Type:"ImageFile_HA" -file:"imagefile9" -size:"2048" -Priority:"#p0=0;#p1=1" -nodeType:"#p0=1;#p1=1" -PartnerTargetName:"#p1=iqn.2008-08.com.starwindsoftware:10.20.0
.30-targetpartner11" -PartnerIP:"#p1=172.16.10.2:sync:3260:1,172.16.20.2:heartbeat:3260:1" -IsAutoSynchEnabled:"1" -AuthChapLogin:"#p1=0b" -AuthChapPassword:"#p1=0b" -AuthMChapName:"#p1=0b" -AuthMChapSecret:"#p1=0b" -AuthChapType:"#p1=none" -Offset:"0" -Cach
eMode:"none" -CacheSizeMB:"0" -serial:"01C2B931C9DB7B3B" -eui64:"01C2B931C9DB7B3B" -revision:"0001" -product:"STARWIND" -vendor:"STARWIND" -Replicator:"#p0=0" -WitnessType:"0" -AluaAccessState:"#p0=0;#p1=1"
-
200 Failed: invalid partner info..

I know it says 10.20.0.30, my first script was inaccurate and the IP changed from 27 to 30.

Looks like it may be related to DNS resolution? When I add the servers to StarWind Management Console it just shows the IP twice: 10.20.0.24 (10.20.0.24) for example.

Do I need to set up a local DNS server to resolve the host name on this IP before I can proceed?
yaroslav (staff)
Staff
Posts: 2361
Joined: Mon Nov 18, 2019 11:11 am

Fri Nov 24, 2023 10:38 am

Looks like it may be related to DNS resolution?
you are referring to the servers by the IP addresses. This means that DNS is not involved here. Please make sure that your script refers to the partner IP addressses for sync and heartbeat.
Comment out bmp areas (stands for bitmap), or provide valid paths, and use $initMethod="syncfromfirst" instead of clear.
Post Reply