Can't configure MPIO on two devices created with powershell

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

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

Post Reply
carobell
Posts: 6
Joined: Thu Mar 22, 2018 1:41 pm
Location: Canada

Mon Mar 26, 2018 4:14 pm

I've tested this with the starwind management console and it worked without problem, but now that I'm starting over from free mode (in powershell) I cannot seem to redo it.
The machines are the same as when I did it with the GUI, the only thing I changed is that I unmade the NIC-team on Sync and Hearthbeat as was suggested to me on ServerFault so there are 2 connections instead of one. FYI it didn't work with only one so that didn't help.

Here's an image of the Nodes and Nics, sorry for the very simple stuff, I don't know what would be needed to help more.
Image

Here's the creation scripts, with some changes (and comments) added from someone on the forum here (Jeff I think ?) for the witness, the storage has the same scripts with changes to size, names and cachemode.

Code: Select all

Import-Module StarWindX

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

	$server.Connect()
    
	# Define the object $firstNode using "new-Object Node"
	$firstNode = new-Object Node

	# IP address (below) is the address of Host 1.
	$firstNode.HostName = "192.168.1.41"
	# The ImagePath is written in a sudo-linux style.	# Whereas "C:\VSAN" = "My Computer\C\VSAN" or "D:\Data" = "My Computer\D\Data"
	$firstNode.ImagePath = "My computer\V\VSAN"
	$firstNode.ImageName = "Witness"
	# 102400 = 100GB; 51200 = 50GB; 20480 = 20GB; 1024 = 1GB (based on 1024=1GB)
	$firstNode.Size = 1024
	# Sets the active command to create the image upon running of script. (DUH)
	$firstNode.CreateImage = $true
	# Sets the "TargetAlias" to "targetha1"
	$firstNode.TargetAlias = "Witness"
	# Sets the Sync to "AUTO" (DUH)
	$firstNode.AutoSynch = $true
	# SyncInterface (below) is the target interface on the 2nd system, Host 2.
	$firstNode.SyncInterface = "#p2=10.0.0.2:3260,10.0.0.12:3260;#p3=10.0.0.3:3260,10.0.0.13:3260"
	# HBInterface (below) is the target interface on the 2nd system, Host 2.
	$firstNode.HBInterface = "#p2=10.0.0.130:3260,10.0.0.140:3260;#p3=10.0.0.131:3260,10.0.0.141:3260"
    $firstNode.CacheSize = 128    # CacheMode: wb = write back; wt = write through	# If you are going to store virtual machines on this SAN, use WT.    $firstNode.CacheMode = "wb"
	$firstNode.PoolName = ""
	$firstNode.SyncSessionCount = 1
	$firstNode.ALUAOptimized = $true    # Device sector size. Possible values: 512 or 4096(May be incompatible with some clients!) bytes.	# For Hyper-V use 4096 sector size. (suggested by Starwind)    $firstNode.SectorSize = 512

	$secondNode = new-Object Node

	# IP address (below) is the address of Host 2.
	$secondNode.HostName = "192.168.1.42"
	$secondNode.HostPort = "3261"
	$secondNode.Login = "root"
	$secondNode.Password = "starwind"
	$secondNode.ImagePath = "My computer\V\VSAN"
	$secondNode.ImageName = "Witness"
	$secondNode.Size = 1024
	$secondNode.CreateImage = $true
	$secondNode.TargetAlias = "Witness"
	$secondNode.AutoSynch = $true
	# SyncInterface (below) is the target interface on the 1st system, Host 1.
	$secondNode.SyncInterface = "#p1=10.0.0.1:3260,10.0.0.11:3260;#p3=10.0.0.3:3260,10.0.0.13:3260"
	# HBInterface (below) is the target interface on the 1st system, Host 1.
	$secondNode.HBInterface = "#p1=10.0.0.129:3260,10.0.0.139:3260;#p3=10.0.0.131:3260,10.0.0.141:3260"
	$secondNode.ALUAOptimized = $true

	$thirdNode = new-Object Node

	$thirdNode.HostName = "192.168.1.43"
	$thirdNode.HostPort = "3261"
	$thirdNode.Login = "root"
	$thirdNode.Password = "starwind"
	$thirdNode.ImagePath = "My computer\V\VSAN"
	$thirdNode.ImageName = "Witness"
	$thirdNode.Size = 1024
	$thirdNode.CreateImage = $true
	$thirdNode.TargetAlias = "Witness"
	$thirdNode.AutoSynch = $true
	$thirdNode.SyncInterface = "#p1=10.0.0.1:3260,10.0.0.11:3260;#p2=10.0.0.2:3260,10.0.0.12:3260"
	$thirdNode.HBInterface = "#p1=10.0.0.129:3260,10.0.0.139:3260;#p2=10.0.0.130:3260,10.0.0.140:3260"
	$thirdNode.ALUAOptimized = $true

	$device = Add-HADevice -server $server -firstNode $firstNode -secondNode $secondNode -thirdNode $thirdNode -initMethod "Clear"
    
	$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()
}
If I use this I would get a repeating message in powershell of "Synchronizing: 0%". I'm pretty sure this error is only something in the coding that's missing but I have never used these scripts before so I am lost on what I would need to change. I checked the sample scripts and I cannot find anything different between them except comments and cachemode. I've left it going for a few hours on the wtness (only 1GB so should have been synchronised after only an hour or so as it did with the management console) and it still made no difference for the next sricpts...

