StarWind vSAN Free..

Software-based VM-centric and flash-friendly VM storage + free version
yaroslav (staff)
Staff
Posts: 4309
Joined: Mon Nov 18, 2019 11:11 am

Sat Jul 26, 2025 6:27 am

Thanks. Are the replication channels connected directly, and can you ping them ?
Please also assign the IPs from different subnets.
IPs are mixed up. Please refer to the 2nd node under first node area and to the 1st under the 2nd node. Also, do not use the same IP twice.
tanjum
Posts: 34
Joined: Mon Jul 21, 2025 12:02 pm

Sat Jul 26, 2025 10:59 am

Thanks yaroslav..

All IP addresses are reachable..

After making the relevant IP changes, the script now ends without any information, there are no errors, the LUN created is only 1GB..

Code: Select all

root@vSAN1:/mnt/md0/vSANStrg# ll
total 1048592
drwxr-xr-x 3 root root        112 Jul 26 11:29 ./
drwxr-xr-x 3 root root       4096 Jul 25 20:16 ../
-rw-r--r-- 1 root root         33 Jul 25 20:17 starwind-volume-config.json
drwxr-xr-x 2 root root          6 Jul 25 20:18 vsn/
-rw-r--r-- 1 root root       4096 Jul 26 11:29 vsn_HA.swdsk.bak
-rw-r--r-- 1 root root 1073741824 Jul 26 11:29 vsn.img
-rw-r--r-- 1 root root       4096 Jul 26 11:29 vsn.swdsk.bak
root@vSAN1:/mnt/md0/vSANStrg# ll vsn
total 0
drwxr-xr-x 2 root root   6 Jul 25 20:18 ./
drwxr-xr-x 3 root root 112 Jul 26 11:29 ../
root@vSAN1:/mnt/md0/vSANStrg#
Below are my storage configurations [physical disks, pools, volumes]..

https://i.imgur.com/Y16DFJR.png

Code: Select all

param($addr="192.168.30.225", $port=3261, $user="root", $password="starwind",
      $addr2="192.168.30.226", $port2=$port, $user2=$user, $password2=$password,
#common
	$initMethod="NotSynchronize",
	$size=1024,
	$sectorSize=512,
	$failover=0,
	$bmpType=1,
	$bmpStrategy=0,
#primary node
	$imagePath="/mnt/md0/vSANStrg",
	$imageName="vsn",
	$createImage=$true,
	$storageName="",
	$targetAlias="vsn",
	$poolName="pool1",
	$syncSessionCount=1,
	$aluaOptimized=$true,
	$cacheMode="none",
	$cacheSize=0,
	$syncInterface="#p2=192.168.35.226:3260,192.168.40.226:3260",
	$hbInterface="#p2=192.168.45.226:3260,192.168.30.226:3260",
	$createTarget=$true,
	$bmpFolderPath="",
#secondary node
	$imagePath2="/mnt/md0/vSANStrg",
	$imageName2="vsn",
	$createImage2=$true,
	$storageName2="",
	$targetAlias2="vsn",
	$poolName2="pool1",
	$syncSessionCount2=1,
	$aluaOptimized2=$false,
	$cacheMode2=$cacheMode,
	$cacheSize2=$cacheSize,
	$syncInterface2="#p1=192.168.35.225:3260,192.168.40.225:3260",
	$hbInterface2="#p1=192.168.45.225:3260,192.168.30.225:3260",
	$createTarget2=$true,
	$bmpFolderPath2=""
 )
	
Import-Module StarWindX

try
{
	Enable-SWXLog -level SW_LOG_LEVEL_DEBUG

	$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
	$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.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
	$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()
}
yaroslav (staff)
Staff
Posts: 4309
Joined: Mon Nov 18, 2019 11:11 am

Sun Jul 27, 2025 8:08 am

Thanks for your update. How does the WEB UI look like now?
tanjum
Posts: 34
Joined: Mon Jul 21, 2025 12:02 pm

Sun Jul 27, 2025 10:43 am

yaroslav (staff) wrote:
Sun Jul 27, 2025 8:08 am
Thanks for your update. How does the WEB UI look like now?
Thanks Yaroslav,

I'm afraid nothing changed, still showing just 1 GB LUN, no errors, or failure alerts..

https://i.imgur.com/H21ZwxB.png
yaroslav (staff)
Staff
Posts: 4309
Joined: Mon Nov 18, 2019 11:11 am

Sun Jul 27, 2025 12:08 pm

