Tech Note: vsphere Replication with vsan First Published On: 10-27-2017 Last Updated On: 11-01-2017 1
Table of Contents 1. Introduction 1.1.Introduction 2. vsphere Replication with vsan Datastores 2.1.vSphere Replication with vsan Datastores 3. Recommendations 3.1.Recommendations 2
1. Introduction Provides an introduction, common terms, and an overview of vsphere Replication with vsan. 3
1.1 Introduction Overview VMware vsphere Replication (VR) is a hypervisor-based, asynchronous replication solution for vsphere virtual machines. It is fully integrated with VMware vcenter Server and vsphere Web Client. vsphere Replication delivers flexible, reliable and cost-efficient replication to enable data protection and disaster recovery for virtual machines in your vsphere environment. Replication is configured on a per-virtual machine basis allowing precise control over which workloads are protected. This approach avoids the need to provide excess capacity at a disaster recovery site to accommodate an all-ornothing replication solution. vsphere Replication is independent of the storage layer. This document will focus on using vsphere Replication with VMware vsan. Common Terms These common terms are pertinent to vsphere Replication: Recovery Point Objective (RPO) - the maximum period in which data might be lost from an IT service disruption. The range is from 5 minutes to 24 hours. Point in time (PIT) instances - the number of replication instances to keep. You can keep up to 24 instances. The PIT instances are available as snapshots of a recovered virtual machine. Source site the datacenter where the original virtual machines reside. Target site - the datacenter where the virtual machine replicas reside. vsphere Replication Architecture With vsphere Replication, you can configure replication of a virtual machine from a source site to a target site, monitor and manage the status of the replication, and recover the virtual machine at the target site. vsphere Replication is a flexible solution that supports many topologies. Here are a few examples: From a source site to a target site Within the same cluster and across clusters From multiple source sites to a shared target site vsan datastores can be used to store virtual machines and replicas for any of the topologies. Figure 1, shows the architecture of vsphere Replication with vsan datastores at the source and target sites. In this scenario, both sites are managed by separate vcenter Server instances. The vsphere Replication specific components are: vsphere Replication Management Virtual Appliance - Responsible for managing VR and also receiving replicated data. vsphere Replication Virtual Appliance - Receives replicated data. VR Agent & vscsi Filter - Components built into vsphere that coordinate the replication process. Together they track the changes to the virtual machines and send changes to the vsphere Replication Management virtual appliance. NFC - Network File Copy service on a vsphere host with the access to the target datastore. For further vsphere Replication details, see vsphere Replication FAQs and the vsphere Replication Product Documentation. 4
Figure 1. vsphere Replication with vsan datastores How Does vsphere Replication Work? Once vsphere Replication is installed, you can begin replicating virtual machines. From the vsphere Web Client, you will right-click a virtual machine and select All vsphere Replication Actions > Configure. Then, after completing the configuration wizard, vsphere Replication will synchronize all of the source data with a replica at the target. This initial replication is commonly called an initial full sync. 1 After the initial full sync has completed, vsphere Replication will track changes to the virtual machine and replicate only those changes on a scheduled basis (determined by the RPO configured) to minimize network bandwidth consumption. Recovery is easily performed from the target s site vsphere Web Client. Select vsphere Replication>Incoming Replications tab to see the list of replicated virtual machines. Select the virtual machine you want to recover and click the Start Recovery button. The recovered virtual machine will be placed on the target site. You will select the location. This process if a single virtual machine. 1 To reduce network traffic generated by the initial full sync, you can use replication seeds. 5
2. vsphere Replication with vsan Datastores vsphere Replication is compatible with a wide variety of storage types supported by vsphere including vsan. 6
2.1 vsphere Replication with vsan Datastores vsan as a Source There are no special considerations when configuring replication for virtual machines residing on a vsan datastore. The process is the same as configuring replication for virtual machines on other datastore types such as VMFS and NFS. vsan as a Target To use a vsan datastore as a target site, you need to consider the target s datastore folder structure and storage policy. As a footnote, the capacity consumed by vsphere Replication replicas can be reduced using vsan deduplication and compression in all-flash configurations at the target site. vsan Storage Policies with vsphere Replication It is important to understand how vsan storage policies are integrated with vsphere Replication. When configuring replication for a virtual machine, a storage policy is selected. A datastore compatible with the selected storage policy can then be configured as the target datastore where the replica will reside. The VR replica will have the selected storage policy. When a recovery of the virtual machine is performed, the storage policy of the target datastore is automatically assigned to the recovered virtual machine. Note: if you reconfigure the replication the VM and selected a new storage policy, the VR replica will keep the original storage policy. However, when the virtual machine is recovered, the new storage policy will be assigned to the recovered virtual machine. See the vsan Storage Policy Assigned to vsphere Replication Replicas blog article for a deep dive into the details. Consider this use case as an example: A virtual machine at the source site resides on a larger vsan cluster. The virtual machine is assigned a storage policy that contains a Number of Failures To Tolerate (FTT) rule set to two. The target disaster recovery site is a smaller vsan cluster with less capacity. The virtual machine must still be resilient to failure after a disaster recovery, but with less capacity at the disaster recovery site, there is a need to minimize storage capacity consumption. A lower level of resiliency is acceptable to conserve capacity. A storage policy is created at the disaster recovery site with an FTT rule set to one. This storage policy is selected when replication is configured for the virtual machine. As a result, the number of failures to tolerate is automatically changed from two to one 7
when the virtual machine is recovered. This method achieves the requirement to maintain resiliency while lowering the amount of storage capacity consumed. vsphere Replication Configuration Wizard When a vsan datastore is the vsphere Replication target site, the portions of the configuration wizard impacted are: Replication Type should be set to Replicate to a vcenter Server. It is important to note that the vcenter Server 2 must be online to configure replication and recover virtual machines with vsphere Replication. Separate vcenters will manage both the source site and target site. You will need to know the target site s vcenter. Target Site should be the vcenter site managing the target vsan datastore. Target Location is comprised of: VM Storage Policy select the storage policy you set up for the replicated virtual machines at the target site. Datastore select the vsan datastore compatible with the storage policy. Target location select the folder name you created on the datastore to store the replica virtual machines. vsan as a Source and a Target A vsan datastore can contain the source virtual machines and serve as a target for replication. RPOs as low as five minutes can be configured with vsphere Replication when both the source and target datastores are vsan. The same vsan datastore can be the source and the target for vsphere Replication. An example use case for this is a need to provide local data protection for one or more virtual machines with a very rapid recovery time objective (RTO) and low RPO. If there is an irreparable issue with an existing virtual machine, vsphere Replication could be used to recover the virtual machine in just a few minutes. vsphere Replication also supports up to 24 recovery points. More details on this functionality are in the vsphere Replication documentation. NOTE: Keep in mind more recovery points consumes additional storage capacity. VMware Site Recovery Manager VMware Site Recovery Manager can be utilized with vsan and vsphere Replication to orchestrate the recovery of multiple virtual machines. Automation further reduces recovery times and minimizes risk by eliminating manual, error-prone processes. Site Recovery Manager includes the ability to precisely control the startup order of virtual machines and it automates IP address changes when virtual machines are failed over. 2 You can use vsphere Replication with the vcenter Server Appliance or with a standard vcenter Server installation. You can have a vcenter Server Appliance on one site and a standard vcenter Server installation on the other. 8
3. Recommendations The following recommendations are general best practices for vsphere Replication that apply to all datastore types including vsan. 9
3.1 Recommendations The following recommendations are general best practices for vsphere Replication that apply to all datastore types including vsan. When using a vsan datastore as the target datastore, we strongly recommend you create a subfolder to store the replicas. Configure the RPO for each virtual machine as high as possible while still meeting business requirements. This is especially true for larger numbers of virtual machines. Higher RPOs require less network bandwidth to maintain. Configure multiple recovery points only if needed. If multiple recovery points are configured, use the lowest number possible while still meeting business requirements. This approach will minimize storage capacity requirements for vsphere Replication replicas. vsphere Replication supports Microsoft VSS quiescing and Linux file system quiescing. These features should only be used where necessary as quiescing an application or file system can cause perceivable performance impacts. The results are more pronounced with frequent replication cycles (i.e., lower RPOs). When replicating large virtual machines and/or when available bandwidth for replication is very limited, consider the use of "seeds." These are exact copies of virtual machine disks (VMDK files) that are created from the source virtual machine and placed at the target location through an offline mechanism (e.g., portable, detachable storage). vsphere Replication will compare the source files with the "seed" files and replicate only the differences from the source to the target. This can dramatically reduce the amount of time needed to complete the initial full sync. Both vsphere Replication documentation and VMware Knowledge Base article 1028042 contain more information. Monitor the free disk space on target datastores. As with most solutions, running out of disk space will cause issues. A vcenter Server alarm can be created to alert administrators when free disk space is below a certain threshold. 10