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 ServicesNFS 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 primary computer, for Red Hat 6.7 through latest 6.X:
    1. Open a command prompt and type this command:
      • chkconfig --list
    2. In the results, verify that the nfs and nfslock services are 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 and nfslock services.
      Type these commands:
      • service nfs restart
      • service nfslock restart
      • chkconfig --level 35 nfs on
      • chkconfig --level 35 nfslock on

    On a Red Hat primary computer, for Red Hat 7.1 through latest 7.X:

    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. 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.
      Type these commands:
      • systemctl restart nfs.service
      • systemctl restart nfslock.service
      • systemctl enable nfs-lock.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 AIX secondary computer, use these parameters:
        • /aiw server1(rw,no_root_squash,sync,insecure)
      • 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:
      • /etc/init.d/nfsserver restart
    • On Red Hat, type:
      • service nfs restart
  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.