Introduction
The NFS (Network-File-System) share allows file sharing across networked systems, allowing centralized data storage, efficient collaboration and simple access.
This How-To covers the initial steps of mounting a Network Share using an Ubuntu Operating System and connecting it to the ctrlX CORE.
Prerequisites
ctrlX CORE (version 3.4 or higher)
Ubuntu OS or Ubuntu Virtual Machine (the used OS in the How-To is an Ubuntu 18.04 Virtual Machine)
Internet Connection on Ubuntu Machine
1) Mount Network Share on your Ubuntu Machine
Configuring an NFS share on Ubuntu is straightforward, as it primarily involves using command-line tools.
While setting up an NFS share on Windows is also possible, the process can be considerably more complex.
Just follow these steps to successfully mount your NFS Share:
Open a new Command Window
Install the NFS Server
sudo apt update
sudo apt install nfs-kernel-server -y
Create shared directory
sudo mkdir -p /mnt/nfs-share
Avoid using underlines or other special characters in your folder names as some characters are currently blocked for the ctrlX CORE
Set permissions
sudo chmod 777 /mnt/nfs-share
Configure exports file
sudo nano /etc/exports
Add this line
/mnt/nfs-share 192.168.1.0/24(rw,sync,no_subtree_check)
This command allows all devices with an IP-address of "192.168.1.x" to access the network share. If your ctrlX CORE has a different IP-address, you have to adjust the command accordingly. Also the NFS-Server should be in the same subnet "192.168.1.y" (192.168.1.100 in this case).
Press "Ctrl+O", then "Ctrl+X" to save and to return to your command window
Restart Nfs service
sudo systemctl restart nfs-kernel-server
Enable NFS to start on boot
sudo systemctl enable nfs-kernel-server
Allow NFS through firewall
sudo ufw allow from 192.168.1.0/24 to any port nfs
sudo ufw reload
Install NFS Client
sudo apt update
sudo apt install nfs-common -y
Mount NFS Share on Client
sudo mkdir -p /mnt/nfs_client
sudo mount 192.168.1.100:/mnt/nfs-share /mnt/nfs_client
Note: "192.168.1.100" is the IP-Address of the NFS-Server. If you want to use a different IP, you have to modify the provided Code accordingly.
Verify Mount:
df -h | grep nfs
You should be seeing something like this now:
Mount NFS Share: Result
You can optionally make the Mount persistent (recommended). You will not have to mount the Share every time you restart your system.
sudo nano /etc/fstab
Add this line:
192.168.1.100:/mnt/nfs-share /mnt/nfs_client nfs defaults,_netdev 0 0
Create test file (optional test)
touch /mnt/nfs_client/testfile.txt
Note: Some of the commands might be unnecessary in your case. However, executing them will not harm your progress.
2) Mount NFS Share on your ctrlX CORE
Navigate in your ctrlX CORE to Settings -> Storage
Navigation to Mount the NFS Share on the ctrlX CORE Select "Mount network share"
Mount Network Share Enter the Server and the Share (Port can be let empty)
If you configured the NFS Share on a Virtual Machine, it might be easier to Mount the NFS share also in the Web Interface on your Virtual Machine than doing it on your Host
Mount Network Share: Configuration
After successful Mounting, your Network shares should look like this:
Screen after successful Mounting