vSphere Replication: How to Increase Disk Space

Procedure to increase disk space on a server utilizing vSphere Site Recovery Manager and Replication.

What is vSphere Replication

VMware vSphere Replication is an asynchronous replication solution that is capable of protecting Virtual Machines from a source location in a target location. The target can be another data center, or a cloud hosting provider.

It is a licensed product where you are charged for replication licenses per virtual machine. VMware usually sells them in blocks of 25 virtual machines at a time. You must also be running VMware vSphere Standard or Enterprise edition, it will not work on Essentials or Essentials Plus licenses.

vSphere Replication has been known as various products throughout its lifetime, it is commonly known as Site Recovery Manager (SRM) or vSphere Data Protection (VPD). Throughout this article I will refer to it as SRM.

Why is it so hard to increase disk space in SRM?

One of the most common issues introduced by vSphere Replication software is the inability to expand disk space on a server.

If you attempt to increase disk space on a source virtual machine, that change will not automatically be transferred to the disaster recovery replica. If a sysadmin does expand the disk space, the will break replication and potentially take the VM offline.

Increasing hard disk capacity is one of the most common tasks system administrators have to do. These days to extend hard disk space, the operating system does all the hard work for you, Windows Disk Manager can extend any disk (including the system disk) without even rebooting the server. It’s the same for Linux, but VMware is a different story and it’s one of the challenges introduced with vSphere replication.

This common task is still possible to do, but you must approach it slightly differently.

In this demo I will be running VMware vSphere 6.5 Enterprise Plus licence, the infrastructure consists of 2 physical, geographically disparate locations. Each site is connected with a 10GB production “dark fiber” network, with a 4GB backup link. At each location there are 8 esxi hosts, dedicated IBM XIV object storage and 40GB infiniband networking.

Step 1 – Connect to the VMware infrastructure

  • Log onto vCenter (Primary Site) using the VMware Web Client
  • Log onto vCenter (Recovery Site) using the VMware Web Client
  • From the vCenter (Primary Site), navigate to Monitor > vSphere vReplication from the home page

Step 2 – Information gathering at the source location

  • Navigate to Outgoing Replications
  • Locate the server you wish to expand the disk space. In this example, we will use TEST2016T
, vSphere Replication: How to Increase Disk Space
  • Highlight the server and select the Configure vReplicator button
  • Log in with your vCenter account details when prompted
  • Click on Target Location and expand by pressing the arrow
  • Make a note of the Datastore This is where the replicated disk data is located. Once you have this information you can CANCEL OUT of the configuration wizard. (You will have a different name to the example above)

Step 3 – Information gathering at the target location

  • Change to the vCenter (Recovery Site)
  • Rename the folder in which the virtual machine is replicated too. This prevents the replicated data from removing when removing replication from the virtual machine.

Browse to Datastore > Folder Name

Example:

, vSphere Replication: How to Increase Disk Space
, vSphere Replication: How to Increase Disk Space

Step 4 – Break the existing replication

  • Switch back to vCenter (Primary Site)
  • Disable replication of the virtual machine you want to resize. Select the server > Right Click > Stop
, vSphere Replication: How to Increase Disk Space
  • Click ok to the warning message
, vSphere Replication: How to Increase Disk Space

Step 5 – Expand the servers disk space in vCenter

  • From vCenter (Primary Site), increase the size of the desired virtual machine disk file. Select your server, right-click and go to edit settings.
  • Input the new disk size for the volume
, vSphere Replication: How to Increase Disk Space

Step 6 – Expand the Volume on an ESXi Host

  • From vCenter (Secondary Site)
  • Enable the SSH service in vCenter
  • SSH to any server using a terminal like putty. It doesn’t matter which ESXi host as long as its in the secondary location, and it has the storage LUN mapped already
  • Navigate to the datastore volume and locate the server name.
  • Run this command to change the directory to the datastore and folder in which the replicated disk is stored:

For example:

cd /vmfs/volumes/ITO2-7001N-DS03/TEST2016T-OLD
Substitute TEST2016T-OLD for your server
, vSphere Replication: How to Increase Disk Space
  • Run this command to increase the size of the replicated vmdk using vmkfstools. Make sure you know the disk number you have changed in vCenter

For Example:

vmkfstools -X 102GB TEST2016T.vmdk
Substitute TEST2016T.vmdk for your server
, vSphere Replication: How to Increase Disk Space

Note: The preceding command increases the size of a virtual disk to 102 GB. Substitute this for YOUR VALUE

Step 7 – Re-enable Replication

  • At the recovery site vCenter (Recovery Site), Rename the virtual machine folder to the original name.
, vSphere Replication: How to Increase Disk Space
  • At vCenter (Primary Site) – Reconfigure the replication for the virtual machine. Ensure to select the Specify datastore folder option to select the folder in which the replicated disk is stored.
  • Click on the Server name > Actions > All vSphere Replication Actions > Configure vReplication
, vSphere Replication: How to Increase Disk Space
  • Choose Replicate to a vCenter Server
, vSphere Replication: How to Increase Disk Space
  • Choose Recovery Site Appliance as Replicated site
, vSphere Replication: How to Increase Disk Space
  • Choose a vReplicator appliance
, vSphere Replication: How to Increase Disk Space

IMPORTANT – On Target location point the server storage to the original location of the replicated data.

In this example it was ITO2-7001N-DS03 – Yours will be different.

Ensure you choose the correct folder too.

, vSphere Replication: How to Increase Disk Space

IMPORTANT – Chose USE EXISTING when you get the following warning

, vSphere Replication: How to Increase Disk Space

IMPORTANT – Change the USING SEED option to YES by clicking USE ALL SEEDS

This will use the existing data ensuring that the entire server does not need to be replicated from scratch, useful if you have large servers.

BEFORE

, vSphere Replication: How to Increase Disk Space

AFTER

, vSphere Replication: How to Increase Disk Space
  • Ensure Guest OS quiescing and Network compression are unticked
, vSphere Replication: How to Increase Disk Space
  • Leave RPO at pre-define timings. In my example this is set to 4 hours
, vSphere Replication: How to Increase Disk Space

Step 8 – Monitor until completion

  • Now Next, Next finish to complete the process
  • Monitor the status in the Recent Task section of vCenter
  • Disable SSH service on host

Step 9 – Check the Operating System to make sure the disk has expanded

  • In Windows, you will need to check Windows Disk Management and expand the disk in the GUI
  • In Linux, you will need to manually expand the filesystem, the process of this varies depending on what format the disk is written in

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *