Help rebuilding second node in CVM setup with Starwind VSAN Free

Software-based VM-centric and flash-friendly VM storage + free version
Post Reply
tornadoman625
Posts: 5
Joined: Tue Feb 03, 2026 6:30 pm

Tue Feb 03, 2026 6:36 pm

Due to some issues, I had to recreate one of my two Starwind nodes, running on the starwind CVM, with a free license. All data is still intact on the functioning node. I have successfully used the "removeHAPartner" Powershell script, and removed any remininats of swdisks, headers, or references in the starwind.cfg file on the rebuilt node. The issue, is that when I attempt to run the "addHAPartner" Powershell script, I get this error:

Code: Select all

Request to  10.1.0.8 ( 10.1.0.8 ) : 3261
-
control ImageFile -CreateImage:"/mnt/zd0/CustomerSensitiveIsengard\CustomerSensitiveIsengard.img" -Size:"3580000" -Flat:"True" -DeferredInit:"True" -Password:"<REDACTED>"
-
200 Failed: operation cannot be completed..
Here is the the "addHAPartner" script I am using:

Code: Select all

param($addr="10.1.0.4", $port=3261, $user="<REDACTED>", $password="<REDACTED>", $deviceName="HAImage7",
$addr2="10.1.0.8", $port2=$port, $user2=$user, $password2=$password,
#secondary node
$imagePath2="/mnt/zd0/CustomerSensitiveIsengard",
$imageName2="CustomerSensitiveIsengard",
$createImage2=$true,
$targetAlias2="CustomerSensitiveHA2",
$autoSynch2=$true,
$poolName2="pool1",
$syncSessionCount2=1,
$aluaOptimized2=$true,
$syncInterface2="#p1=172.16.2.1:3260,172.16.3.1:3260",
    $hbInterface2="#p1=172.16.0.1:3260,172.16.1.1:3260",
$bmpType=1,
$bmpStrategy=0,
$bmpFolderPath="",
    $selfSyncInterface="#p2=172.16.2.2:3260,172.16.3.2:3260",
    $selfHbInterface="#p2=172.16.0.2:3260,172.16.1.2:3260"
)

Import-Module StarWindX

try
{
    Enable-SWXLog
    
    $server = New-SWServer $addr $port $user $password
    $server.Connect()

$device = Get-Device $server -name $deviceName
if( !$device )
{
Write-Host "Device not found" -foreground red
return
}

    $node = new-Object Node
    $node.HostName = $addr2
    $node.HostPort = $port2
    $node.Login = $user2
    $node.Password = $password2
    $node.ImagePath = $imagePath2
    $node.ImageName = $imageName2
    $node.CreateImage = $createImage2
    $node.TargetAlias = $targetAlias2
    $node.SyncInterface = $syncInterface2
    $node.HBInterface = $hbInterface2
$node.AutoSynch = $autoSynch2
$node.SyncSessionCount = $syncSessionCount2
$node.ALUAOptimized = $aluaOptimized2
$node.PoolName = $poolName2
$node.BitmapStoreType = $bmpType
$node.BitmapStrategy = $bmpStrategy
$node.BitmapFolderPath = $bmpFolderPath

    Add-HAPartner $device $node $selfSyncInterface $selfHbInterface $selfBmpFolderPath
}
catch
{
Write-Host $_ -foreground red 
}
finally
{
$server.Disconnect()
}
And for reference, here is the script I used to create the HA device initially:

Code: Select all

