Page 1 of 2
error creating 2 node HA with free vsan
Posted: Fri Mar 31, 2023 6:51 am
by yosiyakovi
Hi,
when i am trying to create 2 node vsan using the CreateHA_2.ps1 PowerShell script i am getting error message:
"control HAImage -GetDefaults:"" -deviceSectorSizeBytes:"512"
-
101 Failed: operation cannot be completed..
i have configured "$sectorSize=512" but without any success
Thanks
Re: error creating 2 node HA with free vsan
Posted: Fri Mar 31, 2023 7:18 am
by yaroslav (staff)
Please make sure you are using the script right. See
https://forums.starwindsoftware.com/vie ... p+3#p31505 for more details.
Re: error creating 2 node HA with free vsan
Posted: Fri Mar 31, 2023 10:14 am
by yosiyakovi
Hi,
I did follow the guide and searched the forum but no one have the error that i am having
the exact output is:
Request to 192.168.1.21 ( 192.168.1.21 ) : 3261
-
control HAImage -GetDefaults:"" -deviceSectorSizeBytes:"512"
-
101 Failed: operation cannot be completed..
*** 192.168.1.21 is the main vsan appliance address
Re: error creating 2 node HA with free vsan
Posted: Fri Mar 31, 2023 12:00 pm
by yaroslav (staff)
Can you please provide the script and the IP addresses?
Re: error creating 2 node HA with free vsan
Posted: Fri Mar 31, 2023 2:44 pm
by yosiyakovi
Hi,
Node1:
Management 192.168.1.21
Sync 192.168.4.21
HB 192.168.5.21
Node2:
Management 192.168.1.22
Sync 192.168.4.22
HB 192.168.5.22
Script:
param($addr="192.168.1.21", $port=3261, $user="root", $password="starwind",
$addr2="192.168.1.22", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="Clear",
$size=12,
$sectorSize=512,
$failover=0,
$bmpType=1,
$bmpStrategy=0,
#primary node
$imagePath="\mnt\DISK01",
$imageName="masterImg23",
$createImage=$true,
$storageName="",
$targetAlias="targetha23",
$autoSynch=$true,
$poolName="pool1",
$syncSessionCount=1,
$aluaOptimized=$true,
$cacheMode="wb",
$cacheSize=128,
$syncInterface="#p2=192.168.4.22:3260" -f $addr2,
$hbInterface="#p2=192.168.5.22:3260",
$createTarget=$true,
$bmpFolderPath="",
#secondary node
$imagePath2="\mnt\DISK01",
$imageName2="partnerImg24",
$createImage2=$true,
$storageName2="",
$targetAlias2="partnerha24",
$autoSynch2=$true,
$poolName2="pool1",
$syncSessionCount2=1,
$aluaOptimized2=$false,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$syncInterface2="#p1=192.168.4.21:3260" -f $addr,
$hbInterface2="#p1=192.168.5.21:3260",
$createTarget2=$true,
$bmpFolderPath2=""
)
Import-Module StarWindX
try
{
Enable-SWXLog -level SW_LOG_LEVEL_DEBUG
$server = New-SWServer -host $addr -port $port -user $user -password $password
$server.Connect()
$firstNode = new-Object Node
$firstNode.HostName = $addr
$firstNode.HostPort = $port
$firstNode.Login = $user
$firstNode.Password = $password
$firstNode.ImagePath = $imagePath
$firstNode.ImageName = $imageName
$firstNode.Size = $size
$firstNode.CreateImage = $createImage
$firstNode.StorageName = $storageName
$firstNode.TargetAlias = $targetAlias
$firstNode.AutoSynch = $autoSynch
$firstNode.SyncInterface = $syncInterface
$firstNode.HBInterface = $hbInterface
$firstNode.PoolName = $poolName
$firstNode.SyncSessionCount = $syncSessionCount
$firstNode.ALUAOptimized = $aluaOptimized
$firstNode.CacheMode = $cacheMode
$firstNode.CacheSize = $cacheSize
$firstNode.FailoverStrategy = $failover
$firstNode.CreateTarget = $createTarget
$firstNode.BitmapStoreType = $bmpType
$firstNode.BitmapStrategy = $bmpStrategy
$firstNode.BitmapFolderPath = $bmpFolderPath
#
# device sector size. Possible values: 512 or 4096(May be incompatible with some clients!) bytes.
#
#$firstNode.SectorSize = $sectorSize
$secondNode = new-Object Node
$secondNode.HostName = $addr2
$secondNode.HostPort = $port2
$secondNode.Login = $user2
$secondNode.Password = $password2
$secondNode.ImagePath = $imagePath2
$secondNode.ImageName = $imageName2
$secondNode.CreateImage = $createImage2
$secondNode.StorageName = $storageName2
$secondNode.TargetAlias = $targetAlias2
$secondNode.AutoSynch = $autoSynch2
$secondNode.SyncInterface = $syncInterface2
$secondNode.HBInterface = $hbInterface2
$secondNode.SyncSessionCount = $syncSessionCount2
$secondNode.ALUAOptimized = $aluaOptimized2
$secondNode.CacheMode = $cacheMode2
$secondNode.CacheSize = $cacheSize2
$secondNode.FailoverStrategy = $failover
$secondNode.CreateTarget = $createTarget2
$secondNode.BitmapFolderPath = $bmpFolderPath2
$device = Add-HADevice -server $server -firstNode $firstNode -secondNode $secondNode -initMethod $initMethod
while ($device.SyncStatus -ne [SwHaSyncStatus]::SW_HA_SYNC_STATUS_SYNC)
{
$syncPercent = $device.GetPropertyValue("ha_synch_percent")
Write-Host "Synchronizing: $($syncPercent)%" -foreground yellow
Start-Sleep -m 2000
$device.Refresh()
}
}
catch
{
Write-Host $_ -foreground red
}
finally
{
$server.Disconnect()
}
Re: error creating 2 node HA with free vsan
Posted: Sat Apr 01, 2023 3:50 am
by yaroslav (staff)
I can see the script underwent some customizations. Please try commenting the bmpType fields.
Re: error creating 2 node HA with free vsan
Posted: Sat Apr 01, 2023 5:29 am
by yosiyakovi
Hi,
I commented the bmp fields but still getting the same error
The error is only when i am trying to make HA,
when i just creating single image from PowerShell its working on both nodes.
Thanks
Re: error creating 2 node HA with free vsan
Posted: Sat Apr 01, 2023 5:51 am
by yaroslav (staff)
Can you please take the script "as is" and fill in the gaps?
Please use the script I shared above as a reference.
Re: error creating 2 node HA with free vsan
Posted: Sat Apr 01, 2023 12:24 pm
by yosiyakovi
Hi,
did that but i am getting the same error
Re: error creating 2 node HA with free vsan
Posted: Sat Apr 01, 2023 5:06 pm
by yosiyakovi
Hi,
I even installed the VSAN from scratch and still got the same error message
When i search the logs i am getting those messages:
4/1 13:06:07.351799 30 conf: TelnetListener::listenConnections: Accepted control connection from 192.168.1.1:53748.
4/1 13:06:07.371932 38 FileBrowser: *** CFileBrowser::parsePath: Could not create image : provided path has invalid extension!
4/1 13:06:07.371971 38 Srv: *** iScsiServer::list: Error parsing path: VSA Storage\mnt\
4/1 13:06:17.256773 38 FileBrowser: *** CFileBrowser::parsePath: Could not create image : provided path has invalid extension!
4/1 13:06:17.256803 38 Srv: *** iScsiServer::list: Error parsing path: VSA Storage\mnt\
4/1 13:06:17.269822 38 conf: ControlConnection::processConnection: Control connection closed.
Thanks
Re: error creating 2 node HA with free vsan
Posted: Sun Apr 02, 2023 11:23 am
by yaroslav (staff)
Hi,
It points to the path issues. Please share the script with me once again.
Re: error creating 2 node HA with free vsan
Posted: Sun Apr 02, 2023 7:40 pm
by yosiyakovi
Hi,
Here is the script:
param($addr="192.168.1.21", $port=3261, $user="root", $password="starwind",
$addr2="192.168.1.22", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="Clear",
$size=1200,
$sectorSize=512,
$failover=0,
#primary node
$imagePath="VSA Storage\mnt\DISK01",
$imageName="masterImg21",
$createImage=$true,
$storageName="",
$targetAlias="targetha21",
$autoSynch=$true,
$poolName="pool1",
$syncSessionCount=1,
$aluaOptimized=$true,
$cacheMode="wb",
$cacheSize=128,
$syncInterface="#p2=192.168.4.22:3260" -f $addr2,
$hbInterface="#p2=192.168.5.22:3260,192.168.1.22:3260" -f $addr2,
$createTarget=$true,
#secondary node
$imagePath2="VSA Storage\mnt\DISK01",
$imageName2="partnerImg22",
$createImage2=$true,
$storageName2="",
$targetAlias2="partnerha22",
$autoSynch2=$true,
$poolName2="pool1",
$syncSessionCount2=1,
$aluaOptimized2=$true,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$syncInterface2="#p1=192.168.4.21:3260" -f $addr,
$hbInterface2="#p1=192.168.5.21:3260,192.168.1.21:3260" -f $addr,
$createTarget2=$true
)
Import-Module StarWindX
try
{
Enable-SWXLog -level SW_LOG_LEVEL_DEBUG
$server = New-SWServer -host $addr -port $port -user $user -password $password
$server.Connect()
$firstNode = new-Object Node
$firstNode.HostName = $addr
$firstNode.HostPort = $port
$firstNode.Login = $user
$firstNode.Password = $password
$firstNode.ImagePath = $imagePath
$firstNode.ImageName = $imageName
$firstNode.Size = $size
$firstNode.CreateImage = $createImage
$firstNode.StorageName = $storageName
$firstNode.TargetAlias = $targetAlias
$firstNode.AutoSynch = $autoSynch
$firstNode.SyncInterface = $syncInterface
$firstNode.HBInterface = $hbInterface
$firstNode.PoolName = $poolName
$firstNode.SyncSessionCount = $syncSessionCount
$firstNode.ALUAOptimized = $aluaOptimized
$firstNode.CacheMode = $cacheMode
$firstNode.CacheSize = $cacheSize
$firstNode.FailoverStrategy = $failover
$firstNode.CreateTarget = $createTarget
#$firstNode.BitmapStoreType = $bmpType
#$firstNode.BitmapStrategy = $bmpStrategy
#$firstNode.BitmapFolderPath = $bmpFolderPath
#
# device sector size. Possible values: 512 or 4096(May be incompatible with some clients!) bytes.
#
#$firstNode.SectorSize = $sectorSize
$secondNode = new-Object Node
$secondNode.HostName = $addr2
$secondNode.HostPort = $port2
$secondNode.Login = $user2
$secondNode.Password = $password2
$secondNode.ImagePath = $imagePath2
$secondNode.ImageName = $imageName2
$secondNode.CreateImage = $createImage2
$secondNode.StorageName = $storageName2
$secondNode.TargetAlias = $targetAlias2
$secondNode.AutoSynch = $autoSynch2
$secondNode.SyncInterface = $syncInterface2
$secondNode.HBInterface = $hbInterface2
$secondNode.SyncSessionCount = $syncSessionCount2
$secondNode.ALUAOptimized = $aluaOptimized2
$secondNode.CacheMode = $cacheMode2
$secondNode.CacheSize = $cacheSize2
$secondNode.FailoverStrategy = $failover
$secondNode.CreateTarget = $createTarget2
#$secondNode.BitmapFolderPath = $bmpFolderPath2
$device = Add-HADevice -server $server -firstNode $firstNode -secondNode $secondNode -initMethod $initMethod
while ($device.SyncStatus -ne [SwHaSyncStatus]::SW_HA_SYNC_STATUS_SYNC)
{
$syncPercent = $device.GetPropertyValue("ha_synch_percent")
Write-Host "Synchronizing: $($syncPercent)%" -foreground yellow
Start-Sleep -m 2000
$device.Refresh()
}
}
catch
{
Write-Host $_ -foreground red
}
finally
{
$server.Disconnect()
}
Thanks
Re: error creating 2 node HA with free vsan
Posted: Mon Apr 03, 2023 3:17 pm
by yaroslav (staff)
Please try the path without VSA Storage, try using \mnt\disk01.
Re: error creating 2 node HA with free vsan
Posted: Tue Apr 04, 2023 3:50 am
by yosiyakovi
Hi,
I found post in the forum and followed the script
https://forums.starwindsoftware.com/vie ... %5C#p33441
now i am getting other error
"Mandatory parameters are missed"
here is my updated script
Import-Module StarwindX
try {
# Enable-SWXLog
$vsa1 = New-SWServer -host 192.168.1.21 -port 3261 -user root -password starwind
$vsa2 = New-SWServer -host 192.168.1.22 -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\DISK01" -fileName "TestLUN00" -size 500
Write-Host "Creating image on vsa2"
New-ImageFile -server $vsa2 -path "VSA Storage\mnt\DISK01" -fileName "TestLUN00" -size 500
$firstNode = new-Object Node
$firstNode.HostName = "192.168.1.21"
$firstNode.ImagePath = "VSA Storage\mnt\DISK01"
$firstNode.ImageName = "TestLUN00"
$firstNode.Size = 500
$firstNode.CreateImage = $false
$firstNode.TargetAlias = "TestLUN00"
$firstNode.AutoSynch = $true
$firstNode.SyncInterface = "#p2=192.168.4.22:3260"
$firstNode.HBInterface = "#p2=192.168.5.22:3260"
$firstNode.PoolName = "pool1"
$firstNode.SyncSessionCount = 1
$firstNode.ALUAOptimized = $true
$firstNode.createTarget=$true
$firstNode.SectorSize = 512
$secondNode = new-Object Node
$secondNode.HostName = "192.168.1.22"
$secondNode.HostPort = "3261"
$secondNode.Login = "root"
$secondNode.Password = "starwind"
$secondNode.ImagePath = "VSA Storage\mnt\DISK01"
$secondNode.ImageName = "TestLUN00"
$secondNode.Size = 500
$secondNode.CreateImage = $false
$secondNode.TargetAlias = "TestLUN00"
$secondNode.AutoSynch = $true
$secondNode.SyncInterface = "#p1=192.168.4.21:3260"
$secondNode.HBInterface = "#p1=192.168.5.21:3260"
$secondNode.PoolName = "pool1"
$secondNode.SyncSessionCount = 1
$secondNode.ALUAOptimized = $true
$secondNode.createTarget=$true
$secondNode.SectorSize = 512
Write-Host "Creating HA"
$device = Add-HADevice -server $vsa1 -firstNode $firstNode -secondNode $secondNode -initMethod "Clear"
while ($device.SyncStatus -ne [SwHaSyncStatus]::SW_HA_SYNC_STATUS_SYNC)
{
$syncPercent = $device.GetPropertyValue("ha_synch_percent")
Write-Host "Synchronizing: $($syncPercent)%" -foreground yellow
Start-Sleep -m 2000
$device.Refresh()
}
}
catch
{
Write-Host $_ -foreground red
}
finally
{
$vsa1.Disconnect()
$vsa2.Disconnect()
}
Thanks
Re: error creating 2 node HA with free vsan
Posted: Tue Apr 04, 2023 9:53 pm
by yaroslav (staff)
Greetings. Thank you for your update and effort. We are looking into the service's functioning. As a workaround, you could downgrade to 13586.
OVF template:
https://starwind.my.salesforce.com/sfc/ ... 8yWr3lc4g8
Downgrade link:
https://starwind.my.salesforce.com/sfc/ ... i24Wi_HCeA (downgrading is the same as updating
https://knowledgebase.starwindsoftware. ... d-version/)
Management console:
https://starwind.my.salesforce.com/sfc/ ... mnnA8xtFI4