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,
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..
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()
}
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