Invalid Channel Format [2] from Create Device

Software-based VM-centric and flash-friendly VM storage + free version

Moderators: anton (staff), art (staff), Max (staff), Anatoly (staff)

Post Reply
whbn3
Posts: 1
Joined: Tue Aug 20, 2019 6:14 pm

Tue Aug 20, 2019 6:17 pm

When I run CreateHA(two nodes).ps1 I get this error from CreateDevice.
Here is my modified script:
Import-Module StarWindX

try
{
Enable-SWXLog

$server = New-SWServer -host 10.1.3.106 -port 3261 -user root -password starwind

$server.Connect()

$firstNode = new-Object Node

$firstNode.HostName = "localhost"
$firstNode.ImagePath = "K:\"
$firstNode.ImageName = "masterImg21"
$firstNode.Size = 200
$firstNode.CreateImage = $true
$firstNode.TargetAlias = "targetha21"
$firstNode.AutoSynch = $true
$firstNode.SyncInterface = "10.1.3.18"
$firstNode.HBInterface = "10.1.3.18"
$firstNode.PoolName = "pool1"
$firstNode.SyncSessionCount = 1
$firstNode.ALUAOptimized = $true

#
# device sector size. Possible values: 512 or 4096(May be incompatible with some clients!) bytes.
#
$firstNode.SectorSize = 512

$secondNode = new-Object Node

$secondNode.HostName = "10.1.3.18"
$secondNode.HostPort = "3261"
$secondNode.Login = "root"
$secondNode.Password = "starwind"
$secondNode.ImagePath = "K:\"
$secondNode.ImageName = "partnerImg22"
$secondNode.Size = 200
$secondNode.CreateImage = $true
$secondNode.TargetAlias = "partnerha22"
$secondNode.AutoSynch = $true
$secondNode.SyncInterface = "10.1.3.106"
$secondNode.HBInterface = "10.1.3.106"
$secondNode.SyncSessionCount = 1
$secondNode.ALUAOptimized = $true

$device = Add-HADevice -server $server -firstNode $firstNode -secondNode $secondNode -initMethod "Clear"

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()
}
Can anyone help me get past this?
Oleg(staff)
Staff
Posts: 568
Joined: Fri Nov 24, 2017 7:52 am

Wed Aug 21, 2019 8:36 am

The problem can be related to the IPs you are using. You are assigning the same IP for connecting, heartbeat and synchronization.
Please check best practices.
Post Reply