In this hands-on lab, we will configure Network File Sharing (NFS) on a SUSE Linux Enterprise server. Once we have it configured, we will access that share from a second server. This task allows centralized storage for distributed users and can also be part of a disaster recovery scenario, as files located on the centralized server can be backed up and restored at the central location.
Successfully complete this lab by achieving the following learning objectives:
- On Server 2, via YaST, Install and Set Up NFS Server to Share Out `/exports/docs` Directory. Ensure It Is Writeable by Members of the `wheel` Group.
On Server 2, create the
/exports/docsdirectory and ensure is it writeable by
sudo mkdir -p /exports/docs cd /exports sudo chown -R root:wheel ./docs sudo chmod 770 ./docs
Configure the share:
Select Network Services > NFS Server.
Press space bar to select
Add the directory
Change the default options to
Press F10 to finish and F9 to quit.
Verify that the NFS server is set up properly:
- Mount the Network Share on Server 1 Using the CLI. Create a Directory and a File and Verify They Exist on Server 2.
Access Server 1 via SSH.
Create a mount point:
sudo mkdir /mnt/nfsdocs
Mount the share:
sudo mount 10.0.1.102:/exports/docs /mnt/nfsdocs
Set permissions on the directory:
sudo chown -R root:wheel /mnt/nfsdocs
sudo chmod 770 /mnt/nfsdocs
Create an example folder and a test file in the directory:
Verify they exist on the NFS server:
You should see the recently created file and directory from Server 1.