Page 3 of 3

Re: Recover HA after second node failure

Posted: Tue May 25, 2021 8:18 am
by harish.patil
I have already deleted all 3 files on unhealthy node .img, HA.swdsk & .swdsk. I have attached the script here.

Code: Select all

param($addr="192.168.100.6", $port=3261, $user="root", $password=starwind", $deviceName="HAImage4",
	$addr2="192.168.100.9", $port2=$port, $user2=$user, $password2=$password,
#secondary node
	$imagePath2="My computer\D",
	$imageName2="imagefile4",
	$createImage2=$true,
	$targetAlias2="linuxstor",
	$autoSynch2=$true,
	$poolName2="pool1",
	$syncSessionCount2=1,
	$aluaOptimized2=$true,
	$syncInterface2="#p1=10.10.10.8:3260" -f $addr,
    $hbInterface2="#p2=192.168.100.9:3260",
    $selfSyncInterface="#p1=10.10.10.6:3260," -f $addr2,
    $selfHbInterface="#p2=192.168.100.6:3260"
	)
	
Import-Module StarWindX

try
{
    Enable-SWXLog -level SW_LOG_LEVEL_DEBUG
    
    $server = New-SWServer $addr $port $user $password
    $server.Connect()

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

    $node = new-Object Node
    $node.HostName = $addr2
    $node.HostPort = $port2
    $node.Login = $user2
    $node.Password = $password2
    $node.ImagePath = $imagePath2
    $node.ImageName = $imageName2
    $node.CreateImage = $createImage2
    $node.TargetAlias = $targetAlias2
    $node.SyncInterface = $syncInterface2
    $node.HBInterface = $hbInterface2
	$node.AutoSynch = $autoSynch2
	$node.SyncSessionCount = $syncSessionCount2
	$node.ALUAOptimized = $aluaOptimized2
	$node.PoolName = $poolName2

    Add-HAPartner $device $node $selfSyncInterface $selfHbInterface
}
catch
{
	Write-Host $_ -foreground red 
}
finally
{
	$server.Disconnect()
}

Re: Recover HA after second node failure

Posted: Tue May 25, 2021 2:19 pm
by yaroslav (staff)
Hi,

I think we may need to add HB interface afterward. Please see StarWind VSAN system requirements https://www.starwindsoftware.com/system-requirements and best practices https://www.starwindsoftware.com/best-p ... practices/. I'd like to see the log collection from both servers to learn more about the setup. How to collect the logs https://knowledgebase.starwindsoftware. ... collector/. Share them via Google Disk/SharePoint/OneDrive/etc. here.
Try these parameters.
$syncInterface2="#p1=10.10.10.8:3260" -f $addr #here goes the IP of the partner,
$hbInterface2="",
$selfSyncInterface="#p1=10.10.10.6:3260" -f $addr2 #here goes own IP,
$selfHbInterface=""

Re: Recover HA after second node failure

Posted: Wed May 26, 2021 5:11 am
by harish.patil
I have run the script without adding hbinterface, still getting the same error. I have uploaded the logs here. https://revmaxtelecom-my.sharepoint.com ... g?e=0DZvFb

Re: Recover HA after second node failure

Posted: Wed May 26, 2021 5:50 am
by yaroslav (staff)
Hi,

Please contact us at support@starwind.com. Use this thread as a reference; 515835 is your reference.

Re: Recover HA after second node failure

Posted: Thu Aug 19, 2021 6:10 pm
by aonesur
You need to remove the replica to the affected server (run RemoveHAPartner.ps1 from C:\Program Files\StarWind Software\StarWind\StarWindX\Samples\powershell), remove the HAs on the affected server from the underlying storage and recreate the replica with AddHAPartner.ps1.

Re: Recover HA after second node failure

Posted: Fri Aug 20, 2021 7:51 am
by yaroslav (staff)
This case was already resolved by us remoting to the system. :D