Create shared storage with CephFS¶
-
Configure network connectivity.
- Under Network→Routers click the "Create Router" button.
- Fill out the "Router Name" field with the name of the router.
- Pick "External Network" and choose "PSNC-STORAGE-MANILA" network to connect the router to the storage network.
- Click "Create Router"
- Click on the previously created router or select arrow and select "Edit Router" from the context menu on the right side of the router row.
- Click "Interfaces" tab.
- Click "Add Interface".
- In the "Subnet" list, select the subnet of your private network.
- Enter an IP address from your subnet range that is not already occupied. This IP address will act as a static route gateway to the shared storage.

- Click "Submit".
- In order to use the shared storage, you need to configure static routing to the storage. You can configure it manually or dynamically by fetching it from DHCP. If you prefer the second option, follow the steps below:
- Navigate to Network→Networks and select your private network.
- Click on the "Subnets" tab.
- From the context menu on the right side of the subnet row (the one previously connected to the router by creating the interface), select "Edit Subnet".
- Go to the "Subnet Details" tab.
- In the "Host Routes" field, enter the static route to the shared storage you plan to use. For using Ceph Frappucino shared storage, enter the 10.66.2.0/24 subnet and the next hop, which is the IP address of the interface you created in the previous steps.
- In this example, the next hop is 192.168.0.250, so the entry should look like: 10.66.2.0/24,192.168.0.250

- In this example, the next hop is 192.168.0.250, so the entry should look like: 10.66.2.0/24,192.168.0.250
- Click "Save".
-
Create the Share.
- Navigate to Share→Shares and click "Create Share" button.
- Fill out the field "Share Name" to give your share a unique name.
- Choose CephFS from the "Share Protocol" list.
- Enter size in the "Size (GiB)" field.
- Pick CephFS-Frappuccino from the "Share Type" list.
- Pick BST from the "Availability Zone" list.
- Click "Create" button.
- In the "Actions" column, from the context menu on the right side of the share row, select "Manage Rules".
- Click "Add rule".
- Choose cephx in the "Access Type" list.
- Fill out "Access To" field with string which will be identifier for the access rule (this is typically the clientor user ID).
- Click "Add" button.
- Navigate to Share→Shares and select previously created share.
- Copy the mount path from the Path field and store it for later use.
- Copy the name from the Access To field and the access key from the Access Key field and store them secure>
- From Metadata copy __mount_options field and store it for future reference.

- Mount the share on the virtual machine.
- Log in to your virtual machine, on which you want to mount CephFS shared storage.
- In you configured static route in DHCP options of your network subnet, reboot the virtual machine for fetching and configure static route using DHCP.
- Install necessary packages on your system.
- For Ubuntu do:
$ apt update && apt install ceph-common
- For Ubuntu do:
- For Rocky Linux 9 do:
$ sudo dnf install epel release sudo rpm -Uvh https://download.ceph.com/rpm-squid/el9/noarch/ceph-release-1-1.el9.noarch.rpm sudo dnf install ceph-common - Mount the CephFS share. You can mount the share manually or use fstab for persistent mounting.
- In order to mount the share manually, use previosuly copied information (path, access name, access key, and mount options) to manually mount the CephFS share.
- The command has the following structure:
$ mount -t ceph {Path} -o fs={__mount_options},name={Access to,secret={Access Key} /{mountpoint} - Example of the command based on the created share:
mount -t ceph 10.66.2.110:6789,10.66.2.176:6789,10.66.2.144:6789,10.66.2.154:6789,10.66.2.132:6789:/volumes/_nogroup/94bed978-f645-4031-a0f6-79afcce15101/5588553b-f598-47da-8a7a-87c8aa1cf24b \ -o fs=cephfs-kmd3-PROD,name=share-user1,secret=AQCpaO1m0JsALhAAYh2wbnPmn+0P8uESfEbn0A== /mnt
- The command has the following structure:
- In order to mount using fstab, add entry in /etc/fstab using the previously copied information (path, access name, access key, and mount options).
- The entry in fstab should follow this structure:
$ {path} /{mountpoint} ceph fs={__mount_options},name={Access to,secret={Access Key} - Example of the entry based on the created share::
$ 10.66.2.110:6789,10.66.2.176:6789,10.66.2.144:6789,10.66.2.154:6789,10.66.2.132:6789:/volumes/_nogroup/94bed978-f645-4031-a0f6-79afcce15101/5588553b-f598-47da-8a7a-87c8aa1cf24b /mnt ceph fs=cephfs-kmd3-PROD,name=share-user1,secret=AQCpaO1m0JsALhAAYh2wbnPmn+0P8uESfEbn0A== 0 2 - Run mount -a to mount the share using fstab entry.
- The entry in fstab should follow this structure:
- In order to mount the share manually, use previosuly copied information (path, access name, access key, and mount options) to manually mount the CephFS share.
- You may encounter warnings such as:
"can't open ceph.conf: (2) No such file or directory"
"auth: unable to find a keyring on /etc/ceph/ceph.client.share-user1.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin: (2) No such file or directory"
These warnings do not prevent you from using the mounted share. To eliminate the warnings, create the required files: - Create ceph.conf with following content:
$ [global] fsid = 2487c286-23f6-11ef-bd24-97a8567aaf29 mon_host = [v2:10.66.2.110:3300/0,v1:10.66.2.110:6789/0] [v2:10.66.2.132:3300/0,v1:10.66.2.132:6789/0] [v2:10.66.2.144:3300/0,v1:10.66.2.144:6789/0] [v2:10.66.2.154:3300/0,v1:10.66.2.154:6789/0] [v2:10.66.2.176:3300/0,v1:10.66.2.176:6789/0] auth_cluster_required = cephx auth_service_required = cephx auth_client_required = cephx - Create /etc/ceph/ceph.keyring file with following content:
$ [client.{Access To} {Access Key} - Example based on the created share:
$ [client.share-user1] key = AQCpaO1m0JsALhAAYh2wbnPmn+0P8uESfEbn0A== - Now, you can verify if the share is mounted properly. Run the mount command or check /proc/mounts to confirm the share is successfully mounted.