I tried using the createHA_3.ps1 script and got an error about "200-partner info invalid
here is the error From powershell:
Code: Select all
Request to 172.16.99.31 ( 172.16.99.31 ) : 3261
-
control HAImage -CreateHeader:"" -DeviceHeaderPath:"VSA Storage\mnt\zd0\csv1\masterImg31_HA.swdsk" -Type:"ImageFile_HA" -file
:"imagefile1" -size:"256000" -Priority:"#p0=0;#p1=1;#p2=2" -nodeType:"#p0=1;#p1=1;#p2=1" -PartnerTargetName:"#p1=iqn.2008-08.
com.starwindsoftware:172.16.99.32-partnerha32;#p2=iqn.2008-08.com.starwindsoftware:starwindvsa-83289036.jh-test.adds-partnerh
a33" -PartnerIP:"#p1=172.16.21.5:sync:3260:1, 172.16.99.32:heartbeat:3260:1,172.16.12.5:heartbeat:3260:1;#p2=172.16.31.6:sync
:3260:1, 172.16.99.33:heartbeat:3260:1,172.16.13.6:heartbeat:3260:1" -IsAutoSynchEnabled:"1" -AuthChapLogin:"#p1=0b;#p2=0b" -
AuthChapPassword:"#p1=0b;#p2=0b" -AuthMChapName:"#p1=0b;#p2=0b" -AuthMChapSecret:"#p1=0b;#p2=0b" -AuthChapType:"#p1=none;#p2=
none" -Offset:"0" -CacheMode:"wb" -CacheSizeMB:"128" -serial:"22EFA500CF96F7C8" -eui64:"22EFA500CF96F7C8" -revision:"0001" -p
roduct:"STARWIND" -vendor:"STARWIND" -Replicator:"#p0=0" -WitnessType:"0" -AluaAccessState:"#p0=0;#p1=1;#p2=1"
-
200 Failed: invalid partner info..
Here is the script I used:
Code: Select all
param($addr="172.16.99.31", $port=3261, $user="root", $password="starwind",
$addr2="172.16.99.32", $port2=$port, $user2=$user, $password2=$password,
$addr3="172.16.99.33", $port3=$port, $user3=$user, $password3=$password,
#common
$initMethod="Clear",
$size=256000,
$sectorSize=4096,
$failover=0,
$bmpType=0,
$bmpStrategy=0,
#primary node
$imagePath="VSA Storage\mnt\zd0\csv1",
$imageName="masterImg31",
$createImage=$true,
$targetAlias="targetha31",
$autoSynch=$true,
$poolName="pool1",
$syncSessionCount=1,
$aluaOptimized=$true,
$cacheMode="wb",
$cacheSize=128,
$syncInterface=$("#p2=172.16.21.5:3260;#p3=172.16.31.6:3260" -f $addr2,$addr3),
$hbInterface="#p2=172.16.12.5:3260, 172.16.99.32:3260;#p3=172.16.13.6:3260, 172.16.99.33:3260",
$bmpFolderPath="",
#secondary node
$imagePath2="VSA Storage\mnt\zd0\csv1",
$imageName2="partnerImg32",
$createImage2=$true,
$targetAlias2="partnerha32",
$autoSynch2=$true,
$poolName2="pool1",
$syncSessionCount2=1,
$aluaOptimized2=$false,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$syncInterface2=$("#p1=172.16.21.4:3260;#p3=172.16.32.6:3260" -f $addr,$addr3),
$hbInterface2="#p1=172.16.12.4:3260, 172.16.99.31;#p3=172.16.23.6:3260, 172.16.99.33:3260",
$bmpFolderPath2="",
#third node
$imagePath3="VSA Storage\mnt\zd0\csv1",
$imageName3="partnerImg33",
$createImage3=$true,
$targetAlias3="partnerha33",
$autoSynch3=$true,
$poolName3="pool1",
$syncSessionCount3=1,
$aluaOptimized3=$false,
$cacheMode3=$cacheMode,
$cacheSize3=$cacheSize,
$syncInterface3=$("#p1=172.16.31.4:3260;#p2=172.16.32.5:3260" -f $addr,$addr2),
$hbInterface3="#p1=172.16.13.4:3260, 172.16.99.4:3260;#p2=172.16.23.5:3260, 172.16.99.5:3260",
$bmpFolderPath3=""
)
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.ImagePath = $imagePath
$firstNode.ImageName = $imageName
$firstNode.Size = $size
$firstNode.CreateImage = $createImage
$firstNode.TargetAlias = $targetAlias
$firstNode.AutoSynch = $autoSynch
$firstNode.SyncInterface = $syncInterface
$firstNode.HBInterface = $hbInterface
$firstNode.PoolName = $poolName
$firstNode.SyncSessionCount = $syncSessionCount
$firstNode.ALUAOptimized = $aluaOptimized
$firstNode.SectorSize = $sectorSize
$firstNode.CacheMode = $cacheMode
$firstNode.CacheSize = $cacheSize
$firstNode.FailoverStrategy = $failover
#$firstNode.BitmapStoreType = $bmpType
#$firstNode.BitmapStrategy = $bmpStrategy
#$firstNode.BitmapFolderPath = $bmpFolderPath
$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.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.BitmapFolderPath = $bmpFolderPath2
$thirdNode = new-Object Node
$thirdNode.HostName = $addr3
$thirdNode.HostPort = $port3
$thirdNode.Login = $user3
$thirdNode.Password = $password3
$thirdNode.ImagePath = $imagePath3
$thirdNode.ImageName = $imageName3
$thirdNode.CreateImage = $createImage3
$thirdNode.TargetAlias = $targetAlias3
$thirdNode.AutoSynch = $autoSynch3
$thirdNode.SyncInterface = $syncInterface3
$thirdNode.HBInterface = $hbInterface3
$thirdNode.SyncSessionCount = $syncSessionCount3
$thirdNode.ALUAOptimized = $aluaOptimized3
$thirdNode.CacheMode = $cacheMode3
$thirdNode.CacheSize = $cacheSize3
$thirdNode.FailoverStrategy = $failover
#$thirdNode.BitmapFolderPath = $bmpFolderPath3
$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()
}