Add or remove servers for an Azure Stack HCI cluster

Applies to: Azure Stack HCI, version 20H2

You can easily add or remove servers from a cluster in Azure Stack HCI. Keep in mind that each new physical server must closely match the rest of the servers in the cluster when it comes to CPU type, memory, number of drives, and the type and size of the drives.

Whenever you add or remove a server, you must also perform cluster validation afterwards to ensure the cluster is functioning normally. This applies to both non-stretched and stretched clusters.

Before you begin

The first step is to acquire new HCI hardware from your original OEM. Always refer to your OEM-provided documentation when adding new server hardware for use in your cluster.

  1. Place the new physical server in the rack and cable it appropriately.
  2. Enable physical switch ports and adjust access control lists (ACLs) and VLAN IDs if applicable.
  3. Configure the correct IP address in the baseboard management controller (BMC) and apply all BIOS settings per OEM instructions.
  4. Apply the current firmware baseline to all components by using the tools that are provided by your OEM.
  5. Run OEM validation tests to ensure hardware homogeneity with the existing clustered servers.
  6. Install the Azure Stack HCI operating system on the new server. For detailed information, see Deploy Azure Stack HCI.
  7. Join the server to the cluster domain.

Add a server to a cluster

Use Windows Admin Center to join the server to your cluster.

Add server screen

  1. In Windows Admin Center, select Cluster Manager from the top drop-down arrow.
  2. Under Cluster connections, select the cluster.
  3. Under Tools, select Servers.
  4. Under Servers, select the Inventory tab.
  5. On the Inventory tab, select Add.
  6. In Server name, enter the full-qualified domain name of the server you want to add, click Add, then click Add again at the bottom.
  7. Verify the server has been successfully added to your cluster.

Remove a server from a cluster

The steps for removing a server from your cluster are similar to those for adding a server to a cluster.

Keep in mind that when you remove a server, you will also remove any virtual machines, drives, and workloads associated with the server.

Remove server dialog

  1. In Windows Admin Center, select Cluster Manager from the top drop-down arrow.
  2. Under Cluster connections, select the cluster.
  3. Under Tools, select Servers.
  4. Under Servers, select the Inventory tab.
  5. On the Inventory tab, select the server you want to remove, then select Remove.
  6. To also remove any server drives from the storage pool, enable that checkbox.
  7. Verify the server has been successfully removed from the cluster.

Anytime you add or remove servers from a cluster, be sure and run a cluster validation test afterwards.

Add server pairs to a stretched cluster

Stretched clusters require the same number of server nodes and the same number of drives in each site. When adding a server pair to a stretched cluster, their drives are immediately added to the storage pool of both sites in the stretched cluster. If the storage pool at each site is not the same size at the time of addition, it is rejected. This is because the size of the storage pool must be the same between sites.

Take a few minutes to watch the video on adding server nodes to a stretched cluster:

You add or remove servers to a stretched cluster using Windows PowerShell. Using the Get-ClusterFaultDomainXML and Set-ClusterFaultDomainXML cmdlets, you first modify the site (fault domain) information prior to adding the servers.

Then, you can add the server pair to each site simultaneously using the Add-ClusterNode cmdlet, allowing each new server's drives to be added at the same time also.

Typically, you manage clusters from a remote computer, rather than on a server in a cluster. This remote computer is called the management computer.

Note

When running PowerShell commands from a management computer, include the -Cluster parameter with the name of the cluster you are managing.

Ok, let's begin:

  1. Use the following PowerShell cmdlets to determine the state of the cluster:

    Returns the list of active servers in the cluster:

    Get-ClusterNode
    

    Returns the stats for the cluster storage pool:

    Get-StoragePool pool*
    

    Lists which servers are on which site (fault domain):

    Get-ClusterFaultDomain
    
  2. Open the Sites.xml file in Notepad or other text editor:

    Get-ClusterFaultDomainXML | out-file sites.xml
    
    notepad
    
  3. Navigate to where the Sites.xml file is located locally on your management PC and open the file. The Sites.xml file will look similar to this:

    <Topology>
        <Site Name="Site1" Description="" Location="">
            <Node Name="Server1" Description="" Location="">
            <Node Name="Server2" Description="" Location="">
        </Site>
        <Site Name="Site2" Description="" Location="">
            <Node Name="Server3" Description="" Location="">
            <Node Name="Server4" Description="" Location="">
        </Site>
    <Topology>
    
  4. Using this example, you would add a server to each site (Server5, Server6) as follows:

    <Topology>
        <Site Name="Site1" Description="" Location="">
            <Node Name="Server1" Description="" Location="">
            <Node Name="Server2" Description="" Location="">
            <Node Name="Server5" Description="" Location="">
        </Site>
        <Site Name="Site2" Description="" Location="">
            <Node Name="Server3" Description="" Location="">
            <Node Name="Server4" Description="" Location="">
            <Node Name="Server6" Description="" Location="">
        </Site>
    <Topology>
    
  5. Modify the current site (fault domain) information. The first command sets a variable to obtain the contents of the Sites.xml file and output it. The second command sets the modification based on the variable $XML.

    $XML = Get-Content .\sites.xml | out-string
    Set-ClusterFaultDomainXML -xml $XML
    
  6. Verify that the modifications you made are correct:

    Get-ClusterFaultDomain
    
  7. Add the server pair to your cluster using the Add-ClusterNode cmdlet:

    Add-ClusterNode -Name Server5,Server6
    

Once the servers have been successfully added, the associated drives are automatically added to each site's storage pools. Lastly, the Health Service creates a storage job to include the new drives.

Remove server pairs from a stretched cluster

Removing a server pair from a stretched cluster is a similar process to adding a server pair, but using the Remove-ClusterNode cmdlet instead.

  1. Use the following PowerShell cmdlets to determine the state of the cluster:

    Returns the list of active servers in the cluster:

    Get-ClusterNode
    

    Returns the stats for the cluster storage pool:

    Get-StoragePool pool*
    

    Lists which servers are on which site (fault domain):

    Get-ClusterFaultDomain
    
  2. Open the Sites.xml file in Notepad or other text editor:

    Get-ClusterFaultDomainXML | out-file sites.xml
    
    notepad
    
  3. Using the previous example, in the Sites.xml file, remove the <Node Name="Server5" Description="" Location=""> and the <Node Name="Server6" Description="" Location=""> XML entry for each site.

  4. Modify the current site (fault domain) information using the following two cmdlets:

    $XML = Get-Content .\sites.xml | out-string
    Set-ClusterFaultDomainXML -xml $XML
    
  5. Verify that the modifications you made are correct:

    Get-ClusterFaultDomain
    
  6. Remove the server pairs from the cluster using the Remove-ClusterNode cmdlet:

    Remove-ClusterNode -Name Server5,Server6
    

Once the servers have been successfully removed, the associated drives are automatically removed from the site pools. Lastly, the Health Service creates a storage job to remove these drives.

Next steps

  • You should validate the cluster after adding or removing a server. For more information, see Validate the cluster for more information.