2 nodes hyper-v windows 2019 standard

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

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

mic77
Posts: 27
Joined: Fri Oct 04, 2024 9:58 pm

Fri Oct 04, 2024 10:11 pm

Hi
I try to deploy free version of VSAN over 2 hyper-v servers based on windows server standard 2019
Both scenarios - native install as windows software / virtual machine still not successful - here comes question which is better / simpler
I have 3 disks on each node (each one 10TB ) connected over LSI mega raid controller - sas3916 - currently configured as raid-5 and shared to os (but can also make them JBOD with 3 directly shared disks ).
I've tried already VSAN as VM scenario with this one big disk directly attached - till using CreateHA_2.ps1 script everything seems be ok .
Each time I try crate HA lun - have error 200
I already tried advice's from other topics - with HA luns creation and still no successful so I become little confused what goes wrong ...
What is better scenario - native install over windows host or deploy VM ?

mic
yaroslav (staff)
Staff
Posts: 3111
Joined: Mon Nov 18, 2019 11:11 am

Sat Oct 05, 2024 2:55 am

Welcome to StarWind Forum.
What is better scenario - native install over windows host or deploy VM ?
It all depends on the use case. Go with the Windows-native application if you have hardware RAID and no plans for NVMe-oF support.
Check this script viewtopic.php?f=5&t=6852&p=37208&hilit=HINT8#p37208.
Make sure to purge the files from the underlying storage, and headers folder under C:\Program Files\StarWind Software\StarWind or /opt/starwind/starwind-virtual-san/drive_c/starwind/headers and *.cfg.
Try using a new name for the file and make sure you removed entries from *.cfg and headers from the self-titled folder and *.swdsk.bak files from the underlying storage.
mic77
Posts: 27
Joined: Fri Oct 04, 2024 9:58 pm

Sat Oct 05, 2024 3:03 pm

Hi
Mentioned headers file newer was created when I tried with vsan as virtual appliance
This is why I'm confused because never achieved this step ( as mentioned always error is number 200 - script I run from windows 2019 machine with hyper-v on which vsan virtual appliance is deployed)

Another question is how I can configure network pools etc over native installation?
Comparing to virtual appliance - native gui does not allow to do anything behind registration of nodes with free license... ?
yaroslav (staff)
Staff
Posts: 3111
Joined: Mon Nov 18, 2019 11:11 am

Sat Oct 05, 2024 5:49 pm

You are absolutely right. UI is disabled by design in FREE version, you need to use the scripts.
You need to configure pools outside of StarWind VSAN. You can use hardware RAID or Storage Spaces.
Can you please still double-check the contents of directories I referred, please?
Did you try using my script and run it locally? Also, having the script and the full error will be helpful. Have a nice weekend.
mic77
Posts: 27
Joined: Fri Oct 04, 2024 9:58 pm

Mon Oct 07, 2024 3:17 pm

ok - so now i have Virtual appliance deployed
to each shared direct disk - 18TB from windows/hyper-v itself
networks configured as in manual
created storage pools (sdb1) from disks and volumes as volume1 on each starwind virtual node
now how I can easy make 2 Luns for iscsi - one 5gb for quorum and one 17Tb for single csv ?
Last edited by mic77 on Mon Oct 07, 2024 4:24 pm, edited 1 time in total.
yaroslav (staff)
Staff
Posts: 3111
Joined: Mon Nov 18, 2019 11:11 am

Mon Oct 07, 2024 3:39 pm

Great news! Thanks for your update.
how I can easy make 2 Luns for iscsi

Use the scripts I shared above.
17Tb for single csv
Best practices recommend using smaller CSVs (up to 6 TB) if possible.
mic77
Posts: 27
Joined: Fri Oct 04, 2024 9:58 pm

Mon Oct 07, 2024 3:51 pm

should I create more then one volume on each node or both LUN's ( for quorum and for CSV ) can be deployed on single one ? ( i understand that starwind vm is simply creating a file for each LUN in that path - or I'm wrong ) - then script from link is only part of that ? ?
(there will be only one VM on cluster but with time not small - this is cutomer request to make single csv ;( = i know that is not the best practice )
mic77
Posts: 27
Joined: Fri Oct 04, 2024 9:58 pm

Mon Oct 07, 2024 4:17 pm

ok so :
172.16.0.21 sw-1 management
172.16.10.10 sw-1 data/heartbeat
172.16.20.10 sw-1 replication
172.16.0.22 sw-2 management
172.16.10.20 sw-2 data/heartbeat
172.16.20.20 sw-2 replication

script :

Code: Select all

param($addr="172.16.0.21", $port=3261, $user="root", $password="starwind",
	$addr2="172.16.0.22", $port2=$port, $user2=$user, $password2=$password,
#common
	$initMethod="NotSynchronize",
	$size=5120,
	$sectorSize=512,
	$failover=0,
	$bmpType=1,
	$bmpStrategy=0,
#primary node
	$imagePath="/mnt/sdb1/volume1",
	$imageName="test1",
	$createImage=$true,
	$storageName="",
	$targetAlias="test1",
	$poolName="sdb1",
	$syncSessionCount=1,
	$aluaOptimized=$true,
	$cacheMode="none",
	$cacheSize=0,
	$syncInterface="#p2={0}:3260" -f "172.16.20.20",
	$hbInterface="#p2=172.16.10.20:3260",
	$createTarget=$true,
	$bmpFolderPath="",
#secondary node
	$imagePath2="/mnt/sdb1/volume1",
	$imageName2="test1",
	$createImage2=$true,
	$storageName2="",
	$targetAlias2="test1",
	$poolName2="sdb1",
	$syncSessionCount2=1,
	$aluaOptimized2=$false,
	$cacheMode2=$cacheMode,
	$cacheSize2=$cacheSize,
	$syncInterface2="#p1={0}:3260" -f "172.16.20.10",
	$hbInterface2="#p2=172.16.10.10:3260",
	$createTarget2=$true,
	$bmpFolderPath2=""
	)
	
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.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.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()
}
and error :

Request to 172.16.0.22 ( 172.16.0.22 ) : 3261
-
control HAImage -CreateHeader:"Headers\test1\test1_HA.swdsk" -pathDirHeaderBackup:"/mnt/sdb1/volume1" -file:"imagefile1" -size:"5120" -Prior
ity:"#p0=1;#p1=0" -nodeType:"#p0=1;#p1=1" -PartnerTargetName:"#p1=iqn.2008-08.com.starwindsoftware:172.16.0.21-test1" -PartnerIP:"#p1=172.16
.20.10:sync:3260:1;#p2=172.16.10.10:heartbeat:3260:1" -IsAutoSynchEnabled:"0" -AuthChapLogin:"#p1=0b" -AuthChapPassword:"#p1=0b" -AuthMChapN
ame:"#p1=0b" -AuthMChapSecret:"#p1=0b" -AuthChapType:"#p1=none" -Offset:"0" -CacheMode:"none" -CacheSizeMB:"0" -serial:"4C1F0B83F6D6678C" -e
ui64:"4C1F0B83F6D6678C" -revision:"0001" -product:"STARWIND" -vendor:"STARWIND" -Replicator:"#p0=0" -WitnessType:"0" -AluaAccessState:"#p0=1
;#p1=0" -typeBitmapStore:"#p1=1"
-
200 Failed: invalid partner info.

lun test1 is created but gui reports :

LUN

test1

The replication partner is not synchronised

sw-1

LUN

test1

Failed to receive a heartbeat from the replication partner 'sw-2'

sw-1mnt

also behind that it was created with errors - i see it over text console on both nodes in path : /mnt/sdb1/volume1/test1.img

