> This page is for Base Command Manager Deployment Guide.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/reference-architectures/llms.txt.

# Configure HA (High Availability)

In a cluster with a single head node, the head node is a single point of failure for the entire cluster. In many environments, it is unacceptable for the failure of a single machine to disrupt daily operations.

High Availability (HA) configuration for a head node involves adding a secondary head node to provide redundant head node services. If one head node fails, the other can take over, ensuring service continuity with minimal downtime.

HA is typically configured using shared storage, commonly provided by an NFS service, which serves the /home directory on the active head node, and on the regular nodes. In this case, it will also be configured to provide access to the /cm/shared directory. This ensures that no matter which head node is active, access to these folders can be maintained.

In brief, the steps to be taken are:

* Test the connection to the NFS share.
* On the primary head node, configure and initialize the HA setup.
* On the secondary head node, boot from network into "Rescue" mode and execute the cloning process. Note that the BCM ISO is not required.
* Back on the primary head node, finalize the HA setup.
* Configure shared storage to use the NFS share.
* Test the failover, allowing for rebooting the head nodes sequentially.

Details required to complete this section, with example values used in this guide:

| Parameter                               | Example Value                          |
| --------------------------------------- | -------------------------------------- |
| NFS Share                               | 192.168.255.31:/nvidia-era-bcm-cluster |
| HA shared interface name                | bond0:ha                               |
| HA shared internal interface IP address | 192.168.100.254                        |
| Hostname of secondary head node         | nvidia-era-bcm-02                      |
| Failover network name                   | failovernet                            |
| Failover network base address           | 192.168.120.0                          |
| Failover network netmask                | 255.255.255.0                          |
| Failover network domain name            | failover.cluster                       |
| Failover network interface (primary)    | eth0                                   |
| Failover network IP (primary)           | 192.168.120.11                         |
| Failover network interface (secondary)  | eth0                                   |
| Failover network IP (secondary)         | 192.168.120.12                         |
| IP address for secondary head node      | 192.168.100.252                        |

> **Note**
>
> Where applicable these values will be displayed in red. Be sure to replace all example values with actual information relevant to the target environment.

## Test the Connection to the NFS Share

Before setting up HA, it is recommended to test the connection to the NFS share. If the share is inaccessible, the node health check will fail, as the /home and /cm/shared directories will not be unavailable.

This test will be performed in two stages. In the first stage, the NFS share will be mounted from the root operating system, where a "ha" directory will be created with a test txt file within it. In the second stage, the ha folder will be mounted from within cmsh, and the test file will be listed to confirm its creation. Two additional directories, home and cmshared, will then be created to map the folders after the main high-availability setup is completed.

1. Mount the NFS share from the root OS.

   a. Exit cmsh and return to the OS root.

   ```bash
   [nvidia-era-bcm-01]% quit
   ```

   b. Mount the NFS share to the /mnt directory.

   ```bash
   root@nvidia-era-bcm-01:~# mount 192.168.255.31:/nvidia-era-bcm-cluster/ /mnt
   ```

   c. List the contents of the /mnt/ directory to ensure there are no existing files.

   ```bash
   root@nvidia-era-bcm-01:~# ls -alh /mnt/
   ```

   ![Output of the ls command showing the empty /mnt/ directory.](/reference-architectures/_fern-files/_img/a326d7951dbc1b82090e84d45a77a6a9f1593260c4a7168f4f21923bb7fde31b.webp)

   > **Note**
   >
   > While the creation of the NFS share is beyond the scope of this guide, ensure that the exports are configured to allow access from the internalnet subnet (in this example, 192.168.100.0/24) and that the "no_root_squash" option is enabled.

   d. Create the "ha" directory.

   ```bash
   root@nvidia-era-bcm-01:~# mkdir /mnt/ha
   ```

   e. List the contents of the /mnt/ directory to validate the folder exists.

   ```bash
   root@nvidia-era-bcm-01:~# ls -alh /mnt/
   ```

   f. Create the test.txt file.

   ```bash
   root@nvidia-era-bcm-01:~# touch /mnt/ha/test.txt
   ```

   g. List the contents of the /mnt/ha/ directory to verify that the file was created.

   ```bash
   root@nvidia-era-bcm-01:~# ls -alh /mnt/ha/
   ```

   ![Output of the ls command showing the test.txt file in the /mnt/ha/ directory.](/reference-architectures/_fern-files/_img/19d957ed7304eb085ca77bdb6ee9345a305d98a067b415ebfd875f58c9abf50d.webp)

   h. Unmount the share.

   ```bash
   root@nvidia-era-bcm-01:~# umount /mnt
   ```

