- content:
-
Using a shared filesystem
To add File Share, you must first create a Server. To do this, go to Infrastructure->Storage.
After going to Storage, go to the Servers tab.
To add a new server, press the "+ADD" button.
After pressing the button, a window with the form of creating a new server will appear:
- NAME - name of the new server,
- DESCRIPTION - new server description,
- ENABLED - this option should be checked by default,
- TYPE - change to the Openstack SFS option,
- CLOUD - select the cloud on which you want to run the server.
The new server will be visible in the server list.
Remember that if you want your instance to have access to Share File it must have an additional StorageNFS network interface attached.
After creating the instance, go to its detailed information and then from the bottom section select the "Network" tab. Save the IP to the Storage NFS network, it will be needed when granting access to this address.
After creating the instance with the Storage NFS network interface, we can proceed to create a File Share. To do this go to Infrastructure->Storage and then select the File Shares tab. To create a new File Share, press the "+ADD" button and then select Openstack SFS Share.
After selecting this option, a window will appear with a form for creating a new File Share:
- NAME - File Share name,
- STORAGE SERVICE - select the server you created earlier,
- AVAILABILITY ZONE - select the "nova" option,
- SHARE SIZE - File Share size.
Leave the rest of the options unchanged. After entering the necessary data, press the "SAVE CHANGES" button.
Once created, File Share will be visible in the File Shares list. Note the SHARE PATH column, it will only contain "/" as soon as it is created.
However, the entire path should be generated within a few minutes. If the path did not generate up to ~ 30 min, please contact with WEkEO Support. To go to detailed information about a given Share File click on its name.
To access a given Share File from an instance level, add a rule to a specific address. To do this, press the Access tab and then the "+ADD" button.
After pressing the button, the form will appear with the creation of a new rule:
- NAME - name of the new rule,
- ROUTER - router in your cloud,
- AUTHORIZATION TYPE - select the "IP" option,
- ACCESS CONSTRAINT - enter the address that you previously saved from the Network tab from the instance level, and then add /32 to the end to restrict access to this address only (e.g. 10.211.25.43/32),
- PERMISSION - set Read & Write to be able to both read and write files.
If you want to mount the newly created File Share, first go to the instance via SSH and show configuration of the eth1 interface.
ip a show eth1
Obtain an IP address from DHCP pool.
dhclient eth1
Check if your interface obtained an IPv4.
ip a show eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc fq_codel state UP group default qlen 1000
link/ether fa:16:3e:fa:52:10 brd ff:ff:ff:ff:ff:ff
inet 10.211.25.43/21 brd 10.211.31.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::f816:3eff:fefa:5210/64 scope link
valid_lft forever preferred_lft forever
Install nfs-common
apt install nfs-common
Create a mountpoint for your file share
mkdir mountpoint
Mount the file share in directory called mountpoint. For this we need to copy the Share Path.
And then mount it.
mount 10.211.11.10:/share/_nogroup/1262d98c-fbee-4d58-bf49-9ea05ed31ca4 mountpoint/
A new file share has been mounted in your system. Your VM has an access for read/write operations:
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 3.3G 16G 18% /
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/1002
10.211.11.10:/share/_nogroup/1262d98c-fbee-4d58-bf49-9ea05ed31ca4 20G 0 20G 0% /home
- content: