I have 2 servers hosting a 25TB image using starwind vsan free. I followed a guide on creating a small ha device using Create-HA_2.ps1 and extended it using ExtendDevice.ps1 scripts and I was successful. Now, I need to decom the old server and replace it with the new one without disconnecting to the image so that it still continue to run. (running a vcenter on the 25TB image) How to properly do it? I tried using Add-HAPartner.ps1 script to add the new server and sync it from the second node but I am getting a "Mandatory parameters are missed" error. Can someone able to help me with this? Herer is my Add-HAPartner.ps1 script. Thanks!
Code: Select all
param($addr="10.0.0.202", $port=3261, $user="root", $password="starwind", $deviceName="HAImage2",
$addr2="10.0.0.205", $port2=$port, $user2=$user, $password2=$password,
#secondary node
$imagePath2="My computer\F\iscsi",
$imageName2="partnerImg-hatest2-2",
$createImage2=$true,
$targetAlias2="hatest2-3",
$autoSynch2=$true,
$poolName2="pool1",
$syncSessionCount2=1,
$aluaOptimized2=$true,
$syncInterface2="#p1={0}:3260" -f $addr,
$hbInterface2="#p1=10.200.1.112:3260",
$bmpType=1,
$bmpStrategy=0,
$bmpFolderPath="",
$selfSyncInterface="#p2={0}:3260" -f $addr2,
$selfHbInterface="#p2=10.200.1.114:3260"
)
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
$node.BitmapStoreType = $bmpType
$node.BitmapStrategy = $bmpStrategy
$node.BitmapFolderPath = $bmpFolderPath
Add-HAPartner $device $node $selfSyncInterface $selfHbInterface
}
catch
{
Write-Host $_ -foreground red
}
finally
{
$server.Disconnect()
}