After creating second device I get an error message that says :

Code: Select all

Request to  SRVR-DATA01.EXAMPLE.COM ( 127.0.0.1 ) : 3261
-
control 0x00000131E3AC2F80 -InitSynchronize: -SynchronizationType:"3"
-
200 Failed: can't establish connection with the partner(s).. 
Using the enumerate script after creating Witness I get :

Code: Select all

Targets:


Name        : iqn.2008-08.com.starwindsoftware:192.168.1.41-witness
Id          : 0x00000131E3A9E340
Alias       : Witness
IsClustered : True
Devices     : System.__ComObject
Permissions : System.__ComObject
type        : 

Devices:
Name                    : HAImage1
DeviceType              : HA Image
DeviceId                : 0x00000131E3AC2F80
File                    : My computer\V\VSAN\Witness_HA.swdsk
TargetName              : iqn.2008-08.com.starwindsoftware:192.168.1.41-witness
TargetId                : 0x00000131E3A9E340
Size                    : 1073741824
CacheMode               : wb
CacheSize               : 128
CacheBlockExpiryPeriod  : 5000
Exists                  : True
DeviceLUN               : 0
IsSnapshotsSupported    : False
Snapshots               : 
SectorSize              : 512
State                   : 0
Partners                : System.__ComObject
SynchronizationChannels : System.__ComObject
HeartbeatChannels       : System.__ComObject
SyncStatus              : 1
SyncTrafficShare        : 50

Name                   : imagefile1
DeviceType             : Image file
DeviceId               : 0x00000131E390E5C0
File                   : My computer\V\VSAN\Witness.img
TargetName             : empty
TargetId               : empty
Size                   : 1073741824
CacheMode              : wb
CacheSize              : 128
CacheBlockExpiryPeriod : 5000
Exists                 : True
DeviceLUN              : 
IsSnapshotsSupported   : False
Snapshots              : 
SectorSize             : 512
State                  : 0
After creating Storage :

Code: Select all

Targets:


Name        : iqn.2008-08.com.starwindsoftware:192.168.1.41-witness
Id          : 0x00000131E3A9E340
Alias       : Witness
IsClustered : True
Devices     : System.__ComObject
Permissions : System.__ComObject
type        : 

Name        : iqn.2008-08.com.starwindsoftware:192.168.1.41-storage
Id          : 0x00000131E3BF1480
Alias       : Storage
IsClustered : True
Devices     : System.__ComObject
Permissions : System.__ComObject
type        : 

Devices:
Name                    : HAImage1
DeviceType              : HA Image
DeviceId                : 0x00000131E3AC2F80
File                    : My computer\V\VSAN\Witness_HA.swdsk
TargetName              : iqn.2008-08.com.starwindsoftware:192.168.1.41-witness
TargetId                : 0x00000131E3A9E340
Size                    : 1073741824
CacheMode               : wb
CacheSize               : 128
CacheBlockExpiryPeriod  : 5000
Exists                  : True
DeviceLUN               : 0
IsSnapshotsSupported    : False
Snapshots               : 
SectorSize              : 512
State                   : 0
Partners                : System.__ComObject
SynchronizationChannels : System.__ComObject
HeartbeatChannels       : System.__ComObject
SyncStatus              : 1
SyncTrafficShare        : 50