param($addr="10.1.0.4", $port=3261, $user="<REDACTED>", $password="<REDACTED>",
$addr2="10.1.0.8", $port2=$port, $user2=$user, $password2=$password,
#common
$initMethod="NotSynchronize",
$size=3580000,
$sectorSize=512,
$failover=0,
$bmpType=1,
$bmpStrategy=0,
#primary node
$imagePath="/mnt/zd0/CustomerSensitiveMordor",
$imageName="CustomerSensitiveMordor",
$createImage=$true,
$storageName="",
$targetAlias="CustomerSensitiveHA1",
$poolName="pool1",
$syncSessionCount=1,
$aluaOptimized=$true,
$cacheMode="none",
$cacheSize=0,
$syncInterface="#p2=172.16.2.2:3260,172.16.3.2:3260",
$hbInterface="#p2=172.16.0.2:3260,172.16.1.2:3260",
$createTarget=$true,
$bmpFolderPath="",
#secondary node
$imagePath2="/mnt/zd0/CustomerSensitiveIsengard",
$imageName2="CustomerSensitiveIsengard",
$createImage2=$true,
$storageName2="",
$targetAlias2="CustomerSensitiveHA2",
$poolName2="pool1",
$syncSessionCount2=1,
$aluaOptimized2=$false,
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$syncInterface2="#p1=172.16.2.1:3260,172.16.3.1:3260",
$hbInterface2="#p1=172.16.0.1:3260,172.16.1.1: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()
}
The volume on the second node exists, and is copy and pasted straight from the CVM web interface...

Any thoughts?
yaroslav (staff)
Staff
Posts: 4309
Joined: Mon Nov 18, 2019 11:11 am

Tue Feb 03, 2026 6:47 pm

Try using root/starwind.
Also, try moving the IP addresses around so that p1 refers to the 2nd node while p2 refers to the first.
tornadoman625
Posts: 5
Joined: Tue Feb 03, 2026 6:30 pm

Tue Feb 03, 2026 7:03 pm

yaroslav (staff) wrote:
Tue Feb 03, 2026 6:47 pm
Try using root/starwind.
Also, try moving the IP addresses around so that p1 refers to the 2nd node while p2 refers to the first.
Thanks for the response,

On your first point, I am authenticating to the Starwind appliances correctly, just removed the username and password from my post for security reasons.

I moved the IP addresses around, and I believe that was indeed part of my problem. Originally the first node would complain about not having a heartbeat or sync connection after running the command; that is no longer the case. Unfortunately I am still seeing the error:

Code: Select all

Request to  10.1.0.8 ( 10.1.0.8 ) : 3261
-
control ImageFile -CreateImage:"/mnt/zd0/CustomerSensitiveIsengard\CustomerSensitiveIsengard.img" -Size:"3580000" -Flat:"True" -DeferredInit:"True" -Password:"<Redacted>"
-
200 Failed: operation cannot be completed.. 
While looking through the logs, I did find this entry that seems to be related.:

Code: Select all

2/3 18:56:09.342708 18d FileBrowser: CFileBrowser::command: Return param: 'DiskSize' = 'Failed: invalid path provided'
Whats weird is the path I'm giving it is valid. I am noticing the backslash before the disk image, but I've notice when I use the CreateHADevice scripts in the past, it shows the path the same way, but that doesn't fail.
yaroslav (staff)
Staff
Posts: 4309
Joined: Mon Nov 18, 2019 11:11 am

Tue Feb 03, 2026 7:44 pm

Yes, I also noticed that bit. Can you try using a different slash?
tornadoman625
Posts: 5
Joined: Tue Feb 03, 2026 6:30 pm

Tue Feb 03, 2026 7:47 pm

yaroslav (staff) wrote:
Tue Feb 03, 2026 7:44 pm
Yes, I also noticed that bit. Can you try using a different slash?
It appears the StarwindX library is adding the backslash. Even if I add a forward slash to the beginning of the image name, or a forward slash to the end of my image path, starwind seems to insert the backslash.
tornadoman625
Posts: 5
Joined: Tue Feb 03, 2026 6:30 pm

Wed Feb 04, 2026 2:30 am

Update:

Was able to resolve the issue. I updated my CVM and my Starwind X library, and the problem resolved itself. If anyone stumbles across this in the future with the same problem, that my advice.
yaroslav (staff)
Staff
Posts: 4309
Joined: Mon Nov 18, 2019 11:11 am

Wed Feb 04, 2026 8:34 am

That's a very good point... I assumed it to be up-to-date.
Yes, older libraries might not work with 20086.

Thanks for sharing!
Post Reply