Access Shares
Note
Red Cloud 2 is currently in beta testing and not available to all users. If you are not a Red Cloud 2 beta tester, use the production Red Cloud instead. This Red Cloud 2 documentation is still under development.
Beta testers: Report all problems to CAC Help. Please specify Red Cloud 2 when reporting problems. Thank you!
This document describes how to access a CephFS share in Red Cloud 2. A CephFS share can be accessed by Red Cloud 2 instances or any virtual or physical hosts on Cornell campus network.
Prerequisites
- A CephFS share in Red Cloud: If you have a Red Cloud subscription, you can follow these instructions to create a CephFS share in Horizon Web Console or using Openstack CLI client.
- A Ceph key with either read-only or read-write access to the CephFS share: If you are the owner of the CephFS share, you can create a Ceph key by adding a share rule using Horizon Web Console.
- A client host running an operating system supported by CephFS.
Install CephFS Client
The official Red Cloud Rocky and Ubuntu Linux images include CephFS client. You can skip to the configuration section if the client is a Red Cloud instance created from an official Rocky or Ubuntu Linux image.
-
Rocky Linux:
dnf -y install epel-release centos-release-ceph-reef
dnf -y install python3-cephfs ceph-common
-
Ubuntu Linux:
apt install ceph-common
Configure CephFS Client
As the root
user on the client:
-
Create the
/etc/ceph/ceph.client.${accessTo}.keyring
keyring file with access key like this:[client.${accessTo}] key = ${accessKey}
where
${accessTo}
and${accessKey}
are the "Acess To" and "Access Key" fields of the share rule. -
Make the
/etc/ceph/ceph.client.${accessTo}.keyring
keyring file readable only to root:chown root:root /etc/ceph/ceph.client.${accessTo}.keyring chmod 0600 /etc/ceph/ceph.client.${accessTo}.keyring
-
Add the following line to
/etc/fstab
:${path} ${mountPoint} ceph name=${accessTo},x-systemd.device-timeout=30,x-systemd.mount-timeout=30,noatime,_netdev,rw 0 2
You can find the value for
${path}
underExport locations
when you click on the share in the Shares screen or the output of theopenstack share show -c export_locations <share name>
command.${mountPoint}
specifies where you want CephFS to be mounted on your client.For example:
128.84.20.11:6789,128.84.20.12:6789,128.84.20.15:6789,128.84.20.13:6789,128.84.20.14:6789:/volumes/_nogroup/fe4f8ad4-2877-4e23-b5d3-46eb8476750b/ab404bac-9584-45f4-8a34-92dfc61fbb98 /cephfs ceph name=smithlabRWaccess,x-systemd.device-timeout=30,x-systemd.mount-timeout=30,noatime,_netdev,rw 0 2
-
Run the
mount ${mountPoint}
command to mount CephFS share anddf -h ${mountPoint}
to verify the CephFS share is mounted successfully.