Name                   : imagefile2
DeviceType             : Image file
DeviceId               : 0x00000131E3AE7000
File                   : My computer\V\VSAN\Storage.img
TargetName             : empty
TargetId               : empty
Size                   : 1610612736000
CacheMode              : wt
CacheSize              : 128
CacheBlockExpiryPeriod : 5000
Exists                 : True
DeviceLUN              : 
IsSnapshotsSupported   : False
Snapshots              : 
SectorSize             : 512
State                  : 0

Name                   : imagefile1
DeviceType             : Image file
DeviceId               : 0x00000131E390E5C0
File                   : My computer\V\VSAN\Witness.img
TargetName             : empty
TargetId               : empty
Size                   : 1073741824
CacheMode              : wb
CacheSize              : 128
CacheBlockExpiryPeriod : 5000
Exists                 : True
DeviceLUN              : 
IsSnapshotsSupported   : False
Snapshots              : 
SectorSize             : 512
State                  : 0
I tried checking the synchronisation with the sample script SyncHaDeviceAdvanced and it gives me these answers for Witness (before creating Storage) :
192.168.1.41 to iqn.2008-08.com.starwindsoftware:192.168.1.41-witness

Code: Select all

HAImage1. 

Device not synchronized.  Synchronize current node from partner 'iqn.2008-08.com.starwindsoftware:192.168.1.41-witness'
Exception Request to  DATA01.EXAMPLE.COM ( 192.168.1.41 ) : 3261
-
control 0x00000131E3AC2F80 -RestorePartnerNode:"iqn.2008-08.com.starwindsoftware:192.168.1.41-witness"
-
200 Failed: can't find partner node..
192.168.1.41 to iqn.2008-08.com.starwindsoftware:192.168.1.42-witness

Code: Select all

HAImage1. 

Device not synchronized.  Synchronize current node from partner 'iqn.2008-08.com.starwindsoftware:192.168.1.42-witness'
Exception Request to  DATA01.EXAMPLE.COM ( 192.168.1.41 ) : 3261
-
control 0x00000131E3AC2F80 -RestorePartnerNode:"iqn.2008-08.com.starwindsoftware:192.168.1.42-witness"
-
200 Failed: connection with partner node is invalid..
192.168.1.41 to iqn.2008-08.com.starwindsoftware:192.168.1.43-witness

Code: Select all

HAImage1. 

Device not synchronized.  Synchronize current node from partner 'iqn.2008-08.com.starwindsoftware:192.168.1.43-witness'
Exception Request to  DATA01.EXAMPLE.COM ( 192.168.1.41 ) : 3261
-
control 0x00000131E3AC2F80 -RestorePartnerNode:"iqn.2008-08.com.starwindsoftware:192.168.1.43-witness"
-
200 Failed: connection with partner node is invalid..
192.168.1.42 to iqn.2008-08.com.starwindsoftware:192.168.1.41-witness

Code: Select all

HAImage1. 

Device not synchronized.  Synchronize current node from partner 'iqn.2008-08.com.starwindsoftware:192.168.1.41-witness'
Exception Request to  DATA02.EXAMPLE.COM ( 192.168.1.42 ) : 3261
-
control 0x00000131E3AC2F80 -RestorePartnerNode:"iqn.2008-08.com.starwindsoftware:192.168.1.41-witness"
-
200 Failed: connection with partner node is invalid..
192.168.1.42 to iqn.2008-08.com.starwindsoftware:192.168.1.42-witness

Code: Select all

HAImage1. 

Device not synchronized.  Synchronize current node from partner 'iqn.2008-08.com.starwindsoftware:192.168.1.42-witness'
Exception Request to  DATA02.EXAMPLE.COM ( 192.168.1.42 ) : 3261
-
control 0x00000131E3AC2F80 -RestorePartnerNode:"iqn.2008-08.com.starwindsoftware:192.168.1.42-witness"
-
200 Failed: can't find partner node..
192.168.1.42 to iqn.2008-08.com.starwindsoftware:192.168.1.43-witness

