Page 1 of 2
Virtual San Free - HA
Posted: Thu Jan 06, 2022 11:59 am
by the_extremist
Hello, I trying to create HA device and have some problems with heartbeat
This is the script
Code: Select all
param($addr="192.168.110.2", $port=3261, $user="root", $password="starwind",
$addr2="192.168.110.3", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="Clear",
$size=12251,
$sectorSize=512,
$failover=0,
#primary node
$imagePath="My computer\D\vm-srv-ftp",
$imageName="node-01-vm-srv-ftp",
$createImage=$true,
$storageName="",
$targetAlias="node-01-vm-srv-ftp",
$autoSynch=$true,
$poolName="pool1",
$syncSessionCount=1,
$aluaOptimized=$true,
$cacheMode="wb",
$cacheSize=128,
$syncInterface="#p2=192.168.230.2:3260" -f $addr2,
$hbInterface="#p2=192.168.8.43:3260,192.168.110.3:3260" -f $addr2,
$createTarget=$true,
#secondary node
$imagePath2="My computer\D\vm-srv-ftp",
$imageName2="node-02-vm-srv-ftp",
$createImage2=$true,
$storageName2="",
$targetAlias2="node-02-vm-srv-ftp",
$autoSynch2=$true,
$poolName2="pool1",
$syncSessionCount2=1,
$aluaOptimized2=$false,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$syncInterface2="#p1=192.168.230.1:3260" -f $addr,
$hbInterface2="#p1=192.168.8.3:3260,192.168.110.2:3360" -f $addr,
$createTarget2=$true
)
Import-Module StarWindX
try
{
Enable-SWXLog
$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
#
# 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
$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()
}
On node-01 everything seems to be good
but on the node-02 I have heartbeat problem
What's wrong ? I use free version
Re: Virtual San Free - HA
Posted: Thu Jan 06, 2022 12:45 pm
by yaroslav (staff)
Hi,
Try pinging the IP in question from the 01.
Re: Virtual San Free - HA
Posted: Thu Jan 06, 2022 1:23 pm
by the_extremist
Hello, I changed the networks and recreate HAImage. Now it looks like this:
Code: Select all
param($addr="192.168.110.2", $port=3261, $user="root", $password="starwind",
$addr2="192.168.110.3", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="Clear",
$size=300000,
$sectorSize=512,
$failover=0,
#primary node
$imagePath="My computer\D\vm-storage",
$imageName="node-01-vm-storage",
$createImage=$true,
$storageName="",
$targetAlias="node-01-vm-storage",
$autoSynch=$true,
$poolName="pool1",
$syncSessionCount=1,
$aluaOptimized=$true,
$cacheMode="wb",
$cacheSize=128,
$syncInterface="#p2=192.168.110.3:3260" -f $addr2,
$hbInterface="#p2=192.168.8.43:3260,192.168.230.3:3260" -f $addr2,
$createTarget=$true,
#secondary node
$imagePath2="My computer\D\vm-storage",
$imageName2="node-02-vm-storage",
$createImage2=$true,
$storageName2="",
$targetAlias2="node-02-vm-storage",
$autoSynch2=$true,
$poolName2="pool1",
$syncSessionCount2=1,
$aluaOptimized2=$false,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$syncInterface2="#p1=192.168.110.2:3260" -f $addr,
$hbInterface2="#p1=192.168.8.3:3260,192.168.230.2:3360" -f $addr,
$createTarget2=$true
)
Import-Module StarWindX
try
{
Enable-SWXLog
$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
#
# 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
$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()
}
I can ping from 01 to 02 and from 02 to 01 on all networks
Re: Virtual San Free - HA
Posted: Thu Jan 06, 2022 1:53 pm
by yaroslav (staff)
192.168.230.2 is located on 192.168.110.2. Try pinging 192.168.110.2 from 192.168.110.3.
Re: Virtual San Free - HA
Posted: Thu Jan 06, 2022 2:08 pm
by the_extremist
Yes, 192.168.230.2 and 192.168.110.2 are on the same server (01)
Ping is working as I said. Below from 02 to 01

Re: Virtual San Free - HA
Posted: Thu Jan 06, 2022 2:32 pm
by yaroslav (staff)
1. Do you have the IP address in question listed among the networks on 01? In StarWind Management Console, go to Networks tab.
2. Do you have iSCSI File Server role installed?
3. Try removing the HB interface and re-adding it back. You can modify the respective _HA.swdsk while the service is stopped.
Re: Virtual San Free - HA
Posted: Thu Jan 06, 2022 3:04 pm
by the_extremist
Hey, found the problem.
Now everything is working fine

Thanks
Re: Virtual San Free - HA
Posted: Thu Jan 06, 2022 3:27 pm
by yaroslav (staff)
Glad to know that everything is operational now. Thank you!
Re: Virtual San Free - HA
Posted: Fri Jan 07, 2022 3:27 pm
by the_extremist
Could you tell me how can I add next HAImages on the same target ? I mean next HA image with different lun on the same target ?
Now I trying to set second image, it's look like this, but when the syncro was finished it start it again..
First I use this code
Code: Select all
param($addr="192.168.110.2", $port=3261, $user="root", $password="starwind",
$addr2="192.168.110.3", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="Clear",
$size=3000,
$sectorSize=512,
$failover=0,
#primary node
$imagePath="My computer\D\vm-storage",
$imageName="node-01-vm-storage",
$createImage=$true,
$storageName="",
$targetAlias="node-01-vm-storage",
$autoSynch=$true,
$poolName="pool1",
$syncSessionCount=1,
$aluaOptimized=$true,
$cacheMode="wb",
$cacheSize=128,
$syncInterface="#p2=192.168.110.3:3260" -f $addr2,
$hbInterface="#p2=192.168.231.3:3260,192.168.140.3:3260" -f $addr2,
$createTarget=$true,
#secondary node
$imagePath2="My computer\D\vm-storage",
$imageName2="node-02-vm-storage",
$createImage2=$true,
$storageName2="",
$targetAlias2="node-02-vm-storage",
$autoSynch2=$true,
$poolName2="pool1",
$syncSessionCount2=1,
$aluaOptimized2=$false,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$syncInterface2="#p1=192.168.110.2:3260" -f $addr,
$hbInterface2="#p1=192.168.231.2:3260,192.168.140.2:3260" -f $addr,
$createTarget2=$true
)
Import-Module StarWindX
try
{
Enable-SWXLog
$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
#
# 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
$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()
}
Start-Sleep -Seconds 10
Then this
Code: Select all
param($addr="192.168.110.2", $port=3261, $user="root", $password="starwind",
$addr2="192.168.110.3", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="Clear",
$size=3000,
$sectorSize=512,
$failover=0,
#primary node
$imagePath="My computer\D\vm-storage",
$imageName="node-01-vm-storage1",
$createImage=$true,
$storageName="",
$targetAlias="node-01-vm-storage",
$autoSynch=$true,
$poolName="pool1",
$syncSessionCount=1,
$aluaOptimized=$true,
$cacheMode="wb",
$cacheSize=128,
$syncInterface="#p2=192.168.110.3:3260" -f $addr2,
$hbInterface="#p2=192.168.231.3:3260,192.168.140.3:3260" -f $addr2,
$createTarget=$false,
#secondary node
$imagePath2="My computer\D\vm-storage",
$imageName2="node-02-vm-storage1",
$createImage2=$true,
$storageName2="",
$targetAlias2="node-02-vm-storage",
$autoSynch2=$true,
$poolName2="pool1",
$syncSessionCount2=1,
$aluaOptimized2=$false,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$syncInterface2="#p1=192.168.110.2:3260" -f $addr,
$hbInterface2="#p1=192.168.231.2:3260,192.168.140.2:3260" -f $addr,
$createTarget2=$false
)
Import-Module StarWindX
try
{
Enable-SWXLog
$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
#
# 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
$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()
}
Start-Sleep -Seconds 10
It's look like this, but as I said the synchronizing working all the time

Re: Virtual San Free - HA
Posted: Sat Jan 08, 2022 1:27 pm
by yaroslav (staff)
It is not recommended to add the HA image to the same target.
Each HA needs its own target.
Re: Virtual San Free - HA
Posted: Sat Jan 08, 2022 1:45 pm
by the_extremist
Ok, understood. Have another question about synchronization. It's take so long on 30GB disk and 10Gb link. In performance I cannot see any traffic, whats the problem ?

Re: Virtual San Free - HA
Posted: Sat Jan 08, 2022 8:37 pm
by yaroslav (staff)
Synchronization speed is not only about the network but the storage configuration. What is the underlying storage configuration?
Re: Virtual San Free - HA
Posted: Sat Jan 08, 2022 9:10 pm
by the_extremist
RAID 10 on 4xSSD Samsung 870 EVO 1TB. HP 380 G9 with P840 raid controller
Servers are connected directly with 3 networks 10 GB each.
Iperf show about 9.5 Gbps
Re: Virtual San Free - HA
Posted: Sat Jan 08, 2022 11:42 pm
by yaroslav (staff)
Are they dedicated connections or used for anything else?
Re: Virtual San Free - HA
Posted: Wed Jan 26, 2022 10:02 am
by jackjohnson
yaroslav (staff) wrote:Hi,
Try pinging the IP in question from the 01.
REALLY?