Code: Select all
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",
$hbInterface="#p2=172.16.10.231:3260,172.27.31.199:3260",
$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:3260",
$hbInterface2="#p1=172.16.10.230:3260,172.27.31.198:3260",
$createTarget2=$true,
$bmpFolderPath2=""
)
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).
HINT10
root/starwind are the default credentials to communicate with the service. They stay the same regardless of the CVM credentials (we plan to align them in the future)