i am migrating from HPE vsa to starwind free, and have setup 3 device's (volumes) :
- whitness
- vol1
- vol2
all device's are setup with the same script (i changed the volume names offcourse) but only the whitness (first created) is syncing, the others (vol1 and vol2) are NOT syncing and i can't get them to sync.
if i run the SyncHaDevice.ps1 i get following error:
Code: Select all
Synchronize device HAImage3
Exception calling "Synchronize" with "2" argument(s): "Failed to perform synchronization (1) from
-
control 0x0000009CB9036480 -Synchronize: -SynchronizationType:"1"
-
200 Failed: can't find available or valid partner for synchronization.. "
Code: Select all
Device HAImage1 is synchronized
can anyone help?
the script i have created the volume's with:
Code: Select all
param($addr="localhost", $port=3261, $user="root", $password="starwind",
$addr2="plahv02", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="Clear",
$size=150000,
$sectorSize=4096,
$failover=1,
#primary node
$imagePath="My computer\F\starwind",
$imageName="VOL02",
$createImage=$true,
$storageName="",
$targetAlias="VOL02",
$autoSynch=$true,
$poolName="pool2",
$syncSessionCount=1,
$aluaOptimized=$true,
$cacheMode="wb",
$cacheSize=128,
$syncInterface="#p2=10.0.100.20:3260",
$hbInterface="#p2=192.168.0.154:3260",
$createTarget=$true,
#secondary node
$imagePath2="My computer\F\starwind",
$imageName2="VOL02",
$createImage2=$true,
$storageName2="",
$targetAlias2="VOL02",
$autoSynch2=$true,
$poolName2="pool2",
$syncSessionCount2=1,
$aluaOptimized2=$false,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$syncInterface2="#p1=10.0.100.10:3260",
$hbInterface2="#p1=192.168.0.160:3260",
$createTarget2=$true
)
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.AutoSynch = $autoSynch
$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
#
# 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.AutoSynch = $autoSynch2
$secondNode.SyncInterface = $syncInterface2
$secondNode.HBInterface = $hbInterface2
$secondNode.SyncSessionCount = $syncSessionCount2
$secondNode.ALUAOptimized = $aluaOptimized2
$secondNode.CacheMode = $cacheMode2
$secondNode.CacheSize = $cacheSize2
$secondNode.FailoverStrategy = $failover
$secondNode.CreateTarget = $createTarget2
$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()
}