02/13/2025
ctrlX CORE | NFS Share | Ubuntu

Setup and Mount Network Share (NFS) using an Ubuntu OS

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:

  1. Open a new Command Window

  2. Install the NFS Server

    1. sudo apt update

    2. sudo apt install nfs-kernel-server -y

  3. Create shared directory

    1. sudo mkdir -p /mnt/nfs-share

    2. Avoid using underlines or other special characters in your folder names as some characters are currently blocked for the ctrlX CORE

  4. Set permissions

    1. sudo chmod 777 /mnt/nfs-share

  5. Configure exports file

    1. sudo nano /etc/exports

    2. Add this line

      1. /mnt/nfs-share 192.168.1.0/24(rw,sync,no_subtree_check)

      2. 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).

    3. Press "Ctrl+O", then "Ctrl+X" to save and to return to your command window

  6. Restart Nfs service

    1. sudo systemctl restart nfs-kernel-server

  7. Enable NFS to start on boot

    1. sudo systemctl enable nfs-kernel-server

  8. Allow NFS through firewall

    1. sudo ufw allow from 192.168.1.0/24 to any port nfs

    2. sudo ufw reload

  9. Install NFS Client

    1. sudo apt update

    2. sudo apt install nfs-common -y

  10. Mount NFS Share on Client

    1. sudo mkdir -p /mnt/nfs_client

    2. sudo mount 192.168.1.100:/mnt/nfs-share /mnt/nfs_client

      1. 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.

    3. Verify Mount:

      1. df -h | grep nfs

    4. You should be seeing something like this now:

      Mount NFS Share: Result
  11. You can optionally make the Mount persistent (recommended). You will not have to mount the Share every time you restart your system.

    1. sudo nano /etc/fstab

    2. Add this line:

      1. 192.168.1.100:/mnt/nfs-share /mnt/nfs_client nfs defaults,_netdev 0 0

  12. Create test file (optional test)

    1. 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

  1. Navigate in your ctrlX CORE to Settings -> Storage

    Navigation to Mount the NFS Share on the ctrlX CORE
  2. Select "Mount network share"

    Mount Network Share
  3. Enter the Server and the Share (Port can be let empty)

    1. 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
  4. After successful Mounting, your Network shares should look like this:

    Screen after successful Mounting
1

Latest published/updated articles

Types
How-to
Categories
Controls