Procedure to increase disk space on a server utilizing vSphere Replication

One of the most common issues introduced by vSphere Replication is the inability to expand disk space on a server. This is a common task, which it is still possible to do, but you must approach it slightly differently.

 

Process

  • 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 vSphere vReplication from the home page
  • Once loaded, click Monitor
  • Locate the server you wish to expand. In this example we will use TEST2016T

 

  • 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 highlighted in RED above. 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)
  • 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:

 

  • Switch back to vCenter (Primary Site)
  • Disable replication of the virtual machine you want to resize. Select the server > Right Click > Stop

 

  • Click ok to the warning message

  • From vCenter (Primary Site), increase the size of the desired virtual machine disk file.

  • At the recovery site vCenter (Recovery Site), log in to an ESXi host that can access the datastore in which the virtual machine is replicated. You will need to enable SSH from the host security profile and use putty and the root credentials to access.

 

 

  • 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

 

  • 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

 

 

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

 

  • At the recovery site vCenter (Recovery Site), Rename the virtual machine folder to the original name.

 

  • 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

  1. Choose Replicate to a vCenter Server

  1. Choose Recovery Site Appliance as Replicated site

 

  • Choose a vReplicator appliance

  • IMPORTANTOn 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.

  • IMPORTANT – Chose USE EXISTING when you get the following warning

  1. 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

BEFORE

AFTER

  1. Ensure Guest OS quiescing and Network compression are unticked

  1. Leave RPO at pre-define timings. In my example this is set to 4 hours

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