Hi,
it seems to be created successfully: The LUN is in HA. The script you shared below creates 1GB device. (Size is in MB)
tanjum
Posts: 34
Joined: Mon Jul 21, 2025 12:02 pm

Sun Jul 27, 2025 2:54 pm

yaroslav (staff) wrote:
Sun Jul 27, 2025 12:08 pm
it seems to be created successfully: The LUN is in HA. The script you shared below creates 1GB device. (Size is in MB)
Understood, and appreciate all the help, will do a different build to understand it better..
yaroslav (staff)
Staff
Posts: 4309
Joined: Mon Nov 18, 2019 11:11 am

Sun Jul 27, 2025 3:28 pm

I am happy I could help!
Just a friendly advice (I really want to help you getting more into VSAN): Try TRIAL: you can reach out to my colleague who sent you the key for a tech call or demo to help you understanding more the peoduct.
Note that free cannot be armwd after trial.
tanjum
Posts: 34
Joined: Mon Jul 21, 2025 12:02 pm

Sun Jul 27, 2025 8:21 pm

Thanks yaroslav,

I understand, however, at the moment the management is not keen on spending more which why I'm out looking for a free solution.

I will need some time to get the system up and working, and then I can propose the management to go for the paid version.

Since I only have 1 storage server at the moment, how can I configure the script to setup the LUN on the 1st server, do I just remove Secondary Node and its references from the script ?
tanjum
Posts: 34
Joined: Mon Jul 21, 2025 12:02 pm

Mon Jul 28, 2025 11:15 am

Since I only have 1 storage server at the moment, how can I configure the script to setup the LUN on the 1st server, do I just remove Secondary Node and its references from the script ?

I tried the code for a Single Node, it requires the secondNode information so I'm not sure if it works with a Single Node, can you please advise..

Thanks..
tanjum
Posts: 34
Joined: Mon Jul 21, 2025 12:02 pm

Tue Jul 29, 2025 8:24 am

Thanks yaroslav for all the help..

Found the script that creates LUN for a single node in the link..

viewtopic.php?f=5&t=6891
yaroslav (staff)
Staff
Posts: 4309
Joined: Mon Nov 18, 2019 11:11 am

Tue Jul 29, 2025 8:49 am

Sorry for the delay.
I am glad you fixed it.
P.s. make sure not to use write-back caching for VSAN.
tanjum
Posts: 34
Joined: Mon Jul 21, 2025 12:02 pm

Tue Jul 29, 2025 9:28 am

No worries yaroslav,

So the plan was as follows, test create a Single node (as is the current situation), then add a second node in HA (this is what I'm testing)..

I have however, noted the following that the pool fails to create, this was tested in 2 different VMs, and shows the below error..

Code: Select all

One or more errors occurred. (Create pool on appliance 'vSAN2' failed: One or more errors occurred. (Error 1: . Warning: Not all of the space available
to /dev/sda appears to be used, you can fix the GPT to use all of the space (an extra 2097152 blocks) or continue with the current setting?

Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sro has been opened read-only. Error: Invalid partition table - recursive partition on /dev/sr0.
Fail
https://imgur.com/a/Du23jvT

Interestingly its pointing to /dev/sda which is where the StarWind system is installed and not the pool as the pool are NVME devices..
yaroslav (staff)
Staff
Posts: 4309
Joined: Mon Nov 18, 2019 11:11 am

Tue Jul 29, 2025 10:21 am

Hi,

Check the path. Browse to the intended device location via terminal.
tanjum
Posts: 34
Joined: Mon Jul 21, 2025 12:02 pm

Tue Jul 29, 2025 11:10 am

Thanks yaroslav,

As this is being tested in VMware Workstation, this seems to be an issue when the VM is suspended, I created a new VM, not showing this issue..

Currently I have added the second node in HA, and its storage pool, and volumes created..

The existing LUN is showing as Standalone with a size of 292.56 GB, the 2nd storage also has the same capacity available.

Can I change the existing LUN from Standalone to HA, and extend its size ?

I deleted the existing LUN ran the CreateHA_2.ps1 and it shows

Code: Select all

Request to  192.168.30.151 ( 192.168.30.151 ) : 3261
-
control ImageFile -CreateImage:"/mnt/md0/vol1\vlab.img" -Size:"598100" -Flat:"True" -DeferredInit:"True" -Password:"starwind"
-
200 Failed: There is not enough space on the disk..
yaroslav (staff)
Staff
Posts: 4309
Joined: Mon Nov 18, 2019 11:11 am

Tue Jul 29, 2025 11:20 am

Hi,

Sadly there's no script for that. Let me please figure it out internally.
Post Reply