Using StarWind Virtual SAN v8.0.0 (Build 20086, [SwSAN], Win64)
Built Nov 14 2025 11:08:28 6495b8edd
Two-Node VSAN Server Cluster installed on Physical Machines - Running on Windows Server 2022 that provide a HA Windows Failover Cluster.
Use Powershell to Setup and Configure StarWind VSAN with multiple targets and HA devices on each server.
I now need to add a third Node physical machine to the Existing HA Partner Pair to create a three node Windows Failover Cluster.
Mangement IP's
Node-1: 192.168.50.11 (already in cluster)
Node-2: 192.168.50.12 (already in cluster)
Node-3: 192.168.50.10 (new node to be added)
Synchronization Channels: 2 channels per HA pair
Sync between node 1 and 2: 172.16.50.1 and 172.16.50.2 , 172.16.60.1 and 172.16.60.2 (already in place and working)
Sync between node 2 and 3: 172.16.51.2 and 172.16.51.3, 172.16.61.2 and 172.16.61.3
Sync between node 1 and 3: 172.16.52.1 and 172.16.52.3, 172.16.62.1 and 172.16.62.3
HeartBeat Channels:
HB between node 1 and 2: 172.16.70.1 and 172.16.70.2 (already in place and working)
HB between node 2 and 3: 172.16.71.2 and 172.16.71.3
HB between node 1 and 3: 172.16.72.1 and 172.16.72.3
I have been trying to use the Add-HAPartner Script from the Examples folder to add the third node using the following Script modified with correct IP addresses, target name, and image name for the third node to synchronize with one of the existing HA devices that happens to be my witness target device:
Code: Select all
param($addr="192.168.50.11", $port=3261, $user="root", $password="starwind", $deviceName="HAImage1",
$addr2="192.168.50.10", $port2=$port, $user2=$user, $password2=$password,
#secondary node
$imagePath2="My computer\D\iSCSI_HDD\AEC_Witness1",
$imageName2="ptnr-wit-3",
[bool][ValidateSet($false, $true)]
$createImage2=$true,
$targetAlias2="aecwitness13",
[bool][ValidateSet($false, $true)]
$autoSynch2=$true,
$poolName2="pool1",
$syncSessionCount2=1,
[bool][ValidateSet($false, $true)]
$aluaOptimized2=$false,
$syncInterface2="#p1=172.16.52.1:3260;#p2=172.16.51.2" -f $addr,
$hbInterface2="#p1=172.16.72.1:3260;#p2=172.16.71.2" -f $addr,
$bmpType=1,
$bmpStrategy=0,
$bmpFolderPath="" ,
$selfSyncInterface="#p1=172.16.52.3:3260;#p2=172.16.51.3" -f $addr2,
$selfHbInterface="#p1=172.16.72.3:3260;#p2=172.16.71.3" -f $addr2
)
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 $selfBmpFolderPath
}
catch
{
Write-Host $_ -foreground red
}
finally
{
$server.Disconnect()
}
One or more interfaces are not belong to primary node!
I have tried changing the $SyncInterface2 and $hbInterface2 only to remove the P2 ip addresses which leave only the ip addresses for the Primary Node as follows:
$syncInterface2="#p1=172.16.52.1:3260" -f $addr,
$hbInterface2="#p1=172.16.72.1:3260",
I leave the $selfSyncInterface and $selfHbInterface with both P1 and P2 values unchanged.
However when I run the script that way, I receive the following error:
Mandatory parameters are missed
There is no indication of what parameters are missing but something is not correct, however, a second partner target is created on both the first and second server nodes showing the second target as the third server node using the correct sync and heartbeat addresses to connect to the third server node, however, the target is not created on the third server node and the image device is not created on the third server node either. The Log file reports that the Target is not found on the third server node because it has not been created by the script. The log continues to fail to connect to the target specified until I use the Remove-HAPartner to remove the partners created incorrectly.
Can anyone describe specifically how to use the P1 and P2 interfaces in the script with the correct syntax so that the Add-HAPartner script runs correctly and adds a third node to the existing two-node HA Partnership and creates the target and HA device on the third node ready for synchronization? There is very little information on how to add the third node using the Powershell script. Is the image, device, and target on the third node supposed to be manually created before using the Add-HAPartner script to create a three-node cluster? Any information that anyone can provide to lead me in the right direction would be greatly appreciated.