2. Mount the NFS share using cmsh and validate the directory and test file.

   a. Enter cmsh.

   ```bash
   root@nvidia-era-bcm-01:~# cmsh
   ```

   b. Enter the device mode.

   ```bash
   [nvidia-era-bcm-01]% device
   ```

   c. Use the active head node (in this case using the master alias).

   ```bash
   [nvidia-era-bcm-01->device]% use master
   ```

   d. Enter the fsmounts submenu.

   ```bash
   [nvidia-era-bcm-01->device[nvidia-era-bcm-01]]% fsmounts
   ```

   e. Add a mount point /nfs/general.

   ```bash
   [nvidia-era-bcm-01->device[nvidia-era-bcm-01]->fsmounts]% add /nfs/general
   ```

   f. Set the device to the NFS share.

   ```bash
   [nvidia-era-bcm-01->device*[nvidia-era-bcm-01*]->fsmounts*[/nfs/general*]]% set device 192.168.255.31:/nvidia-era-bcm-cluster/ha
   ```

   g. Set the filesystem to NFS.

   ```bash
   [nvidia-era-bcm-01->device*[nvidia-era-bcm-01*]->fsmounts*[/nfs/general*]]% set filesystem nfs
   ```

   h. Commit the changes.

   ```bash
   [nvidia-era-bcm-01->device*[nvidia-era-bcm-01*]->fsmounts*[/nfs/general*]]% commit
   ```

   i. List the fsmounts to verify.

   ```bash
   [nvidia-era-bcm-01->device[nvidia-era-bcm-01]->fsmounts[/nfs/general]]% list
   ```

   ![Output of the fsmounts list command showing the /nfs/general mount point configured with the NFS share.](/reference-architectures/_fern-files/_img/d54d2cad77e96918ae99fb2971752bd575f366bbdd48e6703855dc0d89587a0c.webp)

   a. Exit cmsh and return to the OS root.

   ```bash
   [nvidia-era-bcm-01->device[nvidia-era-bcm-01]->fsmounts[/nfs/general]]% quit
   ```

   j. List the contents of /nfs/general. The test.txt file created previously should be present.

   ```bash
   root@nvidia-era-bcm-01:~# ls -alh /nfs/general/
   ```

   ![Output of the ls command showing the test.txt file in the /nfs/general directory.](/reference-architectures/_fern-files/_img/dc7bab3030237e5e978b3dff31e82463a0b226fdede059c6dc4355cf1db99599.webp)

   k. Create the home folder.

   ```bash
   root@nvidia-era-bcm-01:~# mkdir /nfs/general/home
   ```

   l. Create the cmshared folder.

   ```bash
   root@nvidia-era-bcm-01:~# mkdir /nfs/general/cmshared
   ```

   m. List the contents of /nfs/general to confirm the folders exist.

   ```bash
   root@nvidia-era-bcm-01:~# ls -alh /nfs/general/
   ```

   ![Output of the ls command showing the home and cmshared folders in the /nfs/general directory.](/reference-architectures/_fern-files/_img/5fd89c6ce83b30ec5cd1293246af62221c850333f2eb4287af5493716580a7c6.webp)

## Run cmha-setup on the Primary Head Node

HA can now be configured on the primary head node.

1. Run cmha-setup.

   ```bash
   [nvidia-era-bcm-01]% quit # only required if in cmsh
   root@nvidia-era-bcm-01:~# cmha-setup
   ```

