This chapter demonstrates how to set up your NFS server using Linux 7.3, 7.6, or 7.8.
Topics include:
Note:
You may choose to use another operating system for NFS (such as Solaris or Windows) provided that you understand how to implement the commands, permissions, groups and user access required for ACSLS 8.5.1 users and groups as outlined in the ACSLS 8.5.1 installation guide. NFS version 4 (NFS4) must be utilized for the NFS file system.In this section we will create the NFS4 file system on the NFS server. Special attention must be given to the options as this will enable ACSLS to share it's database (/export/home) across the two nodes.
The /export/home directory will be created under each Linux server's root file system and then be mounted to the /<folder-to-share-to-nodes> directory on the NFS server by the ACSLSHA application.
Note:
The /<folder-to-share-to-nodes> directory can be any directory on the NFS Server. However, it is highly recommended that the directory be empty and named something meaningful so as to easily identify what the share is being used for. In the examples below, the share folder that will be created will be named /node1-node2-acslsha-share.ASLSHA utilizes a small directory on the NFS server's file system. It is named /export/acslsha. You need not create or concern yourself with this directory. It is defined here only to point out that it should not be touched by any user. It is created by ACSLSHA and it updates two files, heartbeat1 and hearbeat2 as ACSLSHA monitors the system. ACSLSHA utilizes these files in order to ensure that Node1 knows that Node2 is healthy and visa versa. It is also used during ACSLSHA startup time in order to prevent both nodes from becoming the ”primary” in the event of a startup tie between the two nodes.
Perform the following steps to configure the NFS server:
Build a network bond between two NIC ports for load balancing and redundancy (see Figure 2-1).
# nmcli device status DEVICE TYPE STATE CONNECTION eno1 ethernet connected eno1 eno2 ethernet disconnected -- eno3 ethernet disconnected -- eno4 ethernet disconnected -- # nmcli connection add type bond con-name bond1NFSSrv ifname bond1NFSSrv mode blance-rr ip4 10.0.0.45/24 autoconnect yes # nmcli connection add type bond-slave con-name bond1NFSSrv-con1 ifname eno3 master bond1NFSSrv # nmcli connection add type bond-slave con-name bond1NFSSrv-con2 ifname eno4 master bond1NFSSrv # nmcli connection up bond1NFSSrv # systemctl restart network # nmcli device status DEVICE TYPE STATE ONNECTION bond1NFSSrv bond connected bond1NFSSrv eno1 ethernet connected eno1 eno2 ethernet disconnected -- eno3 ethernet connected bond1NFSSrv-con1 eno4 ethernet connected bond1NFSSrv-con2
Create ACSLS user IDs and groups according to the instructions provided in the ACSLS Installation Guide.
ACSLS requires specific users and groups to be created as part of its installation. These users and groups are also required on the NFS Server. Refer to the ACSLS Installation Guide for instructions on how to create the required users and groups on the NFS Server. Ownership/permissions must be applied to the NFS share directory. In this example, the ownership/permission requirements must be applied to the /node1-node2-acslsha-share
directory on the NFS server).
Install the nfs-utils
package:
# yum install nfs-utils
Edit the /etc/exports
file to define the directories that the server will make available for clients to mount. This directory will contain the ACSLS installation for both nodes. Each entry consists of the local path to the exported directory, followed by a list of clients (nodes 1 and 2) that can mount the directory with client-specific mount options in parentheses.
For example:
/node1-node2-acslsha-share 10.0.0.25(rw,sync,no_root_squash,no_all_squash) /node1-node2-acslsha-share 10.0.0.35(rw,sync,no_root_squash,no_all_squash)
Note:
There is no space between a client specifier and the parenthesized list of options.For more information, refer the exports(5)
manual page.
Start the nfs-server
service, and configure the service to start following a system reboot:
# systemctl start nfs-server # systemctl enable nfs-server
Note:
It has been determined that using DNS in order to reference the IPs on both the NFS server and the local nodes can cause errors if DNS is not accessible or is excessively slow. Please use explicate IPs.Use the mount command to test your NFS connections.
You should leave the NFS file system mounted from both nodes throughout the entire ACSLS and ACSLS installation and configuration processes.
# mkdir -p /export/home # mount -t nfs -o rw,suid,soft 10.0.0.45: /node1-node2-acslsha-share /export/home
where 10.0.0.45
is the IP address of the NFS server.
Note:
It has been determined that using DNS in order to reference the IPs on both the NFS server and the local nodes can cause errors if DNS is not accessible or is excessively slow. Please use explicate IPs.