The content of this article only apply to the users of the EUMETSAT part of the EWC.

Pre-requisites

Setting up SFS in a tenancy can be done only by users with ewcloud-tenant-admin role!


Ticket

SFS should be available for tenants created after 28/10/2022, if the tenant is older and you wish to use SFS, please open us a ticket here.

1. Create Server Openstack SFS

1.1 From Morpheus go to Infrastructure → Storage, select the Servers tab and click +ADD

1.2. Fill the following data:

  • Select TYPE as Openstack SFS
  • Add a NAME as <tenant name>-sfs-server, e.g., be-rmib-rss-sfs-server
  • Select the CLOUD from the list (usually you only have one)

Once saved this will create the storage server.

2. Create a File share

Now that you have a storage server for SFS, you can create the File shares,

2.1  From the same page, go to the File Shares tab.

2.2 Click +ADD button to create a file share and select the Openstack SFS share

2.3 Fill the information:

  • Give it a NAME, e.g., be-rmib-rss-sfs-test
  • Select as STORAGE SERVICE the server you create in the previous step
  • Select 'nova' as the AVAILABILITY ZONE
  • Select NFS from SHARE PROTOCOL
  • Set the SIZE

Then click "Save Changes"

This will create the Shared Filesystem in the storage backend. Wait until you have the "Share Path:" defined in Morpheus. This will take some time.

3. Network configuration required for the VMs that need to access the SFS

Now that you have created the SFS, you can use it in a VM.

In order to do that, when provisioning a VM in Morpheus, you need to select two networks (private + sfs).

Add private first and then using the + button you will be able to add a second network: sfs network. At the end you will see something as below:

Then continue with normal provisioning.


Once provisioned is finished, ssh into your machine and verify if the SFS network is up:

ip addr show


Ubuntu 22 known issue due to race condition in cloud-init - Nov 2023

When running the ip addr show  command, you will notice that one network is not up by default. This is due to a known issue in Ubuntu 22 cloud-init that will be fixed in future updates.

If the SFS network is not UP by default. You need to perform these extra instructions as sudo:


  1. Create a file and save it under this path /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with content:

    network: {config: disabled} 


  2. Modify and save the cloud file at this path /etc/netplan/50-cloud-init.yaml adding the following lines in the list of ethernets:

            ens4:
                dhcp4: true
                match:
                    macaddress: COPY HERE THE ONE IDENTIFED FROM the command ip addr show for ens4 (e.g. fa:16:3e:14:d6:4c)
                set-name: ens4
                optional: true

    So you will have something like this at the end:

    # This file is generated from information provided by the datasource.  Changes
    # to it will not persist across an instance reboot.  To disable cloud-init's
    # network configuration capabilities, write a file
    # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
    # network: {config: disabled}
    network:
        ethernets:
            ens3:
                dhcp4: true
                match:
                    macaddress: fa:16:3e:c3:6d:1f
                set-name: ens3
            ens4:
                dhcp4: true
                match:
                    macaddress: fa:16:3e:14:d6:4c
                set-name: ens4
                optional: true
    
        version: 2
  3. Run the following command:

    netplan apply
  4. Finally verify the network is up, running ip addr show  again



4. Adding permissions to use the Shared Filesystem

Once the Shared Filesystem is created, you need to add access rules to allow read-only or read/write operations to one machine or multiple machines.

4.1 Go to Infrastructure → Storage → File Shares,  and click on the "Access" tab, then click the "+ ADD" button ...

4.2 Now you can fill the required information:

  • NAME: e.g. give a meaningful name
  • ROUTER: sfs router
  • AUTHORIZATION TYPE: IP
  • PERMISSION: Read Only or Read/Write access
  • ACCESS CONSTRAINT: Access IP of the local machine on the shared file system network (e.g. 10.84.??.??/32) or the range of IPs for all machines on the SFS network (10.84.??.0/24). In order to get the IP of your VM on the SFS network. Go to Provisioning > Instances > find your VM and click on it. Then go to network section as described below:

You will be able to see your private network and sfs network IPs:


5. Mount file share to VM

Now that everything is configured and permissions have been given for access, you can login into your machine and mount the shared filesystem in a VM using the following commands:

sudo mkdir /sfs-test # create the directory to mount the filesystem
sudo mount <PUT_YOUR_SFS_URL_HERE> /sfs-test

Example:

sudo mkdir /sfs-test # create the directory to mount the filesystem
sudo mount 10.83.81.227:/share_d161509e_2ea9_43f2_a472_b263ede7628f /sfs-test

This is good for a once-off test, but the mount won't be there after a reboot.  To make it persistent, which you almost certainly want to do, edit the mounts table (e.g. sudo nano /etc/fstab ) and add a line like the following:

10.83.81.227:/share_d161509e_2ea9_43f2_a472_b263ede7628f /sfs-test nfs defaults,rw 0 0

To test this, unmount the share with sudo umount /sfs-test  and then run sudo mount -a .  This should cause the share to mount again if you have everything correct, otherwise you'll see an error message.  If it worked, it's then safe to reboot the machine to test mounting on boot up.   If it didn't work, don't reboot until you've fixed it or commented out the entry as it may prevent a proper boot up and you'd have to look at the VM console in Morpheus to correct the problem.