Page 1 of 2
Starwind vSAN Free vSphere ESXI Synchronizing stuck at 0%
Posted: Mon Mar 06, 2023 3:57 pm
by vsan
I was able to deploy the trial version and everything worked using gui and no cache.
Now trying to deploy free version with PowerShell and the CreateHA_2.ps1 script.
I have found that if $cacheMode="none" (or anything other than "wb") then sync fails and keeps printing "Synchronizing: 0%"
Management console > Node1 > Events shows:
Error Code: (25)
initial synchronization failed
If I set it back to $cacheMode="wb" (like the CreateHA_2.ps1 example shows) then everything works as expected.
Node1:
192.168.20.22 - mgmt
192.168.6.22 - iscsi
192.168.40.22 - sync
Node2:
192.168.20.23 - mgmt
192.168.6.23 - iscsi
192.168.40.23 - sync
Code: Select all
param($addr="192.168.20.22", $port=3261, $user="root", $password="starwind",
$addr2="192.168.20.23", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="Clear",
$size=4096,
$sectorSize=512,
$failover=0,
$bmpType=1,
$bmpStrategy=0,
#primary node
$imagePath="\mnt\vsan01-01",
$imageName="iscsi-vsan01-vmw-01",
$createImage=$true,
$storageName="",
$targetAlias="iscsi-vsan01-vmw-01",
$autoSynch=$true,
$poolName="",
$syncSessionCount=1,
$aluaOptimized=$true,
$cacheMode="none",
$cacheSize=128,
$syncInterface="#p2=192.168.40.23:3260" -f $addr2,
$hbInterface="#p2=192.168.6.23:3260,192.168.20.23:3260" -f $addr2,
$createTarget=$true,
$bmpFolderPath="",
#secondary node
$imagePath2="\mnt\vsan02-01",
$imageName2="iscsi-vsan02-vmw-01",
$createImage2=$true,
$storageName2="",
$targetAlias2="iscsi-vsan02-vmw-01",
$autoSynch2=$true,
$poolName2="",
$syncSessionCount2=1,
$aluaOptimized2=$false,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$syncInterface2="#p1=192.168.40.22:3260" -f $addr,
$hbInterface2="#p1=192.168.6.22:3260,192.168.20.22:3260" -f $addr,
$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: Starwind vSAN Free vSphere ESXI Synchronizing stuck at 0%
Posted: Mon Mar 06, 2023 10:31 pm
by yaroslav (staff)
Just comment the cache fields out.
Re: Starwind vSAN Free vSphere ESXI Synchronizing stuck at 0%
Posted: Tue Mar 07, 2023 12:13 am
by vsan
yaroslav (staff) wrote:Just comment the cache fields out.
Yaroslav, you are always so quick to reply and helpful. Thank you.
Simply commenting out "cacheMode" and "cacheSize" works.
Re: Starwind vSAN Free vSphere ESXI Synchronizing stuck at 0%
Posted: Tue Mar 07, 2023 12:38 am
by vsan
yaroslav (staff) wrote:Just comment the cache fields out.
One other question -
I have 2x Truenas arrays (all 7.2krpm spinners in mirrors/raid10) each providing 1x 4TB thick iSCSI LUN to the VMware cluster.
Each Starwind vSAN node has 1x 16gb boot drive and 1x of the 4TB LUNs attached via RDM - no other disks or cache disks.
I plan to make a single 4TB HA image to share back to the VMware cluster.
I see the recommendation of "The size of L1 cache should be equal to the amount of the average working data set."
https://knowledgebase.starwindsoftware. ... rinciples/
Is enabling write-back cache recommended? Is there a general recommendation for cache size? As this is just for lab right now, usage and workload change every day.
A note -
When I RDM a 4TB thick LUN from Synology to one of the vSAN nodes and try to format as XFS from the IP:9090 interface, it seems to "Overwrite existing data with zeroes" even when "Don't overwrite existing data" is selected - it takes many hours to format and I can see it writing ~1k-1.5k IOPS from the Synology UI. While there is no network traffic observed during this time, both Synology and VMware hosts support VAAI.
This activity is not observed when using RDM 4TB thick LUN from Truenas or when using 4TB vmware thick or thin provisioned disks (vmdk).
Re: Starwind vSAN Free vSphere ESXI Synchronizing stuck at 0%
Posted: Tue Mar 07, 2023 4:29 am
by yaroslav (staff)
Greetings,
Glad it worked!
Write-back cache is associated with additional complexities. True, enabling it gives more performance, yet, it requires RAID card BBU and UPS to run smoothly. Furthermore, when terminated the full synchronization is inevitable (see more at
https://knowledgebase.starwindsoftware. ... may-start/). See more about caching
https://knowledgebase.starwindsoftware. ... rinciples/.
The general recommendation will be "make it neither too big nor too small". Typically, 1 GB per 1 TB is alright (make sure to adjust VM RAM accordingly: 8 GB + cache size). But, I normally try keeping it below 8 GB.
StarWind VSAN, in the current build, does not support VAAI CAW. Yet, I rarely see VAAI CAW commands to be the problem in VSAN's daily operation.
When I RDM a 4TB thick LUN from Synology to one of the vSAN nodes and try to format as XFS from the IP:9090 interface, it seems to "Overwrite existing data with zeroes" even when "Don't overwrite existing data" is selected - it takes many hours to format and I can see it writing ~1k-1.5k IOPS from the Synology UI. While there is no network traffic observed during this time, both Synology and VMware hosts support VAAI.
So, is this RDM connected to Synology? Try with thick provision eager zeroed drive, please.
This activity is not observed when using RDM 4TB thick LUN from Truenas or when using 4TB vmware thick or thin provisioned disks (vmdk).
If the storage array is the only thing that changes, I believe, there might be some odds on the storage side.
Re: Starwind vSAN Free vSphere ESXI Synchronizing stuck at 0%
Posted: Tue Mar 07, 2023 4:57 am
by vsan
yaroslav (staff) wrote:Greetings,
Glad it worked!
Write-back cache is associated with additional complexities. True, enabling it gives more performance, yet, it requires RAID card BBU and UPS to run smoothly. Furthermore, when terminated the full synchronization is inevitable (see more at
https://knowledgebase.starwindsoftware. ... may-start/). See more about caching
https://knowledgebase.starwindsoftware. ... rinciples/.
The general recommendation will be "make it neither too big nor too small". Typically, 1 GB per 1 TB is alright (make sure to adjust VM RAM accordingly: 8 GB + cache size). But, I normally try keeping it below 8 GB.
StarWind VSAN, in the current build, does not support VAAI CAW. Yet, I rarely see VAAI CAW commands to be the problem in VSAN's daily operation.
When I RDM a 4TB thick LUN from Synology to one of the vSAN nodes and try to format as XFS from the IP:9090 interface, it seems to "Overwrite existing data with zeroes" even when "Don't overwrite existing data" is selected - it takes many hours to format and I can see it writing ~1k-1.5k IOPS from the Synology UI. While there is no network traffic observed during this time, both Synology and VMware hosts support VAAI.
So, is this RDM connected to Synology? Try with thick provision eager zeroed drive, please.
This activity is not observed when using RDM 4TB thick LUN from Truenas or when using 4TB vmware thick or thin provisioned disks (vmdk).
If the storage array is the only thing that changes, I believe, there might be some odds on the storage side.
Thanks yaroslav!
Now that I am looking closer, it seems that commenting out the lines allows the sync to finish, but even with "cacheMode" and "cacheSize" commented out on both nodes, I end up with imagefile1 with write-back enabled and 128mb cacheSize.
Code: Select all
param($addr="192.168.20.22", $port=3261, $user="root", $password="starwind",
$addr2="192.168.20.23", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="Clear",
$size=1024,
$sectorSize=512,
$failover=0,
$bmpType=1,
$bmpStrategy=0,
#primary node
$imagePath="\mnt\vsan01-01",
$imageName="iscsi-vsan01-vmw-01",
$createImage=$true,
$storageName="",
$targetAlias="iscsi-vsan01-vmw-01",
$autoSynch=$true,
$poolName="",
$syncSessionCount=1,
$aluaOptimized=$true,
#$cacheMode="wb",
#$cacheSize="128",
$syncInterface="#p2=192.168.40.23:3260" -f $addr2,
$hbInterface="#p2=192.168.6.23:3260,192.168.20.23:3260" -f $addr2,
$createTarget=$true,
$bmpFolderPath="",
#secondary node
$imagePath2="\mnt\vsan02-01",
$imageName2="iscsi-vsan02-vmw-01",
$createImage2=$true,
$storageName2="",
$targetAlias2="iscsi-vsan02-vmw-01",
$autoSynch2=$true,
$poolName2="",
$syncSessionCount2=1,
$aluaOptimized2=$false,
#$cacheMode2=$cacheMode,
#$cacheSize2=$cacheSize,
$syncInterface2="#p1=192.168.40.22:3260" -f $addr,
$hbInterface2="#p1=192.168.6.22:3260,192.168.20.22:3260" -f $addr,
$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()
}
After running the script above, I check Starwind Management Console, I see 1GB imagefile1 with Mode=Write-Back and Size=128 MB
Re: Starwind vSAN Free vSphere ESXI Synchronizing stuck at 0%
Posted: Tue Mar 07, 2023 8:21 am
by yaroslav (staff)
Happy it works now. Please note that small amount of Write Back cache will not improve performance, yet, brings the risk of full syn closer. Consider trying running systems with no cache.
Re: Starwind vSAN Free vSphere ESXI Synchronizing stuck at 0%
Posted: Tue Mar 07, 2023 6:53 pm
by vsan
yaroslav (staff) wrote:Happy it works now. Please note that small amount of Write Back cache will not improve performance, yet, brings the risk of full syn closer. Consider trying running systems with no cache.
Thanks yaroslav, but you see in my most recent post, I found that commenting out the cache fields "worked" as in let the sync finish, but I still ended up with write-back enabled with cacheMode and cacheSize commented out.
I ran many tests last night and confirmed this is the case every time:
cacheMode=wb works every time
cacheMode=none never works
#cacheMode = completes build and sync processes but I still get image file with write-back enabled.
Re: Starwind vSAN Free vSphere ESXI Synchronizing stuck at 0%
Posted: Wed Mar 08, 2023 11:58 am
by yaroslav (staff)
cacheMode=none never works
I tried it in my lab and it actually worked. HA with no cache is created.
#cacheMode = completes build and sync processes but I still get image file with write-back enabled.
It also works (device with no cache is created). See my script below
Code: Select all
param($addr="192.168.13.193", $port=3261, $user="root", $password="starwind",
$addr2="192.168.13.194", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="Clear",
$size=12,
$sectorSize=512,
$failover=0,
$bmpType=1,
$bmpStrategy=0,
#primary node
$imagePath="My computer\C\",
$imageName="masterImg23",
$createImage=$true,
$storageName="",
$targetAlias="targetha23",
$autoSynch=$true,
$poolName="pool1",
$syncSessionCount=1,
$aluaOptimized=$true,
#$cacheMode="wb",
$cacheSize=128,
$syncInterface="#p2=172.16.10.20:3260" -f $addr2,
$hbInterface="#p2=172.16.20.20:3260",
$createTarget=$true,
$bmpFolderPath="",
#secondary node
$imagePath2="My computer\C\",
$imageName2="partnerImg24",
$createImage2=$true,
$storageName2="",
$targetAlias2="partnerha24",
$autoSynch2=$true,
$poolName2="pool1",
$syncSessionCount2=1,
$aluaOptimized2=$false,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$syncInterface2="#p1=172.16.10.10:3260" -f $addr,
$hbInterface2="#p1=172.16.20.10:3260",
$createTarget2=$true,
$bmpFolderPath2=""
)
Re: Starwind vSAN Free vSphere ESXI Synchronizing stuck at 0%
Posted: Wed Mar 08, 2023 9:42 pm
by vsan
yaroslav (staff) wrote:cacheMode=none never works
I tried it in my lab and it actually worked. HA with no cache is created.
#cacheMode = completes build and sync processes but I still get image file with write-back enabled.
It also works (device with no cache is created). See my script below
Code: Select all
param($addr="192.168.13.193", $port=3261, $user="root", $password="starwind",
$addr2="192.168.13.194", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="Clear",
$size=12,
$sectorSize=512,
$failover=0,
$bmpType=1,
$bmpStrategy=0,
#primary node
$imagePath="My computer\C\",
$imageName="masterImg23",
$createImage=$true,
$storageName="",
$targetAlias="targetha23",
$autoSynch=$true,
$poolName="pool1",
$syncSessionCount=1,
$aluaOptimized=$true,
#$cacheMode="wb",
$cacheSize=128,
$syncInterface="#p2=172.16.10.20:3260" -f $addr2,
$hbInterface="#p2=172.16.20.20:3260",
$createTarget=$true,
$bmpFolderPath="",
#secondary node
$imagePath2="My computer\C\",
$imageName2="partnerImg24",
$createImage2=$true,
$storageName2="",
$targetAlias2="partnerha24",
$autoSynch2=$true,
$poolName2="pool1",
$syncSessionCount2=1,
$aluaOptimized2=$false,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$syncInterface2="#p1=172.16.10.10:3260" -f $addr,
$hbInterface2="#p1=172.16.20.10:3260",
$createTarget2=$true,
$bmpFolderPath2=""
)
I just copy/pasted yours, changed the IP addresses and imagePath, and ran it many times against fresh installs each time. Same results - commenting it out does not work, setting it to "none" does not work, setting it to "wb" works every time.
I am running this against the Linux ovf on vSphere, not Windows. I wonder if that is the difference?
Code: Select all
param($addr="192.168.20.22", $port=3261, $user="root", $password="starwind",
$addr2="192.168.20.23", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="Clear",
$size=12,
$sectorSize=512,
$failover=0,
$bmpType=1,
$bmpStrategy=0,
#primary node
$imagePath="\mnt\vsan01-01",
$imageName="masterImg23",
$createImage=$true,
$storageName="",
$targetAlias="targetha23",
$autoSynch=$true,
$poolName="pool1",
$syncSessionCount=1,
$aluaOptimized=$true,
#$cacheMode="wb",
$cacheSize=128,
$syncInterface="#p2=192.168.40.23:3260" -f $addr2,
$hbInterface="#p2=192.168.6.23:3260",
$createTarget=$true,
$bmpFolderPath="",
#secondary node
$imagePath2="\mnt\vsan02-01",
$imageName2="partnerImg24",
$createImage2=$true,
$storageName2="",
$targetAlias2="partnerha24",
$autoSynch2=$true,
$poolName2="pool1",
$syncSessionCount2=1,
$aluaOptimized2=$false,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$syncInterface2="#p1=192.168.40.22:3260" -f $addr,
$hbInterface2="#p1=192.168.6.22: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: Starwind vSAN Free vSphere ESXI Synchronizing stuck at 0%
Posted: Thu Mar 09, 2023 10:08 am
by yaroslav (staff)
Hi,
That should not be an issue, yet I will run additional tests.
Re: Starwind vSAN Free vSphere ESXI Synchronizing stuck at 0%
Posted: Fri Mar 10, 2023 4:06 pm
by yaroslav (staff)
I re-ran the test in my lab.
creates a device with no cache
Code: Select all
$cacheMode="none",
$cacheSize=128,
creates device with no cache
creates device with Write-Through cache
To sum up, everything worked as expected. Can you log a call with
support@starwind.com using 881928 and this thread as a reference?
Re: Starwind vSAN Free vSphere ESXI Synchronizing stuck at 0%
Posted: Wed Apr 26, 2023 9:06 am
by Pavel B.
Hello,
We have the same problem too.
When $cacheMode="wb" and $cacheSize=128 synchronizing is OK
When $cacheMode="none" and $cacheSize=0 synchronizing is Fail.
Code: Select all
param($addr="10.64.205.125", $port=3261, $user="root", $password="starwind",
$addr2="10.64.205.135", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="Clear",
$size=12,
$sectorSize=512,
$failover=0,
$bmpType=1,
$bmpStrategy=0,
#primary node
$imagePath="VSA Storage\mnt\stor",
$imageName="masterImg21",
$createImage=$true,
$storageName="",
$targetAlias="targetha21",
$autoSynch=$true,
$poolName="pool1",
$syncSessionCount=1,
$aluaOptimized=$true,
$cacheMode="wb",
$cacheSize=128,
$syncInterface=$("#p2=10.64.205.136:3260" -f $addr2),
$hbInterface=$("#p2=10.64.205.137:3260" -f $addr2),
$createTarget=$true,
$bmpFolderPath="",
#secondary node
$imagePath2="VSA Storage\mnt\stor",
$imageName2="partnerImg22",
$createImage2=$true,
$storageName2="",
$targetAlias2="partnerha22",
$autoSynch2=$true,
$poolName2="pool1",
$syncSessionCount2=1,
$aluaOptimized2=$false,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$syncInterface2=$("#p1=10.64.205.126:3260" -f $addr),
$hbInterface2=$("#p1=10.64.205.127:3260" -f $addr),
$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()
}
- $cacheMode=wb.png (233.98 KiB) Viewed 61006 times
Code: Select all
param($addr="10.64.205.125", $port=3261, $user="root", $password="starwind",
$addr2="10.64.205.135", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="Clear",
$size=12,
$sectorSize=512,
$failover=0,
$bmpType=1,
$bmpStrategy=0,
#primary node
$imagePath="VSA Storage\mnt\stor",
$imageName="masterImg21",
$createImage=$true,
$storageName="",
$targetAlias="targetha21",
$autoSynch=$true,
$poolName="pool1",
$syncSessionCount=1,
$aluaOptimized=$true,
$cacheMode="none",
$cacheSize=0,
$syncInterface=$("#p2=10.64.205.136:3260" -f $addr2),
$hbInterface=$("#p2=10.64.205.137:3260" -f $addr2),
$createTarget=$true,
$bmpFolderPath="",
#secondary node
$imagePath2="VSA Storage\mnt\stor",
$imageName2="partnerImg22",
$createImage2=$true,
$storageName2="",
$targetAlias2="partnerha22",
$autoSynch2=$true,
$poolName2="pool1",
$syncSessionCount2=1,
$aluaOptimized2=$false,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$syncInterface2=$("#p1=10.64.205.126:3260" -f $addr),
$hbInterface2=$("#p1=10.64.205.127:3260" -f $addr),
$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()
}
- $cacheMode=none.png (236.24 KiB) Viewed 61006 times
Thank you!
Regards,
Pavel
Re: Starwind vSAN Free vSphere ESXI Synchronizing stuck at 0%
Posted: Wed Apr 26, 2023 9:34 am
by yaroslav (staff)
$initMethod="Clear", set to "SyncFromFirst"
Please see this thread for more details.
https://forums.starwindsoftware.com/vie ... 3&start=15
Re: Starwind vSAN Free vSphere ESXI Synchronizing stuck at 0%
Posted: Wed Apr 26, 2023 9:57 am
by Pavel B.
Hello, Yaroslav!
Thank very much, you tip helped!
Regards,
Pavel