the iscsi links refers to ....management network address ;( :
iqn.2008-08.com.starwindsoftware:172.16.0.21-test1, iqn.2008-08.com.starwindsoftware:172.16.0.22-test1

another question is time server configuration (shared source ) ? there is no ntp or chrony installed ...
yaroslav (staff)
Staff
Posts: 3111
Joined: Mon Nov 18, 2019 11:11 am

Mon Oct 07, 2024 5:32 pm

Let me answer some of the questions.
should I create more then one volume on each node
You can create one VOLUME where you will store multiple LUNs
I understand that starwind vm is simply creating a file for each LUN in that path - or I'm wrong
Yes, you are right.
Then script from link is only part of that ? ?
Create VOLUME on each node, than run the CreateHA script

The script is not correct. It does not create heartbeat links over multiple channels see viewtopic.php?f=5&t=6852&p=37208&hilit=HINT8#p37208.

From the error you get, it does create the LUN, yet cannot establish replication. Please check the networks to be able to ping the counterpart and make sure the MTU is aligned on iSCSI and Synchronization stacks.
Make sure that iSCSI Target Server is not installed in features in Windows Server.
he iscsi links refers to ....management network address ;( :
iqn.2008-08.com.starwindsoftware:172.16.0.21-test1, iqn.2008-08.com.starwindsoftware:172.16.0.22-test1
This is the target name. It is not an IP that is used to connect the device as you specify IP in the initiator. This line simply tells that "target called test1 was created using 172.16.0.2* to run the script". It is a cosmetic thing.

P.S.Consider getting a tour around the solution with one of our techs https://www.starwindsoftware.com/v17-request-live-demo and trialing it https://www.starwindsoftware.com/free-s ... vsan-trial (Free key cannot replace the Trial one). Trialing and demo will help you to understand the solution.
mic77
Posts: 27
Joined: Fri Oct 04, 2024 9:58 pm

Mon Oct 07, 2024 6:01 pm

each network is pingable - mtu i set everywhere to 1500 on each layer
no - iscsi target server is not installed on both hypervisors

about the script and config - in manual / design on picture - heartbeat network is described as same one for data access (i understand that this is iscsi network part ) and is not mentioned that heartbeat should go over more than one segment

then HA - i modified creation part according to Your advice (behind multiple heartbeat networks ) and this script already have Ha device promotion
so = should it be all divided to 2 tasks ? one create volume then second start mirroring ?
i feel confused again simply about...

then again what about time - your appliance does not have any time sync services installed (ntp/chrony client ) syncing with hypervisior integration as vm machine type 1 = is not the best option especially that I observe some difference ( in my opinion this is one of critical thing ) - i used datacore massively in past and time sync was one of obligatory thing to config
Last edited by mic77 on Mon Oct 07, 2024 6:23 pm, edited 3 times in total.
yaroslav (staff)
Staff
Posts: 3111
Joined: Mon Nov 18, 2019 11:11 am

Mon Oct 07, 2024 6:09 pm

Thanks for your update. Please take the script I shared above and just add your variables to it. Make sure to clean up the entries as before (StarWind.cfg, /opt/starwind/starwind-virtual-san/drive_c/starwind/headers, and /mnt/sdb1/volume1).
mic77
Posts: 27
Joined: Fri Oct 04, 2024 9:58 pm

Mon Oct 07, 2024 6:25 pm

so syncInterface="#p2=172.16.20.231:3260,172.27.21.231:3260", - is mirroring interface ?
then $hbInterface="#p2=172.16.10.231:3260,172.27.31.199:3260", is heartbeat and can be more then one segment ?
yes ?
mic77
Posts: 27
Joined: Fri Oct 04, 2024 9:58 pm

Mon Oct 07, 2024 7:05 pm

so : script :

Code: Select all

param($addr="172.16.0.21", $port=3261, $user="root", $password="starwind",
	$addr2="172.16.0.22", $port2=$port, $user2=$user, $password2=$password,
#common
	$initMethod="NotSynchronize",
	$size=5120,
	$sectorSize=512,
	$failover=0,
	$bmpType=1,
	$bmpStrategy=0,
#primary node
	$imagePath="/mnt/sdb1/volume1",
	$imageName="test1",
	$createImage=$true,
	$storageName="",
	$targetAlias="test1",
	$poolName="sdb1",
	$syncSessionCount=1,
	$aluaOptimized=$true,
	$cacheMode="none",
	$cacheSize=0,
	$syncInterface="#p2=172.16.20.20:3260",
	$hbInterface="#p2=172.16.10.20:3260,172.16.0.22:3260",
	$createTarget=$true,
	$bmpFolderPath="",
#secondary node
	$imagePath2="/mnt/sdb1/volume1",
	$imageName2="test1",
	$createImage2=$true,
	$storageName2="",
	$targetAlias2="test1",
	$poolName2="sdb1",
	$syncSessionCount2=1,
	$aluaOptimized2=$false,
	$cacheMode2=$cacheMode,
	$cacheSize2=$cacheSize,
	$syncInterface2="#p1=172.16.20.10:3260",
	$hbInterface2="#p1=172.16.10.10:3260,172.16.0.21:3260",
	$createTarget2=$true,
	$bmpFolderPath2=""
	)
	
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.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.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()
}

then: Synchronizing: 0%
Synchronizing: 0%
Synchronizing: 0%
Synchronizing: 0%
Synchronizing: 0%
Synchronizing: 0%
Synchronizing: 0%
Synchronizing: 0%
Synchronizing: 0%

and stuck at this point ....still 0%

and in gui .... :


LUN test1 The replication partner is not synchronised sw-2

LUN test1 The replication partner is not synchronised sw-1

LUN test1 Failed to receive a heartbeat from the replication partner 'sw-2' sw-1

and 7 sessions opened on one side
yaroslav (staff)
Staff
Posts: 3111
Joined: Mon Nov 18, 2019 11:11 am

Mon Oct 07, 2024 7:13 pm

Something is not OK with the sync networks, I believe.
Do you have SRIOV enabled for the adapters? If so, try disabling it.
mic77
Posts: 27
Joined: Fri Oct 04, 2024 9:58 pm

Mon Oct 07, 2024 7:20 pm

I can easy ping each direction each segment etc

yes - it is enabled also VMQ

btw - first probe i stopped and cleaned manually

second finished like that :

n times = Synchronizing: 0%
Error:
Connection lost
Error:
At C:\Users\Administrator.MV\Desktop\CreateHA_2_test1_5g_r.ps1:121 char:2
+ $server.Disconnect()
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException
Post Reply