Quantcast
Channel: StarWind Software
Viewing all articles
Browse latest Browse all 786

StarWind Virtual SAN (VSAN) [+Free], HCI Appliance (HCA), Virtual HCI Appliance (VHCA) [+Free] • StarWind VSAN CreateHA_2.ps1 sample for CVM

$
0
0

Code:

param($addr="172.27.31.198", $port=3261, $user="root", $password="starwind",$addr2="172.27.31.199", $port2=$port, $user2=$user, $password2=$password,#common$initMethod="NotSynchronize",$size=1024,$sectorSize=512,$failover=0,$bmpType=1,$bmpStrategy=0,#primary node$imagePath="/mnt/sdb1/volume1",$imageName="test2",$createImage=$true,$storageName="",$targetAlias="test2",$poolName="pool1",$syncSessionCount=1,$aluaOptimized=$true,$cacheMode="none",$cacheSize=0,$syncInterface="#p2=172.16.20.231:3260,172.27.21.231:3260" -f $addr2,$hbInterface="#p2=172.16.10.231:3260,172.27.31.199:3260" -f $addr2,$createTarget=$true,$bmpFolderPath="",#secondary node$imagePath2="/mnt/sdb1/volume1",$imageName2="test2",$createImage2=$true,$storageName2="",$targetAlias2="test2",$poolName2="pool1",$syncSessionCount2=1,$aluaOptimized2=$false,$cacheMode2=$cacheMode,$cacheSize2=$cacheSize,$syncInterface2="#p1=172.16.20.230:3260,172.27.21.230" -f $addr,$hbInterface2="#p1=172.16.10.230:3260,172.27.31.198:3260" -f $addr,$createTarget2=$true,$bmpFolderPath2="")
That's the top section of the script.
Parameters description can be found here https://www.starwindsoftware.com/resour ... chine-cvm/

HINT1
initMethod can be
NotSynchronize - skips synchronization (works ONLY IF THERE IS NO DATA TO SKIP THE ORIGINAL SYNCHRONIZATION).
Clear - default
SyncFromFirst or SyncFromSecond or SyncFromThird - runs full synchronization from the specific node. Use it for recreating replicas.

HINT2
Size is in MB.

HINT3
Check more on bitmap types here https://knowledgebase.starwindsoftware. ... a-devices/.
If you are not sure which one to choose or if there is no faster storage than the DATA disk connected, leave it as is.

HINT4
/ and \ in imagePath are not the same :)

HINT5
imageName can be whatever you like and aligns with ASCII. I always use the same name for simplicity.

HINT6
storageName is used only if you plan adding the partner to the existing device. For CreateHA_2.ps1 use, leave it as is.

HINT7
Do not change poolName.

HINT8
Before turning on the cache read these KBs
How cache works https://knowledgebase.starwindsoftware. ... rinciples/
How to remove RAM cache https://knowledgebase.starwindsoftware. ... -l1-cache/ and SSD cache
Full synchronization causes https://knowledgebase.starwindsoftware. ... may-start/
What to do in case of blackout (sync may not start automatically after power failures/restart mishandles when the write-back cache is on) https://knowledgebase.starwindsoftware. ... -blackout/

HINT9
Make sure that at least one StarWind comm goes over a different NIC to avoid split-brain https://www.starwindsoftware.com/blog/w ... -avoid-it/
More at https://www.starwindsoftware.com/system-requirements
You are welcome to add multiple $syncInterface= and $hbInterface= IPs (yes, you need to type the IP address of the partner as a value).

Statistics: Posted by yaroslav (staff) — Sat Aug 03, 2024 8:38 pm



Viewing all articles
Browse latest Browse all 786

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>