How to share primary, secondary, and shared folders for failover configuration in Linux installations?

Failover requires periodic data synchronization between the primary and secondary instances. This help document will guide you through the steps to share primary, secondary, and shared folders in Linux installations.

This help document contains the steps to configure the following:

Click here for the steps to configure shared folders in Windows installations.

How to setup file sharing between primary, secondary, and shared folder servers?

In Linux installations, you can configure file sharing between your servers using Remote Synchronization (Rsync). Rsync is a powerful tool that can transfer and synchronize files and directories between two locations in a network. It can be used to transfer the differences between folders for keeping files and directories synchronized across the network. For the rsync to work, SSH authentication has to be configured between these servers.

Note:

  • File sharing must be configured in all the three servers. (primary, secondary, and shared folder servers)
  • Root user's password is mandatory for all three servers.

Follow the steps below to configure Rsync:

  • Log in to the server, launch a terminal and execute the ssh-keygen command. This will generate a pair of public and private keys.
  • Configure Shared folders - ManageEngine OpManager
  • Provide a path to store the generated keys in that directory, or save in default path. Press the Enter key twice to skip the password prompt. The public and private key will be generated successfully.
  • Configure Shared folders - ManageEngine OpManager
  • Copy the generated public key to the peer server using the command,
  • ssh-copy-id -i <public-key-file-path> root@<peer-machine-name>.
    The <public-key-file-path> refers to the directory where the generated public key is saved. The <peer-machine-name> refers to the server intended to be shared from the current server.
  • Enter the peer server's root password to successfully copy the current server's key to the peer server.
  • Configure Shared folders - ManageEngine OpManager
  • To verify if the key has been copied to the peer server, log in to the peer server from the current server using the command,
  • ssh <peer-machine-name> 
  • Once the login attempt is successful, use the command exit to log out.

Note:

To configure SSH authentication for a shared folder server from both primary and secondary servers, follow the above steps in both primary and secondary but replace, <peer-machine-name>, with <shared_folder_machine_name>.

Steps to configure shared folder using SSHFS in primary, secondary, and shared folder servers

SSHFS (SSH File System) is a client tool that allows you to mount a remote file system onto your local server through an SSH connection, essentially creating a virtual local folder accessible by authorized users. SSHFS (Secure Shell Filesystem) uses the SSH (Secure Shell) protocol to communicate with the server, which encrypts all connections, keeping them secure.

Pre-requisites:

SSH authentication should be configured to shared folder server from primary and secondary servers.

Steps to install SSHFS by following the below command based on your Linux OS:

Debian/Ubuntu:

sudo apt-get update 
sudo apt-get install sshfs

CentOS/RHEL:

sudo yum install epel-release 
sudo yum install sshfs

FEDORA:

dnf install fuse-sshfs 

SUSE:

sudo zypper install sshfs 

After the installation is complete, create a folder in the required path ( eg: /opt/Failover/SharedFolder) in shared folder server, so that the input provided for shared folder path during Failover Configuration should be in the format SHARED_HOST:/Desired/Path eg: opm-shared:/opt/Failover/SharedFolder)

Thank you for your feedback!

Was this content helpful?

We are sorry. Help us improve this page.

How can we improve this page?
Do you need assistance with this topic?
By clicking "Submit", you agree to processing of personal data according to the Privacy Policy.