Storage

PowerCLI and vSAN: Exploring Remote Datastore Mounting

In the ever-evolving world of PowerCLI, each release brings exciting updates and enhancements to vSAN. With new cmdlets and vSAN APIs, managing your virtual storage infrastructure becomes even more efficient and powerful. One of the recent additions to PowerCLI is the support for remote datastore related features, opening up new possibilities for vSAN clusters.

Now, vSAN clusters have the ability to share their datastores with other vSAN clusters, or even beyond a single vCenter Server. The beauty of this functionality lies in the flexibility it offers. Any compatible vSAN cluster can act as a server, allowing other vSAN clusters to mount its local datastores. This opens up a world of potential use cases and enables efficient data sharing across clusters.

But how do you go about mounting a remote datastore using PowerCLI? Fear not, as I’ll guide you through the process using PowerCLI cmdlets in various scenarios.

Managing vSAN Remote Datastores

Starting from PowerCL 12.7, we have introduced support for querying, mounting, and unmounting remote datastores for a specific cluster using the Get-VsanClusterConfiguration and Set-VsanClusterConfiguration cmdlets. Let’s delve into the details and discover how these cmdlets can empower you in managing remote datastores.

Query the mounted remote datastores

By utilizing the Get-VsanClusterConfiguration cmdlet, we gain access to view all the properties of the vSAN configuration within the specific cluster. This includes crucial information about the mounted remote datastores.

In addition to accessing the overall vSAN configuration, we can specifically retrieve the value of the RemoteDatastore property by using a simple dot notation. This allows us to obtain accurate details about the remote datastores and their current status.

Mount / Unmount the remote datastore

As we intend to modify the vSAN configuration setting, we will utilize the Set-VsanClusterConfiguration cmdlet. To do so, it is necessary to retrieve the original vSAN cluster configuration beforehand with the Get-VsanClusterConfiguration cmdlet.

Mount / Unmount the remote datastore from the stretched cluster

In the latest PowerCLI 13.1 release, which supports vSAN 8.0 Update 1, we’re thrilled to introduce the ability to mount remote datastores from both stretched clusters and vSAN ESA (Express Storage Architecture) enabled clusters. If you want to mount or unmount the remote datastore from a vSAN ESA enabled cluster, the operation would be the same as the first scenario, the normal vSAN cluster, and no additional settings are required. Let’s take a look at the configuration steps involved when mounting from stretched clusters

Mounting the Remote Datastore from Stretched Clusters

When dealing with stretched clusters, an additional configuration step is necessary to ensure seamless remote datastore mounting. Specifically, you’ll need to configure the RemoteVsanServerClusterConfig as outlined below.

Understanding the NetworkTopology Parameter

The NetworkTopology parameter plays a crucial role in defining the network topology between the client and server clusters in an HCI Mesh configuration. It offers two values: Asymmetric and Symmetric. In a Symmetric configuration, no ServerSiteName or ClientSiteName is required. However, in an Asymmetric configuration, the ServerSiteName becomes necessary and represents the fault domain of the stretched cluster, which is referred to as “Preferred” or “Secondary”. Additionally, if both the host cluster and server cluster are stretched clusters, the ClientSiteName is also required.

Below are some sample configurations for different RemoteVsanServerClusterConfig scenarios.

When unmounting a remote datastore from the stretched cluster, it is enough to pass the UnmountRemoteDatastore parameter. The RemoteVsanServerClusterConfig will be automatically adjusted and cleared accordingly.

Mount / Unmount the remote datastore from another vCenter Server system

In PowerCLI13.1, we also have the capability to mount and unmount remote datastores from another vCenter Server System, allowing for cross-vCenter remote datastore operations.

Adding Datastore Source to the current vCenter Server system

Before we can proceed with mounting the Cross-vCenter (XVC) remote datastore, we need to add the datastore source to the current vCenter Server system by using the appropriate credentials. This step ensures that the target vCenter Server can be accessed as another datastore source. To achieve this, we can utilize the New-VsanHCIMeshDatastoreSource cmdlet, where the VCHost parameter specifies the target vCenter that we want to add as a datastore source.

Retrieving HCI Mesh Datastore

Once we’ve successfully added the datastore source, we can retrieve the datastore and fetch the HCI mesh datastore from the specified source. This retrieval process allows us to access the necessary data and information required for further operations.

Mounting and Unmounting Remote Datastores

With the retrieved HCI mesh datastore at our disposal, we can now proceed to mount or unmount the remote datastore by using the MountXVCDatastore or UnmountXVCDatastore parameters. With these parameters, you can execute the desired operations efficiently.

Query the mounted datastore from another vCenter Server System

The mounted datastore from another vCenter Server system can be fetched with the VsanXVCDatastore parameter.

Summary

In this blog post, we’ve touched upon the latest advancements in PowerCLI and vSAN, focusing on the ability to mount remote datastores. As we move forward, we’ll delve deeper into each scenario and provide step-by-step guides on configuring remote datastores for stretched clusters, understanding network topology, implementing the RemoteVsanServerClusterConfig cmdlet, and exploring the cross-vCenter remote datastores.

Join us on this thrilling journey as we unlock the full potential of PowerCLI and vSAN, empowering you to optimize your virtual storage infrastructure and harness the benefits of remote datastore mounting. Exciting times lie ahead for vSAN enthusiasts and PowerCLI users alike!

Make sure to stay tuned for our upcoming blog posts as we’ll unveil more insights, tips, and tricks to enhance your vSAN management experience. Until then, happy exploring!