He is a Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!
The Network File System (NFS) is a client/server application that lets a computer user view and optionally store and update files on a remote computer as though they were on the user’s own computer. The NFS protocol is one of several distributed file system standards for network-attached storage (NAS).
Setup NFS Server
In my case, I have a new EBS volume which is mounted to nfs server on location /backup. I need this volume to be mounted on some of the other servers.
Step 1: Install NFS-server packages
Step 2: Create the shared folder and change the permissions
Step 3: Create the configuration file which has share details.
In the above case the NFS share will be accessible by 172.17.30.22, if you need your entire network to access the share then change it as given below.
You can add multiple shares in the same configuration file below is an example
Step 4: Restart the nfs-server service to make the configuration effective.
Now you have completed the NFS-server share configuration
Setup NFS client
Step 5: Install the NFS client package
Step 6: Create a folder where you want to mount the NFS share, In my case I’m going to create a folder called /data
Step 7: Mount the nfs share
Now execute df -h command to see the disk size with all the mount points
Step 8: Configure fstab
It is required to configure fstab otherwise once the system rebooted the mounted volume will get unmount. Then you need to mount it again manually. If fstab is configured whenever the system reboots the mount volume will be get mounted back automatically
save and apply. you can test the fstab is working by restart the client machine.
Happy learning
© 2020, Techrunnr. All rights reserved.