2HA pair setup

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

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

Post Reply
cre8toruk
Posts: 16
Joined: Fri Jan 22, 2021 5:17 pm

Fri Jan 22, 2021 11:06 pm

Hi Guys,
I'm in need of some step by step for dummies guidance please.
I sort of get what's needed and even managed to get a 2GB volume up and connected by use of the CreateHA_2.ps1 file.
I don't know if there is a guide somewhere but did I mention it needs to be simple for my simple brain :-).

Ok so I have two servers each with internal storage of about 26TB.
Each server has 2 NIC's. The first NIC is connected to the network switch, the second has a direct link cable to the other server.

SERVER1;
NIC1 (LAN) - 192.168.10.200
NIC2 (DIRECT LINK) - 192.168.0.1

SERVER2;
NIC1 (LAN) - 192.168.10.201
NIC2 (DIRECT LINK) - 192.168.0.2

My intention was to use the direct link NIC's for the iscsi traffic & cluster heartbeat and the LAN connected NIC's to be for all other traffic e.g. VM's etc etc.

So I have the powershell file and my parameters i.e. the first bit of the file look a bit like this;

Code: Select all

param($addr="192.168.10.201", $port=3261, $user="root", $password="starwind",
	$addr2="192.168.10.200", $port2=$port, $user2=$user, $password2=$password,
#common
	$initMethod="Clear",
#	$size=24000000,
        $size=2048,
	$sectorSize=512,
	$failover=0,
#primary node
	$imagePath="My computer\V\Starwind",
	$imageName="vmstorage",
	$createImage=$true,
	$storageName="",
	$targetAlias="dr01",
	$autoSynch=$true,
	$poolName="pool1",
	$syncSessionCount=1,
	$aluaOptimized=$true,
	$cacheMode="wb",
	$cacheSize=128,
	$hbInterface="#p2=192.168.10.200:3260,192.168.10.201:3260",
        $syncInterface="#p2=192.168.0.1:3260" -f $addr2,
	$createTarget=$true,
#secondary node
	$imagePath2="My computer\V\Starwind",
	$imageName2="vmstorage",
	$createImage2=$true,
	$storageName2="",
	$targetAlias2="dr02",
	$autoSynch2=$true,
	$poolName2="pool1",
	$syncSessionCount2=1,
	$aluaOptimized2=$false,
	$cacheMode2=$cacheMode,
	$cacheSize2=$cacheSize,
	$syncInterface2="#p1=192.168.0.2:3260" -f $addr,
	$hbInterface2="#p1=192.168.10.201:3260,192.168.10.200:3260",
        $createTarget2=$true
	)
What I've been advised is that the syncinterface<N> should be set to the IP address of the direct link NIC on each server and that the hbinterface<N> should be set to the IP of the LAN connected NIC which would also be the Target IP of the iscsi interface.

That being the case does my config script look correct?
Once I've run this and created my volume, I will then When I then connect my iSCSI Initiator I need to put in the IP address of the local server and the remote server on each node (Server)?

Sorry if this is a bit basic but I'm a bit new Starwind so I wanted to make sure I understood the terminology correctly.

Thanks in advance,

Paul.
yaroslav (staff)
Staff
Posts: 2279
Joined: Mon Nov 18, 2019 11:11 am

Mon Jan 25, 2021 4:56 am

Greetings,

Thank you for your question.
After installing all the roles and features, you need to set up the IP address. Your networking diagram lacks an adapter for iSCSI, please add a dedicated connection for iSCSI.
Then, you need create HA devices (CreateHa.ps1) and extend them to the required size. Please do not forget to create a Witness disk (if that's a Hyper-V cluster) see the complete guide here https://www.starwindsoftware.com/resour ... rver-2016/. If you are using StarWind VSAN for vSphere, let me know.
Once HA devices are extended, please connect them over iSCSI to both nodes (see the guide above for more info).

Let me know if you need more details or have any questions.
cre8toruk
Posts: 16
Joined: Fri Jan 22, 2021 5:17 pm

Tue Jan 26, 2021 11:26 am

Hi Yaroslav, thanks for the reply.
Sorry I'm confused (as always).
I have a LAN adapter setup with both nodes connected to a switch - 192.168.10.0 /24
I have another adapter which links the two servers together - 192.168.0.0 /30, is this not what is being used for the iscsi targets, if not what is it for ?

From the diagram you shared it seems I have to configure a separate iscsi link between the two servers... Looks like I might have to start again.
if I create this where should that feature in the 2HA config script ?


Kind regards,

Paul.
yaroslav (staff)
Staff
Posts: 2279
Joined: Mon Nov 18, 2019 11:11 am

Tue Jan 26, 2021 1:56 pm

Paul,

No worries.
Yes, you need a dedicated physical link for iSCSI (to make it by the book). There is no need to reconfigure everything. You can just set up a new set of IPs and create a new HA device.
In the rescan script iSCSI IP should be added as a heartbeat interface.

Let me know if you need any additional assistance.
cre8toruk
Posts: 16
Joined: Fri Jan 22, 2021 5:17 pm

Tue Jan 26, 2021 2:04 pm

Ok,

so I now have 2 servers with 3 network connections, configured thus;

SERVER1;
NIC1 (LAN) - 192.168.10.200 /24
NIC2 (DIRECT LINK) - 192.168.0.1 /30
NIC3 (DIRECT LINK) - 192.168.0.5 /30

SERVER2;
NIC1 (LAN) - 192.168.10.201 /24 - LAN
NIC2 (DIRECT LINK) - 192.168.0.2 /30 - For Starwind Sync
NIC3 (DIRECT LINK) - 192.168.0.6 /30 - For iScsi

Which IP address goes in which bit of the 2HA script please...
Something like this ?

param($addr="192.168.0.1", $port=3261, $user="root", $password="starwind", - The IP addresses here presumably related to the Starwind VSAN interfaces
$addr2="192.168.0.2", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="Clear",
# $size=24000000,
$size=2048,
$sectorSize=512,
$failover=0,
#primary node
$imagePath="My computer\V\Starwind",
$imageName="vmstorage",
$createImage=$true,
$storageName="",
$targetAlias="dr01",
$autoSynch=$true,
$poolName="pool1",
$syncSessionCount=1,
$aluaOptimized=$true,
$cacheMode="wb",
$cacheSize=128,
$hbInterface="#p2=192.168.10.200:3260,192.168.0.5:3260", - These are the Management & iScsi interfaces for server 1
$syncInterface="#p2=192.168.0.1:3260" -f $addr2, - The SW Sync IP as listed above.
$createTarget=$true,
#secondary node
$imagePath2="My computer\V\Starwind",
$imageName2="vmstorage",
$createImage2=$true,
$storageName2="",
$targetAlias2="dr02",
$autoSynch2=$true,
$poolName2="pool1",
$syncSessionCount2=1,
$aluaOptimized2=$false,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$hbInterface2="#p1=192.168.10.201:3260,192.168.0.6:3260", - The IP for Server 2 LAN and iscsi IP
$syncInterface2="#p1=192.168.0.2:3260" -f $addr, - The IP for the SW Sync interface on Server 2
$createTarget2=$true
)

I'll give it a go and see if it works and report back.
KR

Paul.
cre8toruk
Posts: 16
Joined: Fri Jan 22, 2021 5:17 pm

Tue Jan 26, 2021 2:24 pm

Well, initial signs were good I've got disks created on both servers but the Synchronising bit just basically says 0% on repeat... so it would seem the sync address isn't right.
cre8toruk
Posts: 16
Joined: Fri Jan 22, 2021 5:17 pm

Tue Jan 26, 2021 2:35 pm

ugh... tried changing them to

$syncInterface="#p2=192.168.0.1:3260" -f $addr2,
$hbInterface="#p2=192.168.10.200:3260,192.168.0.5:3260" -f $addr2,

and

$syncInterface2="#p1=192.168.0.2:3260" -f $addr,
$hbInterface2="#p1=192.168.10.201:3260,192.168.0.6:3260" -f $addr,

didn't seem to make any difference... drives are created but the sync just repeats at 0%
yaroslav (staff)
Staff
Posts: 2279
Joined: Mon Nov 18, 2019 11:11 am

Tue Jan 26, 2021 2:38 pm

Paul,

No, just set IPs other way around.
First, use a LAN IP here

param($addr="192.168.0.200", $port=3261, $user="root", $password="starwind", - The IP addresses here presumably related to the Starwind VSAN interfaces
$addr2="192.168.0.201", $port2=$port, $user2=$user, $password2=$password,

$hbInterface="#p2=192.168.10.201:3260,192.168.0.6:3260", - These are the Management & iScsi interfaces for server 2
$syncInterface="#p2=192.168.0.2:3260" -f $addr2, - The SW Sync IP for servrer 2 as listed above.

$hbInterface2="#p1=192.168.10.200:3260,192.168.0.5:3260", - The IP for Server 1 LAN and iscsi IP
$syncInterface2="#p1=192.168.0.1:3260" -f $addr, - The IP for the SW Sync interface on Server 1

See more at the sample script mentioned here https://www.starwindsoftware.com/help/H ... ategy.html.
cre8toruk
Posts: 16
Joined: Fri Jan 22, 2021 5:17 pm

Tue Jan 26, 2021 2:52 pm

Ahhhh well that seemed to do the trick, many thanks for your help.
The link you shared only seems to talk about the config from a Gui point of view.

It would be great if you or someone could show a sample script with some notes against each bit explaining what needs to go where.
It does get very confusing (well especially for my brain (not sure about anyone else)) :-).

Thanks again.



yaroslav (staff) wrote:Paul,

No, just set IPs other way around.
First, use a LAN IP here

param($addr="192.168.0.200", $port=3261, $user="root", $password="starwind", - The IP addresses here presumably related to the Starwind VSAN interfaces
$addr2="192.168.0.201", $port2=$port, $user2=$user, $password2=$password,

$hbInterface="#p2=192.168.10.201:3260,192.168.0.6:3260", - These are the Management & iScsi interfaces for server 2
$syncInterface="#p2=192.168.0.2:3260" -f $addr2, - The SW Sync IP for servrer 2 as listed above.

$hbInterface2="#p1=192.168.10.200:3260,192.168.0.5:3260", - The IP for Server 1 LAN and iscsi IP
$syncInterface2="#p1=192.168.0.1:3260" -f $addr, - The IP for the SW Sync interface on Server 1

See more at the sample script mentioned here https://www.starwindsoftware.com/help/H ... ategy.html.
cre8toruk
Posts: 16
Joined: Fri Jan 22, 2021 5:17 pm

Tue Jan 26, 2021 3:10 pm

Hi again... right sorry both volumes setup on both servers. I can see the disk in disk manager and even format it.
I can't however add it to my cluster for reasons that I don't understand.

Any ideas ?
cre8toruk
Posts: 16
Joined: Fri Jan 22, 2021 5:17 pm

Tue Jan 26, 2021 3:13 pm

Scratch that I was being stupid again ! :-)
yaroslav (staff)
Staff
Posts: 2279
Joined: Mon Nov 18, 2019 11:11 am

Tue Jan 26, 2021 5:07 pm

Hey,

No worries. Good to know that you resolved the problem. Let me know if any assistance is needed.
A good script should be here https://forums.starwindsoftware.com/vie ... p+3#p31505.
Post Reply