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.- Verify that the NFS server on the primary computer is installed and started.On a SLES primary computer:
- In YaST, click .
- Verify that Start is set and then click Next. You see that
/aiw
is one of the available directories. - Click Finish.
On a Red Hat or Rocky Linux primary computer:
- Open a command prompt and type this command:
- systemctl list-unit-files | grep nfs
- In the results, verify that the
nfs-server.service
andnfs-lock.service
services are listed. For supported Red Hat and Rocky Linux 8.x and 9.x versions, verify thatrpc-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
- Start or restart the
nfs-server.service
andnfs-lock.service
services.
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
- Update the
exports
file so the primary computer can connect to one or more secondary or application computers:- Open
/etc/exports
in a file editor. - 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)
- For a Linux secondary computer, use these parameters:
- Save the file and exit the editor.
- Open
- Restart the NFS server so it uses the updated file.
- On SLES, type:
- systemctl restart nfsserver
- On supported Red Hat and Rocky Linux 8.x and 9.x versions, type:
- systemctl restart nfs-server.service
- On SLES, type:
- 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.