Thu Jul 10, 2025 3:36 pm
Hi,
I've created successfully 2 Nodes HA using Node Majority + Witness Node on Windows (install StarWind VSAN Free as application, version 8.0.19551), and I can see that device HAImage1 can synchronized. I'm using below script :
param($addr="172.17.11.50", $port=3261, $user="root", $password="starwind",
$addr2="172.17.11.39", $port2=$port, $user2=$user, $password2=$password,
$addrW="172.17.11.41", $portW=$port, $userW=$user, $passwordW=$password,
#common
$initMethod="Clear",
$size=1024,
$sectorSize=4096,
$failover=1,
$bmpType=2,
$bmpStrategy=0,
#primary node
$imagePath="C:\StarWind",
$imageName="HAImage1",
$createImage=$true,
$storageName="",
$targetName="iqn.2008-08.com.starwindsoftware:md200256-targetha31",
$targetAlias="targetha31",
$poolName="pool1",
$syncSessionCount=1,
$aluaOptimized=$true,
$cacheMode="none",
$cacheSize=0,
$syncInterface="#p2=172.17.11.39:3260;#p3=172.17.11.41:3260",
$hbInterface="",
$createTarget=$true,
$bmpFolderPath="C:\StarWind\Bitmap",
#secondary node
$imagePath2=$imagePath,
$imageName2="HAImage1",
$createImage2=$true,
$storageName2="",
$targetName2="iqn.2008-08.com.starwindsoftware:p716-10-1004-partnerha32",
$targetAlias2="partnerha32",
$poolName2="pool1",
$syncSessionCount2=1,
$aluaOptimized2=$false,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$syncInterface2="#p1=172.17.11.50:3260;#p3=172.17.11.41:3260",
$hbInterface2="",
$createTarget2=$true,
$bmpFolderPath2=$bmpFolderPath,
#third node
$imagePathW=$imagePath,
$imageNameW="witness33",
$targetNameW="iqn.2008-08.com.starwindsoftware:gesdaprodsrv999-witness33",
$targetAliasW="witness33",
$syncInterfaceW="#p1=172.17.11.50:3260;#p3=172.17.11.39:3260",
$hbInterfaceW="",
$nodeTypeW=8
)
Import-Module StarWindX
try
{
Enable-SWXLog
$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.CreateTarget = $true
$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.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.CreateTarget = $true
$secondNode.SyncInterface = $syncInterface2
$secondNode.HBInterface = $hbInterface2
$secondNode.SyncSessionCount = $syncSessionCount2
$secondNode.ALUAOptimized = $aluaOptimized2
$secondNode.CacheMode = $cacheMode2
$secondNode.CacheSize = $cacheSize2
$secondNode.FailoverStrategy = $failover
$secondNode.BitmapStoreType = $bmpType
$secondNode.BitmapStrategy = $bmpStrategy
$secondNode.BitmapFolderPath = $bmpFolderPath
$thirdNode = new-Object Node
$thirdNode.HostName = $addrW
$thirdNode.HostPort = $portW
$thirdNode.Login = $userW
$thirdNode.Password = $passwordW
$thirdNode.ImagePath = $imagePathW
$thirdNode.ImageName = $imageNameW
$thirdNode.TargetAlias = $targetAliasW
$thirdNode.SyncInterface = $syncInterfaceW
$thirdNode.HBInterface = $hbInterfaceW
$thirdNode.FailoverStrategy = $failover
$thirdNode.Type = $nodeTypeW
$device = Add-HADevice -server $server -firstNode $firstNode -secondNode $secondNode -thirdNode $thirdNode -initMethod $initMethod
$syncState = $device.GetPropertyValue("ha_synch_status")
while ($syncState -ne "1")
{
#
# Refresh device info
#
$device.Refresh()
$syncState = $device.GetPropertyValue("ha_synch_status")
$syncPercent = $device.GetPropertyValue("ha_synch_percent")
Start-Sleep -m 2000
Write-Host "Synchronizing: $($syncPercent)%" -foreground yellow
}
}
catch
{
Write-Host $_ -foreground red
}
finally
{
$server.Disconnect()
}
The problem happened when I try to simulate :
on Node2 (p2) : stop StarWind VSAN service
on Node1 (p1) : restart StarWind VSAN service
on Node3 (p3/witness) : done nothing, service running
when I done that, the LUN will be gone (checked on Node1). It will mount again after I start StarWind VSAN service at Node2
I already check port connection from/to all Node, port 3260 and 3261, all are healthy
Why Node1 and Node3 can't have the quorum ?
Thanks,
Hendrik Saiyan