2. Select **Setup**.

   ![The cmha-setup main menu with the Setup option highlighted.](/reference-architectures/_fern-files/_img/3b88755bf8abe8e90c9f8600b83a0a96e00ea25fb1c7abd4c6166208433ebd90.webp)

3. Select **Configure**.

   ![The cmha-setup Setup submenu with the Configure option highlighted.](/reference-architectures/_fern-files/_img/f24e47c463c7070195b72becd110485ae22cb8e8253900716c559a510a0c3b13.webp)

4. Select **Continue**.

   ![Dialog confirming the MAC addresses found in the license information, with the Continue option.](/reference-architectures/_fern-files/_img/3c31b82da5833e4cb128f53d183a88edf8a3f254905c2904c3b09a83e0f035bb.webp)

5. Enter the HA shared interface name and IP address.

   a. Name: `bond0:ha`

   b. IP: `192.168.100.254`

   ![Dialog for entering the HA shared internal interface name and IP address.](/reference-architectures/_fern-files/_img/4eb4df5fd13c2b4efd548102be8fcc81bdcf257712559a92144390daf948f3fa.webp)

6. Enter the hostname of the secondary node.

   a. Name: `nvidia-era-bcm-02`

   ![Dialog for entering the hostname of the secondary head node.](/reference-architectures/_fern-files/_img/08b221cf192991105ca5e83df513ba92ac408546daf50eeb569fd324a2655240.webp)

7. Set the failover network.

   a. Name: `failovernet`

   b. Base address: `192.168.120.0`

   c. Netmask: `255.255.255.0`

   d. Domain name: `failover.cluster`

   ![Dialog for entering the failover network name, base address, netmask, and domain name.](/reference-architectures/_fern-files/_img/5c5681202b389325fcb7112fa6923c19643a9dbe38c6a036be2938979ceb6a03.webp)

8. Set the failover network interfaces.

   a. Interface (primary): `eth0`

   b. IP (primary): `192.168.120.11`

   c. Interface (secondary): `eth0`

   d. IP (secondary): `192.168.120.12`

   ![Dialog for entering the failover network interface and IP for the primary and secondary head nodes.](/reference-architectures/_fern-files/_img/bafdc6d67c9b41e507c450dfe4168cbd95f2085bd3bf431b5dfd3e07d100f06e.webp)

9. Set the IP address for the secondary head node.

   a. Secondary IP: `192.168.100.252`

   ![Dialog for updating the IP addresses for the secondary head node interfaces.](/reference-architectures/_fern-files/_img/cd2defff13343fa7640e471c3677711ea4a7aabcff5f12672d98e85a9d175148.webp)

10. Review the summary and select **Exit**.

    ![Summary screen showing all configured HA parameters.](/reference-architectures/_fern-files/_img/9845735e2c73e906f2e20a12ce27ed9fb5cbc172a359c0500c4076684cfb95e3.webp)

11. Select **Yes** to proceed.

    ![Confirmation dialog to proceed with the HA configuration.](/reference-architectures/_fern-files/nvidia-reference-architectures.docs.buildwithfern.com/7eec5e4a4f5cfa0cadaac24bf47eb87aabb8bb71998b8078a466e13bf5ed39f4/_dot_dot_/docs/base-command-manager-enterprise-ra-deployment-guide/images/bcm-deployment-guide-p35-img210.png)

12. Enter the mysql root password.

    ![Dialog for entering the MySQL root password.](/reference-architectures/_fern-files/_img/823b5a462831b1c237107acd385c31a3f2eee0902acdd14f4e93eb26ebe25ee2.webp)

