Page 1 of 1

Unable to create new HA image using StarwindX

Posted: Fri Feb 08, 2019 4:50 pm
by rf152
I have copied the CreateHA(Two nodes) script, and it creates the image, but I'm getting the following in the error log:

Code: Select all

Disk operation failed. Disk path: C:\StarWind\storage\mnt\starwind\TestLUN2\TestLUN2.img. Error code: (25).
This is a pair of linux VSAs running on vmware. The script I used is:

Code: Select all

Import-Module StarwindX

try {
    # Enable-SWXLog

	$vsa1 = New-SWServer -host 10.0.33.12 -port 3261 -user root -password starwind
	$vsa2 = New-SWServer -host 10.0.33.13 -port 3261 -user root -password starwind

	$vsa1.Connect()
	$vsa2.Connect()

	#create image file
	Write-Host "Creating Image on vsa1"
	New-ImageFile -server $vsa1 -path "VSA Storage\mnt\starwind\TestLUN2" -fileName "TestLUN2" -size 500
	Write-Host "Creating image on vsa2"
	New-ImageFile -server $vsa2 -path "VSA Storage\mnt\starwind\TestLUN2" -fileName "TestLUN2" -size 500
    
    $firstNode = new-Object Node

	$firstNode.HostName = "10.0.33.12"
	$firstNode.ImagePath = "VSA Storage\mnt\starwind\TestLUN2"
	$firstNode.ImageName = "TestLUN2"
	$firstNode.Size = 500
	$firstNode.CreateImage = $false
	$firstNode.TargetAlias = "testlun2"
	$firstNode.AutoSynch = $true
	$firstNode.SyncInterface = "#p2=10.254.254.2:3260"
	$firstNode.HBInterface = "#p2=10.255.255.2:3260"
	$firstNode.PoolName = "pool1"
	$firstNode.SyncSessionCount = 1
	$firstNode.ALUAOptimized = $true
	$firstNode.SectorSize = 512
    
	$secondNode = new-Object Node

	$secondNode.HostName = "10.0.33.13"
	$secondNode.HostPort = "3261"
	$secondNode.Login = "root"
	$secondNode.Password = "starwind"
	$secondNode.ImagePath = "VSA Storage\mnt\starwind\TestLUN2"
	$secondNode.ImageName = "TestLUN2"
	$secondNode.Size = 500
	$secondNode.CreateImage = $false
	$secondNode.TargetAlias = "testlun2"
	$secondNode.AutoSynch = $true
	$secondNode.SyncInterface = "#p1=10.254.254.1:3260"
	$secondNode.HBInterface = "#p1=10.255.255.1:3260"
	$secondNode.SyncSessionCount = 1
	$secondNode.ALUAOptimized = $true

	Write-Host "Creating HA"
	$device = Add-HADevice -server $vsa1 -firstNode $firstNode -secondNode $secondNode -initMethod "Clear"

	# $device.Synchronize([SwHaSyncType]::SW_HA_SYNC_FULL, "")
}
catch
{
	Write-Host $_ -foreground red
}
finally
{
	$vsa1.Disconnect()
	$vsa2.Disconnect()
}
I'm at a loss. I can't seem to find any reference to error code 25 anywhere.

I've tried removing and re-creating the VSAN appliances (I'm working with a pair of test appliances at the moment), which made no difference.

Has anyone else seen a similar issue?

Richard

Re: Unable to create new HA image using StarwindX

Posted: Tue Feb 12, 2019 9:33 am
by Oleg(staff)
StarWindX for StarWind VSA is under development at the current moment.
It is not included in the current builds yet.

Re: Unable to create new HA image using StarwindX

Posted: Thu Jan 06, 2022 12:08 pm
by Noskov.E
I am also trying to create a HA on VSA. I get the same error. Does this mean that there is still no support for VSA?

StarWind Virtual Storage Appliance v8.0.0 (Build 14398, [SwVSA]

Re: Unable to create new HA image using StarwindX

Posted: Thu Jan 06, 2022 12:49 pm
by yaroslav (staff)

Re: Unable to create new HA image using StarwindX

Posted: Fri Jan 07, 2022 2:30 am
by Noskov.E
I myself will answer here.
For VSA you need to specify:
$imagePath="VSA Storage\mnt\Datastore1"

I think this should be noted in the comments in the sample script .

You may also need to do $device.MarkAsSynchronized() in primary node.
An example is given in the script syncHaDevice.ps1

Re: Unable to create new HA image using StarwindX

Posted: Fri Jan 07, 2022 5:11 am
by yaroslav (staff)
You may also need to do $device.MarkAsSynchronized() in primary node.
Not necessarily, but I am glad that you made it work!