Code: Select all

HAImage1. 

Device not synchronized.  Synchronize current node from partner 'iqn.2008-08.com.starwindsoftware:192.168.1.43-witness'
Device not synchronized.  Synchronize current node from partner 'iqn.2008-08.com.starwindsoftware:192.168.1.43-witness'
Device not synchronized.  Synchronize current node from partner 'iqn.2008-08.com.starwindsoftware:192.168.1.43-witness'
Device not synchronized.  Synchronize current node from partner 'iqn.2008-08.com.starwindsoftware:192.168.1.43-witness'
over and over
192.168.1.43 to iqn.2008-08.com.starwindsoftware:192.168.1.41-witness

Code: Select all

HAImage1. 

Synchronization Status: Synchronized
192.168.1.43 to iqn.2008-08.com.starwindsoftware:192.168.1.42-witness

Code: Select all

HAImage1. 

Synchronization Status: Synchronized
192.168.1.43 to iqn.2008-08.com.starwindsoftware:192.168.1.43-witness

Code: Select all

HAImage1. 

Synchronization Status: Synchronized
After creating Storage everything is synchronized.

I continue and take care of the ISCSI initiator/MPIO, I should be able to connect but MPIO would not work for the second device made. There is only one HAImage1 made and it is for the first target (in this case witness) and I am wondering if this is why the second one cannot be configurared ?

Here's my walkthrough after the not synchronized part :
I configured MPIO for iscsi devices on each nodes, server rebooted afterwards.
Add targets on each node :
DATA01

Code: Select all

127.0.0.1:3260 Microsoft ISCSI Initiator Defaut
10.0.0.2:3260 Microsoft ISCSI Initiator 10.0.0.1
10.0.0.3:3260 Microsoft ISCSI Initiator 10.0.0.1
10.0.0.12:3260 Microsoft ISCSI Initiator 10.0.0.11 (failed until I did the other servers before creating storage)
10.0.0.13:3260 Microsoft ISCSI Initiator 10.0.0.11 (idem)
DATA02

Code: Select all

127.0.0.1:3260 Microsoft ISCSI Initiator Defaut
10.0.0.1:3260 Microsoft ISCSI Initiator 10.0.0.2
10.0.0.3:3260 Microsoft ISCSI Initiator 10.0.0.2
10.0.0.11:3260 Microsoft ISCSI Initiator 10.0.0.12
10.0.0.13:3260 Microsoft ISCSI Initiator 10.0.0.12
DATA03

Code: Select all

127.0.0.1:3260 Microsoft ISCSI Initiator Defaut
10.0.0.1:3260 Microsoft ISCSI Initiator 10.0.0.3
10.0.0.2:3260 Microsoft ISCSI Initiator 10.0.0.3
10.0.0.11:3260 Microsoft ISCSI Initiator 10.0.0.13
10.0.0.12:3260 Microsoft ISCSI Initiator 10.0.0.13
Another problems comes up when I connect to the targets is that I cannot connect any servers to more then one target. They only connect to the 10.0.0.1, 10.0.0.2 or 10.0.0.3 depending on the server.
So my connections are :
DATA01 iqn.2008-08.com.starwindsoftware:192.168.1.41-witness default/127.0.0.1
DATA01 iqn.2008-08.com.starwindsoftware:192.168.1.42-witness 10.0.0.1/10.0.0.2 10.0.0.11/10.0.0.2
DATA01 iqn.2008-08.com.starwindsoftware:192.168.1.43-witness 10.0.0.1/10.0.0.3 10.0.0.11/10.0.0.3
DATA02 iqn.2008-08.com.starwindsoftware:192.168.1.41-witness 10.0.0.2/10.0.0.1 10.0.0.12/10.0.0.1
DATA02 iqn.2008-08.com.starwindsoftware:192.168.1.42-witness default/127.0.0.1
DATA02 iqn.2008-08.com.starwindsoftware:192.168.1.43-witness 10.0.0.2/10.0.0.3 10.0.0.12/10.0.0.3
DATA03 iqn.2008-08.com.starwindsoftware:192.168.1.41-witness 10.0.0.3/10.0.0.1 10.0.0.13/10.0.0.1
DATA03 iqn.2008-08.com.starwindsoftware:192.168.1.42-witness 10.0.0.3/10.0.0.2 10.0.0.13/10.0.0.2
DATA03 iqn.2008-08.com.starwindsoftware:192.168.1.43-witness default/127.0.0.1
Switch witness to storage for its connections.

