Moving a VMFS Volume to a Different Site

Recently I wanted to copy a VMFS volume from one site to another but the VMFS volume did not automatically mount at the new site.

Using my storage array’s replication technology I replicated the LUN (containing an existing VMFS Datastore) from site A to site B, broke off the replication to make the LUN at site B writable and mapped the LUN to the ESXi hosts at Site B. When I then performed a rescan for Datastores at Site B I was expecting the Datastore to appear, however it never. The LUN was detected by each of the ESXi hosts at Site B as I could see it when looking at the devices detected via the storage adapters.

To mount the datastore at site B I had to resort to the command line, either by SSH to the ESXi host or via the Remote CLI

From a SSH session on the ESXi host run the following commands:

esxcfg-volume -l

This lists the volumes that have been detected as snapshots/replicas and therefore did not mount.

You can then persistently mount the volume by using the following command with the UUID of the volume as displayed in the previous command

esxcfg-volume –M <UUID>

Note: that it needs to be a capital “M” as a lower case “m” will perform a temporary mount of the datastore, not a persistent mount; therefore it will no longer be mounted following a reboot of the host.

Here is an example of where I have run the command from a host

You need to repeat this on all of the ESXi hosts at site B.

From the Remote CLI use the commands instead of esxcfg-volume and specify the ESXi host you want to run the command against, i.e. –server <esxi-host> -l –server <esxi-host> -M <UUID>

When you run these command you will need to specify a username and password to connect to the ESXi hosts, e.g. root. Here is an example.

You can also connect to the vCenter server and provide a vCenter administrator username and password instead of connecting directly to the ESXi host when using, when doing this you also need to specify the ESXi hosts you want to run the command on by specifying the –vihost parameter. Note: you need to specify the ESXi host as it is listed in the vCenter inventory, e.g. if it is listed with the fully qualified domain name you need to specify this on the –vihost parameter, e.g. –server <vcenter-server> –vihost <esxi-host> -l –server <vcenter-server> –vihost <esxi-host> -M <UUID>

Although I found that I could only do this for the first host and when I attempted to mount the Datastore on subsequent hosts I get the error message

A VMFS volume with the same UUID ‘<UUID>’ is already mounted in the datacenter.


So I reverted back to connecting directly to the ESXi host with

Note: there is no –m option on vicfg-volume

This entry was posted in VMware, vSphere. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s