Guide: Using a shared filesystem

content:

Using a shared filesystem

This guide explains how to add a server with two interfaces, bring up the second interface, add a file share, add an access rule and mount in the VM.

Create a storage server

Sign in to your Morpheus dashboard and go to the Infrastructure panel. Choose Storage.

Click on the Servers tab.

Click on Add to create a storage server.

Configure the new storage server, as per the example below.

Your storage server has been created.

Create an instance

To create an instance, follow the dedicated guide. Remember to attach the second network interface (StorageNFS) in order to obtain an access to storage server.

Create a file share

Go to Infrastructure > Storage > File shares.

Click on Add and choose OpenStack SFS Share.

Create a file share using this example configuration:

Your file share has been created. Click on test_1 in the Name column.

Open the Access tab and click on Add.

Configure access role for read/write permission using example configuration. In Access constraint label you can define a specific IP address of IP of the network.

Caveats

You may encounter an empty value in the Router label in configuration presented above that will prevent you from adding access rule. Due to a known Morpheus bug concerning router visibility, you will need to manually add additional router with default settings.

To do this, go to Infrastructure > Network and click on Add.

Create a simple router with an arbitrary name. It does not have to configured external or internal subnet. Then please leave those parameters empty:

Afterwards please try to apply an access rule once more. Apologies for any inconveniences, this bug should be fixed soon.

Bring up an network interface and mount a file share

Establish ssh connection and show configuration of the eth1 interface.

root# ip show eth1
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether fa:16:3e:bc:d4:68 brd ff:ff:ff:ff:ff:ff

Obtain an IP address from DHCP pool.

root# dhclient eth1

Check if your interface obtained an IPv4.

root# ip a show eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether fa:16:3e:bc:d4:68 brd ff:ff:ff:ff:ff:ff
inet 10.215.24.132/21 brd 10.215.31.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::f816:3eff:febc:d468/64 scope link
valid_lft forever preferred_lft forever

Install nfs-common.

root# apt install nfs-common

Create a mountpoint for your file share.

root# mkdir mountpoint

Mount the file share in directory called mountpoint.

root# mount 10.215.11.10:/share/_nogroup/e1a3e058-02c4-4e98-83de-b28c81ce5e8f mountpoint

A 11-GB file share has been mounted in your system. Your VM has an access for read/write operations:

root# df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 798M 3.0M 795M 1% /run
/dev/vda1 20G 2.7G 17G 15% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
tmpfs 798M 0 798M 0% /run/user/1001
10.215.11.10:/share/_nogroup/e1a3e058-02c4-4e98-83de-b28c81ce5e8f 11G 0 11G 0% /root/mountpoint