error AddHaPartner

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

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

Post Reply
yebar16037
Posts: 1
Joined: Fri Jul 14, 2023 9:09 am

Mon Jul 17, 2023 12:17 pm

I'm upgrading the server pair. Both OLD servers are up 100% functional. 800GB on 6 HAImages. It's setup as a the Windows Server 2016 2 node Cluster called Host60 and Host61. I'm taking OLD-Host61 down so I need to RemoveHAPartner on the HA disks then be able to AddHAPartner to bring back the redundancy on the NEW-Host61 then do the same on Host60.

The steps:
1. Create NEW Host61
2. Run RemoveHAPartner on OLD-Host60 that points to the HAImages on OLD-Host61
3. Run AddHAPartner on OLD-Host60 that creates the HAImages on the NEW-Host61 then wait for sync - THIS IS WHERE I'm HAVING AN ISSUE
4. Once that's complete start on OLD-Host60 by creating NEW-Host60
5. Run RemoveHAPartner on NEW-Host61 that points to OLD-HOST60
6. Run AddHAPartner on NEW-Host61 to create the HAs on the NEW-Host60 then wait for sync
7. DONE!

So I created a test HATest2 disk using
CreateHA_2 -imageName "HATest2"

Here is the CreateHA_2 code

Code: Select all

param($addr="172.18.8.60", $port=3261, $user="root", $password="starwind",
   $addr2="172.18.8.61", $port2=$port, $user2=$user, $password2=$password,
#common
#must include
#ImageName
   $initMethod="Clear",
   $size=12,
   $sectorSize=512,
   $failover=0,
#primary node
   $imagePath="D:\VSAN",
   $imageName="",
   $createImage=$true,
Then I did a
RemoveHAPartner.ps1 -deviceName "HAImage9" -partnerTargetName "iqn.2008-08.com.starwindsoftware:host61-hatest2-partner" https://kodi.software/ https://dltutuapp.com/tutuapp-download/

When I try to AddHAPartner to test adding the HAImage9 back:

Code: Select all

Request to  HOST60.VOICE.INT ( 172.18.8.60 ) : 3261
-
control 0x0000020619BAD380 -AddPartner:"" -PartnerTargetName:"#p1=iqn.2008-08.com.starwindsoftware:host61-hatest2-partner" -Priority:"#p1=1" -nodeType:"#p1=1" -PartnerIP:"#p1=172.18.8.61:sync:3260:1" -AuthChapType:"#p1=none" -AuthChapLogin:"#p1=0b" -AuthChapPassword:"#p1=0b" -AuthMChapName:"#p1=0b" -AuthMChapSecret:"#p1=0b" -Replicator:"#p1=0"
-
200 Failed: invalid partner info..
Here is the AddHAPartner code

Code: Select all

param($addr="172.18.8.60", $port=3261, $user="root", $password="starwind",
   $addr2="172.18.8.61", $port2=$port, $user2=$user, $password2=$password,
#secondary node
#MUST INCLUDE
#   deviceName
#   imageName2
#imagename2 PartTest - should be the same as the original Image.
#deviceName imagefile3 - is originally determined by StarWind
   $deviceName="HAImage9",
   $imagePath2="D:\VSAN",
   $imageName2="HATest2",
   $createImage2=$true,
   $targetAlias2="{0}-partner" -f $imageName2,
   $autoSynch2=$true,
   $poolName2="pool1",
   $syncSessionCount2=1,
   $aluaOptimized2=$true,
   $syncInterface2="#p1={0}:3260" -f $addr,
   $hbInterface2="#p1=172.18.9.60:3260",
   $selfSyncInterface="#p2={0}:3260" -f $addr2,
   $selfHbInterface=""
   )
   
Import-Module StarWindX

try
{
   Enable-SWXLog -level SW_LOG_LEVEL_DEBUG

   $server = New-SWServer $addr $port $user $password
   $server.Connect()

   $device = Get-Device $server -name $deviceName
   if( !$device )
   {
      Write-Host "Device not found" -foreground red
      return
   }

   $node = new-Object Node
   $node.HostName = $addr2
   $node.HostPort = $port2
   $node.Login = $user2
   $node.Password = $password2
   $node.ImagePath = $imagePath2
   $node.ImageName = $imageName2
   $node.CreateImage = $createImage2
   $node.TargetAlias = $targetAlias2
   $node.SyncInterface = $syncInterface2
   $node.HBInterface = $hbInterface2
   $node.AutoSynch = $autoSynch2
   $node.SyncSessionCount = $syncSessionCount2
   $node.ALUAOptimized = $aluaOptimized2
   $node.PoolName = $poolName2

   Add-HAPartner $device $node $selfSyncInterface $selfHbInterface
}
catch
{
   Write-Host $_ -foreground red
}
finally
{
   $server.Disconnect()
}
Here is enumDevicesTargets on OLD-Host60 (I removed the 6 working disks from this for brevity)

Code: Select all

Name        : iqn.2008-08.com.starwindsoftware:host60.voice.int-hatest2-target
Id          : 0x000002063B9CDBC0
Alias       : HATest2-target
IsClustered : True
Devices     : System.__ComObject
Permissions : System.__ComObject
type        :

Name                    : HAImage9
DeviceType              : HA Image
DeviceId                : 0x0000020619BAD380
File                    : D:\VSAN\HATest2_HA.swdsk
TargetName              : iqn.2008-08.com.starwindsoftware:host60.voice.int-hatest2-target
TargetId                : 0x000002063B9CDBC0
Size                    : 12582912
CacheMode               : wb
CacheSize               : 128
CacheBlockExpiryPeriod  : 5000
Exists                  : True
DeviceLUN               : 0
IsSnapshotsSupported    : False
Snapshots               :
SectorSize              : 512
State                   : 0
Partners                : System.__ComObject
SynchronizationChannels :
HeartbeatChannels       :
SyncStatus              : 1
SyncPercent             : 100
IsWaitingAutosync       : False
SyncTrafficShare        : 50
NodeType                : 1
FailoverStrategy        : 0
MaintenanceMode         : 0
THANKS!
Last edited by yebar16037 on Tue Jul 18, 2023 11:23 am, edited 1 time in total.
yaroslav (staff)
Staff
Posts: 2361
Joined: Mon Nov 18, 2019 11:11 am

Mon Jul 17, 2023 1:46 pm

$initMethod="Clear" try setting it to "SyncFromFirst"
Please see this thread for more details https://forums.starwindsoftware.com/vie ... 3&start=15
Also, please make sure that your system is configured according to best practices. https://www.starwindsoftware.com/best-p ... practices/ and https://www.starwindsoftware.com/system-requirements
Post Reply