This article provides step-by-step instructions on how to create, expose and
mount a VPSA NFS share with Linux servers.
OS distros that were tested with this article: RHEL8.1 \ RHEL 8.2 and Ubuntu 20.04.
Default NFS client version on these distros is 4.2, and Zadara recommend you to use that version.
You can use the nfsvers option to determine a lower version of NFS client.
1. Create a NAS Volume and allow servers access
On the VPSA GUI, highlight Volumes, then select Create \ Create NAS Share
The Create Volume dialog will appear.
Fill in the NAS Volume properties: Name, Capacity, NAS Export Name.
Press Submit and then Yes on the confirmation popup window.
For more info regarding volume properties please refer the Zadara VPSA Guide in the following link
2. Attach the NAS Volume as an NFS Share to a Server
On the VPSA GUI, highlight Servers, then select Add \ Manual
The Create server dialog will appear.
Fill in the server/s Name, check in the Linux button and fill in IP address (for a single server) or CIDR Block (for multiple servers)
Press Create and then Yes on the confirmation popup window.
On the VPSA GUI, highlight Servers and the server’s Name.
then select Volumes and Attach
The Attach volumes dialog will appear.
Select the volume you wish to attach and select NFS for Attach type
Press Attach and OK on the confirmation popup window
Your new NFS volume is ready to be mounted from Linux Servers
To check or edit the export name, highlight Volumes and the volume name.
Check the volume’s details pane.
3. Connect the NFS share to a Linux Client:
3.1 Add NFS support to your Linux Server:
- In Ubuntu:
Run apt list --installed | grep nfs-common to check if nfs-common is installed.
To install nfs-common run sudo apt-get install nfs-common
- In Redhat/CenOS:
Run rpm -qa | grep nfs-utils to check if nfs-utils is installed.
To install nfs-utils run sudo yum install nfs-utils
3.2 Create a mount point in the Linux Server
sudo mkdir /Zadara
3.3 For one time mount run to following :
sudo mount –t nfs -o options <VPSA IP>:/<Export Name> /<mount point>
sudo mount -t nfs -o nfsvers=4.1 172.31.10.2:/export/Zadara_NFS_VOL1 /Zadara
(In this example, the mount will use NFS version 4.1)
3.4 To automatically mount the volume on system startup add the following
line to /etc/fstab
<VPSA IP>:/<Export Name> /<mount point> nfs options 0 0
172.31.10.2:/export/Zadara_NFS_VOL1 /Zadara nfs defaults,nfsvers=4.1,_netdev 0 0
We recommend to add the following to the defaults options
- nfsvers - determine NFS protocol version
- _netdev - prevent the system from attempting to mount a NAS filesystem before network services has been enabled on the server.
3.5 For systemd based distros like RHEL \ Ubuntu, you can use systemd to mount your NFS share. If you use systemd for mounting, there is no need to make entries in /etc/fstab.
Please see following example on how to use systemd to mount your NAS filesystem
- On the server create mount point for your NAS filesystem:
sudo mkdir /Zadara
- For mount point /Zadara , save the following syntax as mount in /etc/systemd/system.
Please note, when using mount point path containing slashes, you will need to replace the slashes with minuses, meaning, for mount point /mnt/Zadara save the file as mnt-Zadara.mount
Description=Zadara VPSA NFS mount
- After saving the file as /etc/systemd/system/Zadara.mount do the follow:
- sudo chown root:root /etc/systemd/system/Zadara.mount
- sudo chmod +x /etc/systemd/system/Zadara.mount
- sudo systemctl daemon-reload
- sudo systemctl enable Zadara.mount
- sudo systemctl start Zadara.mount
4. Basic Authentication Settings
By default "root" user and group at NFS client are mapped to "root" user and group in the VPSA NFS server. All other users are mapped to user "nobody" and group "nogroup".
In order to set a basic NFS authentication so that users and groups at the client will be mapped to the corresponding users and groups at the VPSA NFS server please refer to “creating NAS Users” section on the Zadara VPSA user guide: