Configuring the primary server to use NFS

To use NFS on an application server, you must verify that an NFS server is installed and started on the primary computer so the /aiw filesystem is accessible.
To configure the primary server to use NFS:
  1. Verify that the NFS server on the primary computer is installed and started.
    On a SLES primary computer:
    1. In YaST, click Network Services NFS Server.
    2. Verify that Start is set and then click Next. You see that /aiw is one of the available directories.
    3. Click Finish.

    On a Red Hat, CentOS, or Rocky Linux primary computer:

    1. Open a command prompt and type this command:
      • systemctl list-unit-files | grep nfs
    2. In the results, verify that the nfs-server.service and nfs-lock.service services are listed. For supported Red Hat and Rocky Linux 8.x and 9.x versions, verify that rpc-statd.service is listed. If either one is not included in the list, use Yum to install it.
      Open a command prompt and type this command, replacing service with the name of the service or services to install:
      • yum install service
    3. Start or restart the nfs-server.service and nfs-lock.service services.
      For Red Hat 7.6 through latest 7.X, type these commands:
      • systemctl restart nfs-server.service
      • systemctl restart nfslock.service
      • systemctl enable nfs-lock.service
      • systemctl enable nfs-server.service
    For supported Red Hat and Rocky Linux 8.x and 9.x versions, type these commands:
    • systemctl restart nfs-server.service
    • systemctl restart rpc-statd.service
    • systemctl enable rpc-statd.service
    • systemctl enable nfs-server.service
  2. Update the exports file so the primary computer can connect to one or more secondary or application computers:
    1. Open /etc/exports in a file editor.
    2. Add lines to create exports for the secondary or application computers. Follow this format, replacing serverN with the host names of the secondary or application computers.
      • For a Linux secondary computer, use these parameters:
        • /aiw server1(rw,no_root_squash,sync)
      • For an application server, use these parameters:
        • /aiw server1(crossmnt,rw,no_root_squash,sync,no_subtree_check)
      • For multiple application or secondary servers, include each server as an entry on the same line.

        As an alternative, type a space and a backslash (\) to continue on another line:

        /aiw server1 \
        (crossmnt,rw,no_root_squash,sync,no_subtree_check) \
        server2(crossmnt,rw,no_root_squash,sync,no_subtree_check) \
        server3 (crossmnt,rw,no_root_squash,sync,no_subtree_check)

    3. Save the file and exit the editor.
  3. Restart the NFS server so it uses the updated file.
    • On SLES, type:
      • systemctl restart nfsserver
    • On Red Hat 7.6 through 7.X and CentOS, type:
      • service nfs restart
    • On supported Red Hat and Rocky Linux 8.x and 9.x versions, type:
      • systemctl restart nfs-server.service
  4. If your network does not have a Domain Name System (DNS) server, edit /etc/hosts on the primary computer to add the host name and IP address of the computer that is prepared for the application servers or Secondary Server feature.