Recreate node

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

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

Post Reply
CedricT
Posts: 36
Joined: Mon Apr 15, 2019 1:14 pm

Tue Apr 23, 2019 1:21 pm

Hi all!

We are running our tests on VSAN Free with 2 nodes. We are facing a problem. We simulated the lost of a node (complete destruction).

The first node is running fine and vms too, the second node is reinstalled with vsan but without configuration.

We tried to use the same script powershell (createHA(two nodes).ps1) to add the node but that doesn't work.

We didn't find any documentation or subject about it. What would be the best things to re-create the volumes (one for witness and one for vms) and establish again the synchronisation?

Thx you a lot.
Oleg(staff)
Staff
Posts: 568
Joined: Fri Nov 24, 2017 7:52 am

Wed Apr 24, 2019 10:07 am

Hi CedricT,
Could you please log a support case using this form?
Our team will help you with replica creation.
CedricT
Posts: 36
Joined: Mon Apr 15, 2019 1:14 pm

Thu Apr 25, 2019 7:35 am

Hi,

We found a way.

Anyway thank you!
Oleg(staff)
Staff
Posts: 568
Joined: Fri Nov 24, 2017 7:52 am

Thu Apr 25, 2019 8:10 am

You are welcome!
aveonhealth
Posts: 4
Joined: Wed Jun 19, 2019 2:34 pm

Wed Jun 19, 2019 3:25 pm

Hi,


I am having the same issue. Could you help me with how to recreate node please.
CedricT
Posts: 36
Joined: Mon Apr 15, 2019 1:14 pm

Fri Jun 21, 2019 12:18 pm

Hi,

Did you save the files *.swdsk and Starwind.cfg of the node?
Boris (staff)
Staff
Posts: 805
Joined: Fri Jul 28, 2017 8:18 am

Mon Jun 24, 2019 9:59 am

aveonhealth,

Please submit a ticket via https://www.starwindsoftware.com/support-form referencing this thread.
aveonhealth
Posts: 4
Joined: Wed Jun 19, 2019 2:34 pm

Tue Jul 09, 2019 6:40 pm

Hi everyone,

For everyone else who may run into this problem. I wrote this to help out

When one of the nodes failed this is what I did to bring it back on line
I first had to configure my new server and install starwind
0. I had some old *.swdsk, *_HA.swdsk files from some other images. Maybe by copying these files from the working node to the new rebuilt node and then modifying them would have worked but I would have to test this in the future.
1. Disable the StarWind Virtual SAN service
2. Modify the old *.swdsk, *_HA.swdsk, because the ones I had they were pointing to some images I no longer had.

structure of *.swdsk
I noticed this file has the properties of the *.img the important thing to note here is the
<interval size="must be the same as *.swdsk from working node" units="GB"/>
<serial_id>a unique 16 character hex number</serial_id>
<eui_64>same number as serial_id</eui_64>
<storage id="1" name="path to the image file" example "My computer\C\VHD\witness.img" type="file">

structure of *_HA.swdsk
This file has the sync info.
<interval size="must be the same as *_HA.swdsk from working node" units="GB"/> this field is listed twice in the file. Make sure all fileds match
<serial_id>must be the same as *_HA.swdsk from working node and must match in StarWind.cfg</serial_id>
<eui_64>same as serial </eui_64>
<storage id="2" name="iqn.2008-08.com.starwindsoftware:working node target" type="remote" lun="0x0"> this line must contain the partner node target
<link id="1" type="data" priority="1" connections="1"> this is the data link
<peer ip="192.168.251.251" port="3260"/> this is the working node Sync IP aka partner node
<link id="2" type="control" priority="1" connections="1"> this is the heartbeat link
<peer ip="192.168.250.251" port="3260"/> this is the working node heartbeat IP aka partner node

structure of StarWind.cfg
Towards the end of the file are some lines which specify image files, HAImages, Targets, and ACLs.
<device name="imagefile1" file="My Computer\C\VHD\Witness.swdsk" node="-1"/>
name filed is the name of image file in this node. Example imagefile1 or imagefile2, etc.
file field is the location of the *.swdsk

<device name="HAImage1" OwnTargetName="iqn.2008-08.com.starwindsoftware:vmhost1.aveon.local-witness" file="My Computer\D\VHD\witness_HA.swdsk" serialId="this must match serial from *_HA.swdsk" " asyncmode="yes" readonly="no" highavailability="yes" buffering="no" header="65536" reservation="no" CacheMode="none" CacheSizeMB="64" AluaNodeGroupStates="0,0" Storage="imagefile1"/>
name field is HAImage name in this node.
OwnTargetName field as the name implies is the target assiged to this HA Image. THIS IS NOT THE TARGET FROM THE PARTNER NODE.
file field location of the *_HA.swdsk
serialId field must match serial from *_HA.swdsk
storage field must match name field from image file fields

<target name="iqn.2008-08.com.starwindsoftware:vmhost1.aveon.local-witness" devices="HAImage1" alias="witness"/>
name field is the target assiged to an HA Image. THIS IS NOT THE TARGET FROM THE PARTNER NODE.
devices field is the HAImage this target should be attached to allias is the last portion of the target name

<aclrecord name="allow for partner(s) of iqn.2008-08.com.starwindsoftware:vmhost1.aveon.local-witness" source="iqn.2008-08.com.starwindsoftware:vmhost2.aveon.local-witness" destination="iqn.2008-08.com.starwindsoftware:vmhost1.aveon.local-witness" interface="" action="allow"/>
allows access from partner node.
Source is the partner node target
Destination is the local node target

3. Copy the configuration files to appropriate locations
4. Started to copy the *.img file from working node to rebuit node, waited 5 minutes then cancelled. When I cancelled the *.img file stayed which was great
5. set service StarWind Virtual SAN back to automatic and started the service
6. On the rebuilt node I run the following script

Code: Select all

Import-Module StarWindX

try
{
	Enable-SWXLog

	$server = New-SWServer 192.168.253.250 3261 root starwind

	$server.Connect()

	$device = Get-Device $server -name "HAImage1"
	if( !$device )
	{
		Write-Host "Device not found" -foreground red
		return
	}

	if($device.SyncStatus -ne [SwHaSyncStatus]::SW_HA_SYNC_STATUS_SYNC)
	{
		Write-Host "Synchronize device $($device.name)" -foreground yellow
		$device.Synchronize([SwHaSyncType]::SW_HA_SYNC_FULL, "")
		#$device.MarkAsSynchronized()
	}
	else
	{
		Write-Host "Device $($device.name) is synchronized" -foreground yellow
	}
}
catch
{
	Write-Host $_ -foreground red
}
finally
{
	$server.Disconnect()
}
7. After that it started doing a full sync :D
Oleg(staff)
Staff
Posts: 568
Joined: Fri Nov 24, 2017 7:52 am

Wed Jul 10, 2019 3:16 pm

Hi aveonhealth,
Thank you for your work.
Post Reply