Software-based VM-centric and flash-friendly VM storage + free version
Moderators: anton (staff), art (staff), Anatoly (staff), Max (staff)
-
Gecko1927
- Posts: 2
- Joined: Wed Jan 03, 2018 8:51 pm
Wed Jan 03, 2018 8:57 pm
Hi,
we are using Starwind Vsan Standard with Windows Server 2016 to create a 2 node HA Failover cluster.
Two VMs are running on node 1 by default.
Both nodes will be shut down every evening by using PSSHUTDOWN.
First we shut down host 2, then host 1.
After starting both nodes in the morning everything works fine.
If we fail to startup one of the hosts, we could not get the failover cluster to run on a single node since it was always apparently waiting for the other host.
Is there any way to get both VMs running on the one remaining node?
Thanks in advance
-
Boris (staff)
- Staff
- Posts: 805
- Joined: Fri Jul 28, 2017 8:18 am
Thu Jan 04, 2018 7:25 am
For the cluster to start properly, StarWind services on both nodes need to communicate with one another to check which node was switched off latest, thus contains the latest data. After this is negotiated, this node's devices are automatically marked as synchronized and its iSCSI targets become available for client connections. This means the cluster sees the disks from this node and is able to start its operation.
If you start only one node, this single node had no reasonable means to communicate with its partner (as it's off) and thus it cannot make sure it contains the latest data on its disks. The service does not mark its disks as synchronized in such cases to prevent any unwanted consequences like partial data loss/corruption.
To bring your cluster back in case of turning on only one node you need to manually mark the StarWind devices on that node as synchronized (right click on a device and select Mark as Synchronized). After this the cluster will see the disks and resume operation.
-
Gecko1927
- Posts: 2
- Joined: Wed Jan 03, 2018 8:51 pm
Thu Jan 04, 2018 7:48 am
Thanks for the quick response. We will try this.
Is there any way to automatize this procedure e.g. "If node x does not come online after 5 min, mark node y as synchronized and go into single-node-mode"?
-
Boris (staff)
- Staff
- Posts: 805
- Joined: Fri Jul 28, 2017 8:18 am
Thu Jan 04, 2018 9:51 am
Yes, there is.
On the StarWind's side, the following script will mark all devices on the local node as synchronized:
Code: Select all
$partnerIP = your_partner_node_IP_here
$ping = ping $partnerIP
$ping = $ping | Out-String
# checking whether partner node is online by parsing PING response
$bool = $ping.Contains("(100% loss)")
# if the partner is not online, mark devices on the current node as synchronized
if ($bool) {
Import-Module StarWindX
try
{
$server = New-SWServer -host 127.0.0.1 -port 3261 -user root -password starwind
$server.Connect()
foreach($device in $server.devices)
{
if ($device.DeviceType -eq "HA Image" )
{
$device.MarkAsSynchronized()
}
}
}
catch
{
Write-Host "Exception $($_.Exception.Message)" -foreground red
}
$server.Disconnect( )
}
This is what you need to run some time after booting the server. You can set it up using Task Scheduler, for example, or any other automation means.
Let me know whether this works for you.