I now have to configure MPIO for the devices (failover on 127.0.0.1) works for the first one (witness in this case) but it's not available for the second one (storage).
So the configuration I end up with is :
DATA01 iqn.2008-08.com.starwindsoftware:192.168.1.41-witness MPIO -> failover
DATA02 iqn.2008-08.com.starwindsoftware:192.168.1.42-witness MPIO -> failover
DATA03 iqn.2008-08.com.starwindsoftware:192.168.1.43-witness MPIO -> failover
No devices available for storage.

I tried doing both witness and storage at the same time and then only witness and adding storage later but still the same problems.

If I continue I can configure (in disk management) the witness but not the storage (since I couldn't configure MPIO).

I think I wrote it all, but if there is something missing ask away!

This is not the first time I have redone it. To do that I delete the targets and devices and make sure that I have no files leftover. I have tried reinstalling the OS but it didn't change naything so I have not redone it in a while.
Last edited by carobell on Wed Mar 28, 2018 2:54 pm, edited 1 time in total.
Boris (staff)
Staff
Posts: 805
Joined: Fri Jul 28, 2017 8:18 am

Tue Mar 27, 2018 1:50 pm

What is the StarWind VSAN build you are trying to achieve this with?
carobell
Posts: 6
Joined: Thu Mar 22, 2018 1:41 pm
Location: Canada

Tue Mar 27, 2018 6:31 pm

Latest one available, I do not know how to check on the server which build that is ?

I have deleted the devices I wrote about above and started with the Storage and the synchronisation is still at 0% on the original powershell window, I checked the synchronisation on another windows and though it took time it finally got to 1% (on the other window). So that's one thing figured out~
I suppose the first window (creation one) gives the % of all device synchronization, so it wouldn't get over 0% until all devices were synchronized to a certain point. I'll see after a day of letting it run.

I'm going to try and get to the end (adding the storage to a cluster) before creating the second device, see if I get different errors along the way...
Boris (staff)
Staff
Posts: 805
Joined: Fri Jul 28, 2017 8:18 am

Wed Mar 28, 2018 8:59 am

Keep us updated on the process and whether anything goes not as expected in terms of synchronization.
carobell
Posts: 6
Joined: Thu Mar 22, 2018 1:41 pm
Location: Canada

Wed Mar 28, 2018 12:31 pm

So after a night the window where I used the device creation script I posted in my first post (edited for the Storage of 1.5TB) never got higher then 0% for synchronisation.
I had a second window with the SyncHADeviceAdvanced checking the second Node (DATA02) and it went to 99% then to "Device Synchronized" but the First node is still not synchronized.
So DATA02 and DATA03 are both synchronized but when Checking (and when editing the advanced script to tell it to synchronize) DATA01 it gives out this error :

Code: Select all

HAImage1
Device not synchronized. Synchronize current node from partner 'iqn.2008-08.com.starwindsoftware:192.168.142-storage'
Request to  SRVR-DATA01.EXAMPLE.COM ( 192.168.1.41 ) : 3261
-
control 0x00000131E39DEA40 -RestorePartnerNode:"iqn.2008-08.com.starwindsoftware:192.168.1.42-storage"
-
200 Failed: connection with partner node is invalid..

Code: Select all

HAImage1
Device not synchronized. Mark current node as 'Synchronized'. 
Request to  SRVR-DATA01.EXAMPLE.COM ( 192.168.1.41 ) : 3261
-
control 0x000002935F74A4C0 -RestoreCurrentNode:""
-
200 Failed: operation cannot be completed.. 
Just to confirm, I used this script to check if they were synchronized :

Code: Select all

#
# This following example shows how to get synchronization status of specified HA device and 
# if there is a need run synchronization
#
Import-Module StarWindX

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

	$server.Connect()

	$devices = Get-Device $server -type ([StarWindDeviceTypeStr]::HAIMAGE)
    
	foreach($dev in $devices)
	{
		Write-Host $dev.Name -foreground gray

		while( $dev.SyncStatus -ne [SwHaSyncStatus]::SW_HA_SYNC_STATUS_SYNC )
		{
			#
			# Device not synchronized. Maybe it waiting for autosynchronization ?
			#
			$waitForAutoSync = $dev.GetPropertyValue("ha_wait_on_autosynch")
                
			if ( $waitForAutoSync -eq "1" )
			{
				Write-Host "Waiting for autosynchronization..." -foreground yellow
			}
			else
			{
				if( $dev.SyncStatus -eq [SwHaSyncStatus]::SW_HA_SYNC_STATUS_IN_PROGRESS )
				{
					#
					# Device is synchronizing. Get synchronization percent and show it
					#
					$syncPercent = $dev.GetPropertyValue("ha_synch_percent")
                        
					Write-Host "Synchronizing: $($syncPercent)%" -foreground yellow
				}
                    
				if( $dev.SyncStatus -eq [SwHaSyncStatus]::SW_HA_SYNC_STATUS_NOT_SYNC )
				{
					$partnerTargetName = $dev.Partners.Item(0).TargetName
					#
					# Device not synchronized. Synchronize current node from partner
					#
					Write-Host "Device not synchronized. Synchronize current node from partner '$($partnerTargetName)'" -foreground yellow

					$params = new-object -ComObject StarWindX.Parameters        
					$params.AppendParam("deviceID",$dev.DeviceId)
					$params.AppendParam("partnetTargetName", $partnerTargetName)
                        
					$server.ExecuteCommand( 0, "restoreHAPartnerNode", $params)
                        
					#
					# If you want to synchronize partners from current node you can comment out code above and uncomment section below
					#
                        
					#
					# Device not synchronized. Mark current node as 'Synchronized'. 
					# WARNING, Command changes Device Status to "Synchronized" without Data Synchronization with HA (High Availability) Partner, 
					# Device will start processing Client Requests immediately and will be used as Data Synchronization Source for Partner Device.
					#
					#Write-Host "Device not synchronized. Mark current node as 'Synchronized'. " -foreground yellow

					#$params = new-object -ComObject StarWindX.Parameters        
					#$params.AppendParam("deviceID",$dev.DeviceId)
                        
					#$server.ExecuteCommand( 0, "restoreCurrentHANode", $params)
                        
					Start-Sleep -m 5000
				}
			}

			Start-Sleep -m 1000

			#
			# Refresh device info
			#
			$device.Refresh()
		}
            
		Write-Host "Device synchronized" -foreground green
	}
}
catch
{
	Write-Host $_ -foreground red 
}
finally
{
	$server.Disconnect()
}
I Comment out the first part and edit in the second part to "mark as synchronized", but it doesn't seem to work for me?

