Code: Select all
Disk operation failed. Disk path: C:\StarWind\storage\mnt\starwind\TestLUN2\TestLUN2.img. Error code: (25).
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'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