FAQs CREODIAS Platform

How to export a volume over NFS (outside of a project)?

Prerequisites

This article presumes use of two Ubuntu or derivative system machines located in different projects and not connected via a private network. They both must have floating IPs assigned to them.

For the purpose of this tutorial the machines are:

  • host: 185.52.195.1

  • client: 185.52.195.2

On both servers we will create directory /xdata which will be shared.

Setting up the host

NFS server must be installed on the host system.

eouser@host:~$ sudo apt-get install nfs-kernel-server eouser@host:~$ sudo mkdir /xdata eouser@host:~$ sudo chown nobody:nogroup /xdata

 

Following that, edit /etc/exports and add the following line:

/xdata 185.52.195.2(rw,sync,no_subtree_check)

Start the server

eouser@host:~$ sudo systemctl restart nfs-kernel-server

 

Go to the OpenStack Dashboard and to Project>Network>Access and security (https://cf2.cloudferro.com/project/security_groups/).

Create a new security group, give it a name (eg. allow_nfs) and save it by clicking Create security group button. Click manage rules and add rule.

Use the following settings:

  • Rule: Custom TCP Rule

  • Direction: Ingress

  • Openport: Port

  • Port: 2049

  • Remote: CIDR

  • CIDR: 185.52.195.2

Click Add.

Switch over to Project>Compute>Instances panel (https://cf2.cloudferro.com/project/instances/).

From the drop-down menu on the right of the host instance, choose Edit Security Groups. Click on the plus icon on the newly created allow_nfs group.

This will move the group from "All Security Groups" to "Instance Security Groups".

Click Save.

Setting up the client

Again, NFS client needs to be installed on the client server; create a mount point and mount the volume.

eouser@client:~$ sudo apt-get install nfs-common eouser@client:~$ sudo mkdir /xdata eouser@client:~$ sudo mount 185.52.195.1:/xdata /xdata


Now check if the directory is mounted:

eouser@client:~$ df -h


Was this article helpful?

FAQ HOME