Code: Select all

				{
					$partnerTargetName = $dev.Partners.Item(0).TargetName
					#
					# Device not synchronized. Synchronize current node from partner
					#
	#				Write-Host "Device not synchronized. Synchronize current node from partner '$($partnerTargetName)'" -foreground yellow

	#				$params = new-object -ComObject StarWindX.Parameters        
	#				$params.AppendParam("deviceID",$dev.DeviceId)
	#				$params.AppendParam("partnetTargetName", $partnerTargetName)
                        
	#				$server.ExecuteCommand( 0, "restoreHAPartnerNode", $params)
                        
					#
					# If you want to synchronize partners from current node you can comment out code above and uncomment section below
					#
                        
					#
					# Device not synchronized. Mark current node as 'Synchronized'. 
					# WARNING, Command changes Device Status to "Synchronized" without Data Synchronization with HA (High Availability) Partner, 
					# Device will start processing Client Requests immediately and will be used as Data Synchronization Source for Partner Device.
					#
			Write-Host "Device not synchronized. Mark current node as 'Synchronized'. " -foreground yellow

			$params = new-object -ComObject StarWindX.Parameters        
			$params.AppendParam("deviceID",$dev.DeviceId)
                        
			$server.ExecuteCommand( 0, "restoreCurrentHANode", $params)
                        
					Start-Sleep -m 5000
				}
I had to reboot the first node (the one saying it's not synchronized), I'll continue with the other two until it comes back online and check again if it wants to synchronize....
Boris (staff)
Staff
Posts: 805
Joined: Fri Jul 28, 2017 8:18 am

Wed Mar 28, 2018 2:01 pm

I looked closely to the script you used for device creation. There is either a type that you made or an error you were not aware of.

Code: Select all

$thirdNode.HostName = 192.168.1.43"
It lacks " at the beginning of the IP address.
Try to fix that and repeat the procedure once again.
carobell
Posts: 6
Joined: Thu Mar 22, 2018 1:41 pm
Location: Canada

Wed Mar 28, 2018 2:17 pm

Sadly it's only a typo. The script I used has the ".

DATA01 rebooted and noting changed. I also rebooted DATA02 to see if it changed anything but it still says it's synchronized and not DATA01.

Using sample script SyncHADevice on DATA01 :

Code: Select all

Synchronize device HAImage1
Error: 
200 Failed: can't establish connection with the partner(s)..
Using sample script SyncHADeviceAdvanced on DATA01 :

Code: Select all

HAImage1
Device not synchronized. Synchronize current node from partner 'iqn.2008-08.com.starwindsoftware:192.168.1.42-storage'
Request to  SRVR-DATA01.EXAMPLE.COM ( 127.0.0.1 ) : 3261
-
control 0x000002935F74A4C0 -RestorePartnerNode:"iqn.2008-08.com.starwindsoftware:192.168.1.42-storage"
-
200 Failed: connection with partner node is invalid..
Using modified script on DATA01 :

Code: Select all

HAImage1

Device not synchronized. Synchronize current node from partner 'iqn.2008-08.com.starwindsoftware:192.168.1.41-storage'
Exception Request to  SRVR-DATA01.EXAMPLE.COM ( 127.0.0.1 ) : 3261
-
control 0x000002935F74A4C0 -RestorePartnerNode:"iqn.2008-08.com.starwindsoftware:192.168.1.41-storage"
-
200 Failed: can't find partner node..

Code: Select all

HAImage1

Device not synchronized. Synchronize current node from partner 'iqn.2008-08.com.starwindsoftware:192.168.1.42-storage'
Exception Request to  SRVR-DATA01.EXAMPLE.COM ( 127.0.0.1 ) : 3261
-
control 0x000002935F74A4C0 -RestorePartnerNode:"iqn.2008-08.com.starwindsoftware:192.168.1.42-storage"
-
200 Failed: connection with partner node is invalid.. 

Code: Select all

HAImage1

Device not synchronized. Synchronize current node from partner 'iqn.2008-08.com.starwindsoftware:192.168.1.43-storage'
Exception Request to  SRVR-DATA01.EXAMPLE.COM ( 127.0.0.1 ) : 3261
-
control 0x000002935F74A4C0 -RestorePartnerNode:"iqn.2008-08.com.starwindsoftware:192.168.1.43-storage"
-
200 Failed: connection with partner node is invalid.. 
Synchronizing from DATA01 :

Code: Select all

HAImage1

Device not synchronized. Mark current node as 'Synchronized'. 
Exception Request to  SRVR-DATA01.EXAMPLE.COM ( 127.0.0.1 ) : 3261
-
control 0x000002935F74A4C0 -RestoreCurrentNode:""
-
200 Failed: Operation cannot be completed. Current node has the partner node(s) in synchronized state.. 
Any script from DATA02 and DATA03 :

Code: Select all

HAImage1

Synchronization Status: Synchronized
Boris (staff)
Staff
Posts: 805
Joined: Fri Jul 28, 2017 8:18 am

Thu Mar 29, 2018 3:26 pm

When possible, submit a support case mentioning this thread.
Boris (staff)
Staff
Posts: 805
Joined: Fri Jul 28, 2017 8:18 am

Wed Apr 04, 2018 1:51 pm

Just a brief update for the community:
The reason behind the errors the OP got was a slight typo made in the script when defining the IP addresses for syncronization on node 1.
Post Reply