Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You should see an entry like this

If no share network is available in your cloud, please open a ticket with the support team to resolve the issue.

Create a File share

File shares can be created using the OpenStack CLI. First it is recommended to check what types of SFS are available in your cloud, to do that, run 

...

Add the VM to the Share Network

In order for a VM to have access to a SFS it needs to be able to trace a route to the SFS via a share network. At EWC this is achieved via a specific private network, typically called sfs_network_<project_id>, and a router that provides a static route to the share network. When provisioning an instance, add the sfs network to the list of networks for the VM (usually in addition to private). First run the command

Code Block
openstack network list

which will show you the name and ID of the network. Then use this when provisioning by following the instructions in EWC OpenStack API access - How to create a VM using the OpenStack CLI.

If the instance has already provisioned, one can add the VM to the network at any point afterwards with the command

Code Block
openstack server add network <instance> <network>

In order to find out the IP that was assigned to the network, just check the details of the VM with

Code Block
openstack server show <instance>

which will have a line that looks like

Image Modified

with the IP address of the VM in the SFS network. This IP will be necessary to give the VM access to the SFS later on, so make note of it.

In order to ensure that the VM has access to the share network through the router, the security groups for the VM's port in the SFS network must allow egress to the required IPs. The pre-configured security groups defaultssh and ssh-http-https, among others, have the right permissions to access the SFS, so make sure that these are added to the VM when provisioning it or at any time afterwards.

...

Code Block
sudo mount <share_export_path> <path>/<to>/<local>/<share>

To make the SFS persistent after reboot, which you almost certainly want to do, edit the mounts table (e.g. sudo nano /etc/fstab ) and add a line like the following:

Code Block
<share_export_path> <path>/<to>/<local>/<share> nfs defaults,<rw/ro> 0 0

for example, to mount the share shown before in the /local/sfs directory, with read-write permissions, the line will look like

Code Block
10.214.37.37:/share_a8d18d6b_8d18_42fc_b4d1_7498d833ebe0 /local/sfs 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.

Resizing an existing file share

...