13. Wait until all tasks are completed, then press Enter.

    ![Progress screen showing all HA setup tasks completing.](/reference-architectures/_fern-files/nvidia-reference-architectures.docs.buildwithfern.com/11b3ebb2b59a9d70f5df74ace8cd0c12c28d9558e6f24e4e77db3f30200575fe/_dot_dot_/docs/base-command-manager-enterprise-ra-deployment-guide/images/bcm-deployment-guide-p35-img212.png)

    ![Dialog instructing to boot the secondary head node into the rescue environment and run the clone install command.](/reference-architectures/_fern-files/_img/68c6b5d3a7a974bc26723a2ac76d32ab03dbf1b13302e816d5566bb1627fb451.webp)

## Follow the Instructions on the Secondary Head Node

The secondary head node can now be powered on, booted from network into the rescue environment, and cloned from the primary head node using the failover parameter. Note that the BCM ISO is not required for this process.

1. Power on and boot the secondary head node server from the network (PXE).

2. Select **Start rescue environment**.

   ![PXE boot menu with the Start rescue environment option highlighted.](/reference-architectures/_fern-files/nvidia-reference-architectures.docs.buildwithfern.com/a558aa1831b25a98461458da46097f0da5a980be3f0abcb04ffe5b148cb51a85/_dot_dot_/docs/base-command-manager-enterprise-ra-deployment-guide/images/bcm-deployment-guide-p36-img215.png)

   ![The rescue environment boot screen.](/reference-architectures/_fern-files/_img/44d329af1f138949bc5a4a3f596fa0b3cea797c038f7a4724736212d9f22e4c3.webp)

3. Determine the network interface to use for configuration.

   ```bash
   root@ClusterManager:~# ip a
   ```

   ![Output of the ip a command showing available network interfaces on the secondary head node.](/reference-architectures/_fern-files/_img/6e4cc512f29e0f42b143ca6d743b9f305a3d62955b3f7b37ff7f3eaeaac19997.webp)

4. Clone install failover (non-interactive).

   ```bash
   root@ClusterManager:~# /cm/cm-clone-install \
   --failover \
   --noninteract \
   --headnodepasswd=secret \
   --interface=eth2 \
   --addbiosboot
   ```

   Wait until all tasks are completed. The secondary head node will automatically reboot.

   ![Output showing the clone install failover process completing and the secondary head node rebooting.](/reference-architectures/_fern-files/_img/ff541f6ed0ad7671a744b59a921eaf15bde2ae537f80d3716e2fa136f7dab60b.webp)

## Finalize cmha-setup on the Primary Head Node

Back on the primary head node, the HA process must now be finalized.

1. From the **cmha-setup > Setup** TUI, select **Finalize**.

   ![The cmha-setup Setup submenu with the Finalize option highlighted.](/reference-architectures/_fern-files/_img/86472e8050c46100cdf298b0f70b611ed9ab0f5b75e4707bc927aee1a5a93667.webp)

2. Select **Continue**.

   ![Confirmation dialog to continue with the finalization.](/reference-architectures/_fern-files/_img/71f60f0eabdf51f604a61497d16dd9d60975ee8a32f60ca70d83f713974118f7.webp)

3. Enter the mysql root password.

   ![Dialog for entering the MySQL root password during finalization.](/reference-architectures/_fern-files/_img/823b5a462831b1c237107acd385c31a3f2eee0902acdd14f4e93eb26ebe25ee2.webp)

4. Wait until all tasks are complete, then press Enter.

   ![Progress screen showing all finalization tasks completing.](/reference-architectures/_fern-files/_img/b6cffe6aac25af47096595f3089023b2fd16bcd45ddd4e3f84eb483b6feee83a.webp)

5. Select **Reboot** to reboot the secondary head node.

   ![Dialog to reboot the secondary head node.](/reference-architectures/_fern-files/_img/346d5bcb37a80e3fb001242e19b070accc9c33f824e9b75c7be1b661e4c7f4d1.webp)

6. Select **Main**.

   ![The cmha-setup main menu after finalization.](/reference-architectures/_fern-files/_img/2ceb6b78c80fc526178f363b3923b31683faad6f2fa67dc6bbb5e1cc85223b85.webp)

## Configure Shared Storage

Shared storage can now be configured to use the home and cmshared directories from earlier.

1. In **cmha-setup > TUI**, select **Shared Storage**.

   ![The cmha-setup main menu with the Shared Storage option highlighted.](/reference-architectures/_fern-files/_img/beb6a2b7773d122ed79f4605a6fdacf2e22b1ec1c21ad58edd41aee72434edfc.webp)

2. Select **NAS**.

   ![The Shared Storage submenu with the NAS option highlighted.](/reference-architectures/_fern-files/_img/ca50184f1dac67def446dee55735b55d2100bf99af11185f0f3c95127677e67d.webp)

3. Select the resources that will be shared:

   a. `/home`

   b. `/cm/shared`

   ![Dialog for selecting the resources to be shared via NAS.](/reference-architectures/_fern-files/_img/90d8432acecc0a3e5cc679b0fc2c3ce534d42f432f88d7420f9eba3166745caf.webp)

4. Enter the NAS parameters.

   a. NAS host: `192.168.255.31`

   b. Path to /home: `/nvidia-era-bcm-cluster/ha/home`

   c. Path to /cm/shared: `/nvidia-era-bcm-cluster/ha/cmshared`

   ![Dialog for entering the NAS host and path parameters.](/reference-architectures/_fern-files/_img/850cb829080541e3cf453aa6f7faa1b7e1ee8373a55ede87c65eadabb9e1ac84.webp)

5. Review the summary and select **Exit**.

   ![Summary screen showing the configured NAS shared storage parameters.](/reference-architectures/_fern-files/_img/10fd2028d3de89d11111c9a4966e20f31332b3ca09dd1646a607bfd3c3deb71b.webp)

6. Proceed with nas setup by selecting **Yes**.

   ![Confirmation dialog to proceed with the NAS setup.](/reference-architectures/_fern-files/_img/010a722043f76d3f810f8a48cb895054e54ebc5eabb31dccd6388fa9710bbc18.webp)

7. Wait for tasks to complete, then press Enter.

   ![Progress screen showing the NAS shared storage setup tasks completing.](/reference-architectures/_fern-files/nvidia-reference-architectures.docs.buildwithfern.com/fbd4bbdf905e93c7594b0fa76758c9240233f421d1381e295b7173c185ba3d91/_dot_dot_/docs/base-command-manager-enterprise-ra-deployment-guide/images/bcm-deployment-guide-p41-img236.png)

8. Exit cmha-setup. Select **Exit**, then **Quit**, then **Yes**.

## Test Failover and Reboot the Primary Head Node

From this point forward, it is recommended to log in using the HA shared internal interface IP address defined during the HA setup (in this example, 192.168.100.254). This ensures that administrators are always directed to the active head node, which is currently still the primary head node.

In the event of a failover, this IP address will be assumed by the secondary head node, minimizing downtime and service disruption. To proceed, the primary head node will need a reboot. A failover will be simulated by making the secondary head node the active head node, allowing the primary head node to reboot gracefully.

1. Log off from the primary head node.

   ```bash
   root@nvidia-era-bcm-01:~# exit
   ```

2. Log in using the HA shared internal interface IP address.

   ```bash
   ssh root@192.168.100.254
   ```

   ![Node status showing the session is connected to the active head node (nvidia-era-bcm-01).](/reference-architectures/_fern-files/_img/dd9be6667b56fd1ceb99566d7194eb217bf2d865f357748e35291d9fb818eaa6.webp)

   > **Note**
   >
   > The primary head node (nvidia-era-bcm-01) is still the active head node.

3. Enter cmsh.

   ```bash
   root@nvidia-era-bcm-01:~# cmsh
   ```

