Unable to create new HA image using StarwindX

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

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

Post Reply
rf152
Posts: 4
Joined: Fri Feb 08, 2019 4:42 pm

Fri Feb 08, 2019 4:50 pm

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
Oleg(staff)
Staff
Posts: 568
Joined: Fri Nov 24, 2017 7:52 am

Tue Feb 12, 2019 9:33 am

StarWindX for StarWind VSA is under development at the current moment.
It is not included in the current builds yet.
Noskov.E
Posts: 3
Joined: Thu Jan 06, 2022 12:00 pm

Thu Jan 06, 2022 12:08 pm

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]
Noskov.E
Posts: 3
Joined: Thu Jan 06, 2022 12:00 pm

Fri Jan 07, 2022 2:30 am

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
yaroslav (staff)
Staff
Posts: 2279
Joined: Mon Nov 18, 2019 11:11 am

Fri Jan 07, 2022 5:11 am

You may also need to do $device.MarkAsSynchronized() in primary node.
Not necessarily, but I am glad that you made it work!
Post Reply