Having a disaster recovery site is crucial for companies that care about their data safety, and it’s a MUST for ones which are under the regulatory requirements. On-site Redundancy (RAID, Synchronous Mirroring, etc.) does not guarantee data protection from hurricanes, floods, and earthquakes that can completely destroy the primary datacenter. To reach the maximum data security, StarWind provides asynchronous replication functionality.
The combination of StarWind data-compression and replication technologies enable to eliminate the typical for conventional DR implementations issues: high cost, performance drops, and risk of data discontinuity. Allowing the installation to take place in the cloud VM for DR purposes and moving the replication and data compression to the background, it prevents the common pitfalls found in traditional DR solutions.
This document is intended for StarWind users who want to learn to set up asynchronous replication, and the basics of snapshot management. It describes the process in detail, being a comprehensive step-by-step instruction that is good for beginners and seasoned professionals.
Pre-Configuring the Servers
The reference network diagram of the configuration described further in this guide is provided below.
Please, make sure that servers fit Asynchronous replication requirements specified on this page: https://www.starwindsoftware.com/system-requirements
Since Asynchronous node uses LSFS device by design, please, make sure that you are aware of LSFS device features and the node hardware fits LSFS device requirements, described here: https://knowledgebase.starwindsoftware.com/explanation/lsfs-device-technical-description/
NOTE: Additional network connections may be necessary, depending on the cluster setup and applications requirements. For any technical help with configuring the additional networks, please, do not hesitate to contact StarWind support department via the online community forum, or via the support form (depends on your support plan).
Creating Asynchronous Replication
NOTE: Asynchronous replica can be added to a standalone or an HA device. In this document, the asynchronous replica is created for a standalone device. Before replica creation, please, install StarWind VSAN and necessary devices according to these guides:
1. Open StarWind Management Console, select device and right click on it to select the Replication Manager.
2. The Replication Manager window will appear. Press the Add Replica button.
3. Select Asynchronous “One-Way” Replication and click Next to proceed.
4. Enter the IP address of the Asynchronous node.
5. Choose the Create New Partner Device option and click Next.
6. Specify the partner device location if necessary. You also can modify the device target name.
7. Click Change Network Settings.
8. Specify the proper network for asynchronous replication between two nodes, click OK and then Next.
9. Select Synchronize from existing Device as a partner device initialization mode and click Next.
10. Specify Scheduler settings and click Next.
NOTE: The size of journal files and number of snapshots depends on the settings, specified in this window.
11. Specify the path for journal files and click Next.
NOTE: The journal files will be located on the node which has the original device. However, it is highly recommended do not store journal files on the same drive where the original device is located.
Also, do not use C:\ drive as the path for journal files to avoid any issues with Windows OS.
12. If you choose the same drive where the StarWind device is located, you will receive the warning about possible performance issues. If you do not have the additional volume to store the journals, you can click I understand the potential problem. Use selected path.
13. Press the Create Replica button.
14. Wait until StarWind service creates a device and click Close to complete the device creation.
Restoring from an Asynchronous Replica
There are two possible ways for Hyper-V environment to bring the production online from an asynchronously-replicated node if the primary nodes are unavailable because of a disaster. The way to restore depends on particular needs.
Restoring Virtual Machines from a Read-Only Snapshot:
15. In StarWind Management console open device on the Asynchronous node, and click Snapshot Manager.
16. Select the Snapshot from the list and click Mount Snapshot. Snapshot will be mounted as a separate device in the Read-Only mode.
17. In the emerged window, specify target parameters. Target alias, as well as the target name, can be modified if needed.
Click OK to mount the snapshot.
18. Device mounted from the snapshot should look like one in StarWind Management Console (look the figure below).
NOTE: Device mounted from a snapshot is in the Read-Only mode by design.
19. To access data on the read-only device, the target should be connected in Microsoft iSCSI Initiator.
Launch Microsoft iSCSI Initiator in Server Management tools or by deploying iscsicpl in the command line interface.
20. Navigate to the Discovery tab in the iSCSI Initiator Properties window.
21. Click the Discover Portal button. Once Discover Target Portal dialog appears, type in 127.0.0.1 to discover targets from the local host and click the Advanced button.
22. Select Microsoft iSCSI Initiator as the Local adapter and click OK twice.
23. Navigate to the Targets tab, select the Snapshot target and click Connect.
NOTE: If targets are not listed, check the firewall settings of the StarWind Server and the list of networks served by the StarWind Server (go to StarWind Management Console -> Configuration -> Network).
24. Add the target to the Favorites list and enable multi-path. Click Advanced.
25. Select 127.0.0.1 from the Target portal IP drop-down list and set Microsoft iSCSI Initiator as the default initiator.
Click OK twice and complete the connection process.
26. Make sure that target is connected as in the picture below:
27. Open the Disk Management tab and bring the new disk online.
28. Once the Volume with the Virtual Machines or files is available, open Hyper-V Manager and click Import Virtual Machine…
29. Specify the path to the Virtual Machine located on the Read-Only disk (mounted from snapshot) and click Next.
30. Select Virtual Machine and click Next.
31. Choose the Restore the Virtual Machine option.
32. In Choose Destination check Store the Virtual Machine in a different location, specify the local path on the DR node and click Next.
33. Choose a folder to store the Virtual Hard Disk and click Next.
34. Check the Import details and click Finish to complete and close the wizard. Once Virtual Machine import is done you can start the Virtual Machine in Hyper-V Manager.
Restoring Virtual Machines from the replicated device on the Asynchronous node:
By design, the replicated device on the Asynchronous node is not allowed for any clients’ connections while the replica is not fixed at the specific time point. To make the target available for the client connections, it has to be re-added in StarWind Management console.
35. Open StarWind Management console, choose a device with Asynchronous replication mode, click Replication Manager and click Remove Replica in the appeared window.
36. Confirm the replica removal by clicking Yes button.
37. Open StarWind Management console and click Add Device (advanced) to add the device in Asynchronous replication mode one more time
38. Add Device Wizard will appear. Select Hard Disk Device and click Next.
39. Select a Virtual disk and click Next.
40. In the Virtual Disk Location window, choose Use an Existing Virtual Disk and specify the path to the device in Asynchronous replication mode. The path to file with the spsp extension should be specified and the Read-Only Mode checkbox should be unchecked.
41. Press Create New to create the header file for the device which will be added.
42. Specify the same Block Size and click Next.
43. Modify LSFS settings, if required, and click Next.
44. Define the caching policy, specify the cache size, and click Next.
NOTE: It is not recommended to configure the cache in Write-Back mode on Standalone devices in order to avoid possible data corruption upon power outage or incorrect service shutdown.
45. Define the Flash Cache Parameters policy and size if necessary. Choose SSD location in the wizard.
NOTE: The recommended size of the L2 cache is 10% of the initial StarWind device size.
46. Modify the Target Alias and target name, if needed, and click Next.
47. Click Create and Close to add a new device.
48. The re-added device should look like as one in the figure below.
49. Discover targets and connect the newly-created target to ISCSI initiator as it is described in steps 19-25. The connected target should look like one in the screenshot below:
50. Open Disk Management and bring the new disk online.
51. Once the Volume with Virtual Machines or files is available, open the Hyper-V Manager and click Import Virtual Machine…
52. Specify the path to the Virtual Machine which is located on the recently connected disk (mounted from snapshot) and click Next.
53. Select Virtual Machine, click Next, and choose the Register the Virtual Machine in-place option. Complete the wizard to register the Virtual Machine.
This technical paper describes setting up asynchronous replication for a disaster recovery scenario using StarWind Virtual SAN. Having this feature enabled allows building a disaster recovery site that ensures safe data storing and recovery when it is necessary.