4. Check the failover status and make the secondary head node the active head node.

   a. Enter the partition mode.

   ```bash
   [nvidia-era-bcm-01]% partition
   ```

   b. Enter the failover submenu.

   ```bash
   [nvidia-era-bcm-01->partition[base]]% failover
   ```

   c. Get the failover status.

   ```bash
   [nvidia-era-bcm-01->partition[base]->failover]% status
   ```

   ![Output of the failover status command showing the primary head node as the active head node.](/reference-architectures/_fern-files/_img/4a2c5251f0cf7c697231cab4e06341721b07fe2e18b663cb518e1fc11eebafa1.webp)

   d. Make the secondary head node active. (Pressing Enter after this command will disconnect the client.)

   ```bash
   [nvidia-era-bcm-01->partition[base]->failover]% makeactive nvidia-era-bcm-02
   ```

   ![The makeactive command for nvidia-era-bcm-02, after which the client connection is reset.](/reference-architectures/_fern-files/_img/e3568bb5c2e5afc0a7aa957ea0223b83ea0d4fdb970d8eb8c17d4b7ff44e8fb2.webp)

5. Log in again using the HA shared internal interface IP address.

   ```bash
   ssh root@192.168.100.254
   ```

   ![Node status showing the session is now connected to the active head node (nvidia-era-bcm-02).](/reference-architectures/_fern-files/_img/738860c50a8350f9dd647d0232299e3a93deb5bce83eb8a8ab3dfb740dfedd66.webp)

   > **Note**
   >
   > The secondary head node (nvidia-era-bcm-02) is now the active head node.

6. Enter cmsh again.

   ```bash
   root@nvidia-era-bcm-02:~# cmsh
   ```

7. Enter the partition mode.

   ```bash
   [nvidia-era-bcm-02]% partition
   ```

8. Enter the failover submenu.

   ```bash
   [nvidia-era-bcm-02->partition[base]]% failover
   ```

9. Get the failover status.

   ```bash
   [nvidia-era-bcm-02->partition[base]->failover]% status
   ```

   ![Output of the failover status command showing the secondary head node as the active head node.](/reference-architectures/_fern-files/_img/1b7b1be5b283dd8dda7c07d78c48c3dcda1412b6ff87dac902d72ec4d4626443.webp)

10. Reboot the primary head node.

    a. Enter the device mode

    ```bash
    [nvidia-era-bcm-02->partition[base]->failover]% device
    ```

    b. List the devices.

    ```bash
    [nvidia-era-bcm-02->device]% list
    ```

    ![Output of the device list command showing the primary head node with a restart required.](/reference-architectures/_fern-files/_img/6ee5dcb26edf90b6fc34af14f91bd3bd358278703a9b02fc886e31243796abcf.webp)

    c. Reboot the primary head node.

    ```bash
    [nvidia-era-bcm-02->device]% reboot nvidia-era-bcm-01
    ```

    ![Output showing the reboot in progress for nvidia-era-bcm-01.](/reference-architectures/_fern-files/_img/45640ecb3b345ee22e6b76cc0cad7957066ef5d12c0a568c77265ccb8099a745.webp)

    d. Wait for the primary head node to come back up, then list the devices to verify status.

    ```bash
    [nvidia-era-bcm-02->device]% list
    ```

    ![Output of the device list command showing both head nodes up after the reboot.](/reference-architectures/_fern-files/_img/81ec4c9a46869e286315da96dd71bd8ab9a2a86f88c25635aa821af6a690a9fe.webp)

11. Make the primary head node is the active head node again.

    a. Enter the partition mode.

    ```bash
    [nvidia-era-bcm-02->device]% partition
    ```

    b. Enter the failover submenu.

    ```bash
    [nvidia-era-bcm-02->partition[base]]% failover
    ```

    c. Make the primary head node active. (Pressing Enter after this command will show that the client is disconnected.)

    ```bash
    [nvidia-era-bcm-02->partition[base]->failover]% makeactive nvidia-era-bcm-01
    ```

    ![The makeactive command for nvidia-era-bcm-01, after which the client connection is reset.](/reference-architectures/_fern-files/_img/f39e14d702521ef60ba452fd0fbe8cbab90a427d4084005b5a9d94fdd005b842.webp)

12. Log in again using the HA shared internal interface IP address.

    ```bash
    ssh root@192.168.100.254
    ```