Introduction
NFS (Network File System) allows a Linux or cPanel server to access remote storage over the network as if it were a local filesystem. Mounting an NFS share is commonly used for backups, shared storage, and centralized data management.
Prerequisites
- Root or SSH access to the server
- NFS server IP address and shared directory details
- NFS utilities package installed on the server
Implementation
Mounting NFS File System
Step 1
Log in to the cPanel server.
Step 2
Install the NFS client package on the CentOS server.# yum install nfs-utils
Step 3
Create a mount point directory for the remote NFS share drive.# mkdir /backups
Step 4
Open the /etc/fstab file.# vi /etc/fstab
Add the following line to the file:
192.168.1.10:/volume1/pheonixsolutions/backups nfs defaults 0 0
Note:
- 192.168.1.10 → NFS server IP address
- /volume1/pheonixsolutions → NFS server shared directory
- /backups → Local mount point
Step 5
Run the following mount command:# mount /backups
or# mount 192.168.1.10:/volume1/pheonixsolutions
Step 6
Verify the mounted NFS share using the following command:#df -h
Note:
If the server reboots, the NFS share drive will mount automatically because it was added to the /etc/fstab file.
Unmounting NFS File System
Step 1
Use the following command to unmount the NFS share drive:# unmount /backups
or# unmount 192.168.1.10:/volume1/pheonixsolutions
Step 2
If the NFS mount entry exists in the /etc/fstab file, remove it manually.
Conclusion
By mounting an NFS share drive on your Linux or cPanel server, you can efficiently manage remote storage for backups and shared data access. Unmounting the share properly ensures clean disconnection and prevents mounting issues after reboot.