I attempting to deploy a two-node shared storage setup, and am running up against a wall with the PowerShell script, "CreateHA_2.ps1"
Getting some details out of the way:
- StarWind Virtual SAN (VSAN) v8.0.0 (Build 15469), Free license
StarWindX.dll properties:
- Version: 1.0.0.664
- Timestamp: 2024-02-07
- Size: 5,965,928 bytes
Network info:
Node1:
Management: 172.17.6.31
Data: 172.21.200.101
Replication: 172.21.220.1
Node2:
Management: 172.17.6.32
Data: 172.21.200.102
Replication: 172.21.220.2
Full output:
Code: Select all
Request to 172.17.6.31 ( 172.17.6.31 ) : 3261
-
control HAImage -CreateHeader:"Headers\masterImg21\masterImg21_HA.swdsk" -pathDirHeaderBackup:"mnt/sdb1/shared" -file
:"imagefile13" -size:"1024" -Priority:"#p0=0;#p1=1" -nodeType:"#p0=1;#p1=1" -PartnerTargetName:"#p1=iqn.2008-08.com.s
tarwindsoftware:172.17.6.32-partnerha22" -PartnerIP:"#p1=172.21.220.2:sync:3260:1,172.17.6.32:heartbeat:3260:1,172.21
.200.102:heartbeat:3260:1" -IsAutoSynchEnabled:"0" -AuthChapLogin:"#p1=0b" -AuthChapPassword:"#p1=0b" -AuthMChapName:
"#p1=0b" -AuthMChapSecret:"#p1=0b" -AuthChapType:"#p1=none" -Offset:"0" -CacheMode:"wb" -CacheSizeMB:"128" -Replicato
r:"#p0=0" -WitnessType:"0" -AluaAccessState:"#p0=0;#p1=0"
-
200 Failed: invalid partner info..
Code: Select all
param($addr="172.17.6.31", $port=3261, $user="root", $password="starwind",
$addr2="172.17.6.32", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="SyncFromFirst", # Clear
$size=1024,
$sectorSize=512,
$failover=0,
$bmpType=1,
$bmpStrategy=0,
#primary node
$imagePath="mnt/sdb1/shared",
$imageName="masterImg21",
$createImage=$true,
$storageName="",
$targetAlias="targetha21",
$poolName="", # pool1
$syncSessionCount=1,
$aluaOptimized=$true,
$cacheMode="wb",
$cacheSize=128,
$syncInterface="#p2=172.21.220.2:3260", # -f $addr2,
$hbInterface="#p2=172.21.200.102:3260,172.17.6.32:3260", # -f $addr2,
$createTarget=$true,
$bmpFolderPath="",
#secondary node
$imagePath2="/mnt/sdb1/shared",
$imageName2="partnerImg22",
$createImage2=$true,
$storageName2="",
$targetAlias2="partnerha22",
$poolName2="",
$syncSessionCount2=1,
$aluaOptimized2=$true,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$syncInterface2="#p1=172.21.220.1:3260", # -f $addr,
$hbInterface2="#p1=172.21.200.101:3260,172.17.6.31:3260", # -f $addr,
$createTarget2=$true,
$bmpFolderPath2=""
)
Import-Module StarWindX
try
{
Enable-SWXLog -level SW_LOG_LEVEL_DEBUG
$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.SyncInterface = $syncInterface
$firstNode.HBInterface = $hbInterface
$firstNode.PoolName = $poolName
$firstNode.SyncSessionCount = $syncSessionCount
$firstNode.ALUAOptimized = $aluaOptimized
$firstNode.CacheMode = $cacheMode
$firstNode.CacheSize = $cacheSize
$firstNode.FailoverStrategy = $failover
$firstNode.CreateTarget = $createTarget
#$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.SyncInterface = $syncInterface2
$secondNode.HBInterface = $hbInterface2
$secondNode.SyncSessionCount = $syncSessionCount2
$secondNode.ALUAOptimized = $aluaOptimized2
$secondNode.CacheMode = $cacheMode2
$secondNode.CacheSize = $cacheSize2
$secondNode.FailoverStrategy = $failover
$secondNode.CreateTarget = $createTarget2
#$secondNode.BitmapFolderPath = $bmpFolderPath2
$device = Add-HADevice -server $server -firstNode $firstNode -secondNode $secondNode -initMethod $initMethod
while ($device.SyncStatus -ne [SwHaSyncStatus]::SW_HA_SYNC_STATUS_SYNC)
{
$syncPercent = $device.GetPropertyValue("ha_synch_percent")
Write-Host "Synchronizing: $($syncPercent)%" -foreground yellow
Start-Sleep -m 2000
$device.Refresh()
}
}
catch
{
Write-Host $_ -foreground red
}
finally
{
$server.Disconnect()
}
I've scoured the forums, and tried every suggestion I could find. Am I doing something wrong? Or is there a known issue with the version I am using?
Thanks!
Cheers,
Seamus