Skip to content

Configuring a VM to use Manila Shares

Placeholders on this page

Please note that any code snippets formatted like ${placeholder} are placeholders for your names that you used when you created the Manila shares in Horizon or via the CLI.

Pre-requisites

All JS2 featured images will have the necessary Ceph repository and packages installed. You will need to make sure you have ceph-common from the Ceph repository. Instructions may be found here:

https://docs.ceph.com/en/quincy/install/get-packages/

If you aren’t comfortable with adding repositories and installing packages, we highly recommend that you use a featured image.

1. Create a mount point on your instance

This can be anywhere in the filesystem. We recommend using a descriptive name.

mkdir /smith-lab-data

2.Configuring your instance

Using the name and key of the access rule you created, complete these steps:

i. Create the file /etc/ceph/ceph.client.${accessTo}.keyring and add the accessKey

Example:

sudo vi /etc/ceph/ceph.client.smithlabRWaccess.keyring

and add

[client.smithlabRWaccess]
    key = AQAHfhZiwTf/NhAAT5ChE4tDXt3Nq1NyiURbMQ==

Also, make sure the permissions on the file are rw to the owner only. You can do that with

sudo chmod 600 /etc/ceph/ceph.client.smithlabRWaccess.keyring

ii. Edit /etc/fstab to include the following line:

Using the path from the share creation and the name and key of the access rule you created, add your entry to the fstab so it mounts at boot time:

$path /smith-lab-data ceph name=${accessTo},x-systemd.device-timeout=30,x-systemd.mount-timeout=30,noatime,_netdev,rw 0   2

$path = IP#:ports followed by volume path (/volume/_no-group/uuid/uuid)

Please make sure to change the $variables to whatever you set these values to in Manila or the CLI when you created the share

Example:

149.165.158.38:6789,149.165.158.22:6789,149.165.158.54:6789,149.165.158.70:6789,149.165.158.86:6789:/volumes/_nogroup/fe4f8ad4-2877-4e23-b5d3-46eb8476750b/ab404bac-9584-45f4-8a34-92dfc61fbb98 /smith-lab-data ceph name=smithlabRWaccess,x-systemd.device-timeout=30,x-systemd.mount-timeout=30,noatime,_netdev,rw 0 2

3. Mount the share

Mount the manila share created with the following command mount -a

If you then run a df -h|grep vol you should see something like this:

149.165.158.38:6789,149.165.158.22:6789,149.165.158.54:6789,149.165.158.70:6789,149.165.158.86:6789:/volumes/_nogroup/fe4f8ad4-2877-4e23-b5d3-46eb8476750b/ab404bac-9584-45f4-8a34-92dfc61fbb98   1.8T  134G  1.7T   2% /smith-lab-data