Synchronization cannot be started because the nodes are not ready

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

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

Post Reply
chrisguk
Posts: 14
Joined: Sat Apr 22, 2017 8:26 am

Tue Jul 04, 2017 7:53 pm

I am trying to use the powershell method to create a 2 node HA. It creates the Targets and image files no problem but fails with this error message at the end:

Exception Error:
200 Synchronization cannot be started because the nodes are not ready! Try to syn
chronize the nodes manually.
Pending.


When I try this with exactly the same settings as below it works as desired. Here is my Powershell script:

Code: Select all

#Import-Module StarWindX

try
{
    $server = New-SWServer -host 127.0.0.1 -port 3261 -user root -password starwind

    $server.Connect()

    $firstNode = new-Object Node

    $firstNode.ImagePath = "My computer\E"
    $firstNode.ImageName = "CSV1"
    $firstNode.Size = 105
    $firstNode.CreateImage = $true
    $firstNode.TargetAlias = "csv1"
    $firstNode.AutoSynch = $true
    $firstNode.SyncInterface = "#p2=10.10.3.82:3260"
    $firstNode.SyncInterface = "#p2=10.10.4.82:3260"
    $firstNode.HBInterface = "#p2=10.10.1.82:3260"
    $firstNode.HBInterface = "#p2=10.10.2.82:3260"
    $firstNode.CacheSize = 64
    $firstNode.CacheMode = "wb"
    $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
	
	#
	# 'SerialID' should be between 16 and 31 symbols. If it not specified StarWind Service will generate it. 
	# Note: Second node always has the same serial ID. You do not need to specify it for second node
	#
	$firstNode.SerialID = "" 
    
    $secondNode = new-Object Node

    $secondNode.HostName = "winstor2"
    $secondNode.HostPort = "3261"
    $secondNode.Login = "root"
    $secondNode.Password = "starwind"
    $secondNode.ImagePath = "My computer\E"
    $secondNode.ImageName = "CSV1"
    $secondNode.Size = 105
    $secondNode.CreateImage = $true
    $secondNode.TargetAlias = "csv1"
    $secondNode.AutoSynch = $true
    $secondNode.SyncInterface = "#p1=10.10.3.83:3260"
    $secondNode.SyncInterface = "#p1=10.10.4.83:3260"
    $secondNode.HBInterface = "#p1=10.10.1.83:3260"
    $secondNode.HBInterface = "#p1=10.10.2.83:3260"
    $secondNode.ALUAOptimized = $true
        
    $device = Add-HADevice -server $server -firstNode $firstNode -secondNode $secondNode -initMethod "Clear"
    Start-Sleep -m 1000
    $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 3000

        Write-Host "Synchronizing: $($syncPercent)%" -foreground yellow
    }
}
catch
{
    Write-Host "Exception $($_.Exception.Message)" -foreground red 
}

$server.Disconnect()
Can anyone help?
Ivan (staff)
Staff
Posts: 172
Joined: Thu Mar 09, 2017 6:30 pm

Wed Jul 05, 2017 5:14 pm

Hello chrisguk,
Thanks for your interest in StarWind solution.
Could you, please, remove this images and try to run script with following changes:
$firstNode.SyncInterface = "#p2=10.10.3.82:3260"
$firstNode.SyncInterface = "#p2=10.10.4.82:3260"
$firstNode.HBInterface = "#p2=10.10.1.82:3260"
$firstNode.HBInterface = "#p2=10.10.2.82:3260"
#p2 means we need to specify the IP from SECOND node. I believe your second node has this IP's:

Code: Select all

$secondNode.SyncInterface = "#p1=10.10.3.83:3260"
    $secondNode.SyncInterface = "#p1=10.10.4.83:3260"
    $secondNode.HBInterface = "#p1=10.10.1.83:3260"
    $secondNode.HBInterface = "#p1=10.10.2.83:3260"
The same with #p1 in our script. We need to specify the IP's from FIRST node.
Please try to run script which I have edited below:

Code: Select all

#Import-Module StarWindX

try
{
    $server = New-SWServer -host 127.0.0.1 -port 3261 -user root -password starwind

    $server.Connect()

    $firstNode = new-Object Node

    $firstNode.ImagePath = "My computer\E"
    $firstNode.ImageName = "CSV1"
    $firstNode.Size = 105
    $firstNode.CreateImage = $true
    $firstNode.TargetAlias = "csv1"
    $firstNode.AutoSynch = $true
    $firstNode.SyncInterface = "#p2=10.10.3.83:3260"
    $firstNode.SyncInterface = "#p2=10.10.4.83:3260"
    $firstNode.HBInterface = "#p2=10.10.1.83:3260"
    $firstNode.HBInterface = "#p2=10.10.2.83:3260"
    $firstNode.CacheSize = 64
    $firstNode.CacheMode = "wb"
    $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
   
   #
   # 'SerialID' should be between 16 and 31 symbols. If it not specified StarWind Service will generate it. 
   # Note: Second node always has the same serial ID. You do not need to specify it for second node
   #
   $firstNode.SerialID = "" 
    
    $secondNode = new-Object Node

    $secondNode.HostName = "winstor2"
    $secondNode.HostPort = "3261"
    $secondNode.Login = "root"
    $secondNode.Password = "starwind"
    $secondNode.ImagePath = "My computer\E"
    $secondNode.ImageName = "CSV1"
    $secondNode.Size = 105
    $secondNode.CreateImage = $true
    $secondNode.TargetAlias = "csv1"
    $secondNode.AutoSynch = $true
    $secondNode.SyncInterface = "#p1=10.10.3.82:3260"
    $secondNode.SyncInterface = "#p1=10.10.4.82:3260"
    $secondNode.HBInterface = "#p1=10.10.1.82:3260"
    $secondNode.HBInterface = "#p1=10.10.2.82:3260"
    $secondNode.ALUAOptimized = $true
        
    $device = Add-HADevice -server $server -firstNode $firstNode -secondNode $secondNode -initMethod "Clear"
    Start-Sleep -m 1000
    $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 3000

        Write-Host "Synchronizing: $($syncPercent)%" -foreground yellow
    }
}
catch
{
    Write-Host "Exception $($_.Exception.Message)" -foreground red 
}

$server.Disconnect()
chrisguk
Posts: 14
Joined: Sat Apr 22, 2017 8:26 am

Wed Jul 05, 2017 6:35 pm

Works perfect, many thanks
Ivan (staff)
Staff
Posts: 172
Joined: Thu Mar 09, 2017 6:30 pm

Wed Jul 05, 2017 7:33 pm

Hello chrisguk,
Thanks for update. Glad to hear that!
Post Reply