Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Add Cephfs to Debian

Ceph is a distributed filesystem. Here I’m adding client filesystem access to a Docker host so I can abstract away the local storage.

This will allow me to later start and stop compute loads on other nodes.

Requirements

  • ceph-common, the APT package
    • version should match the cluster
  • /etc/ceph/ceph.conf, how to access the cluster
  • /etc/ceph/ceph.keyring, credentials for the cluster
  • /mnt/docker-on-ceph, the mount point
  • /etc/fstab, includes the the mount point

This assumes Ceph is working.

My Ceph version is 19 – that’s Squid.

I use sudo su - before all of this.

Add the Repo

wget -q -O- 'https://download.ceph.com/keys/release.asc' | apt-key add -
echo deb https://download.ceph.com/debian-squid/ $(lsb_release -sc) main \
    | tee /etc/apt/sources.list.d/ceph.list

Update and Install

apt update && apt install ceph-common

Request Permissions

On the cluster, using Ceph, request permissions for the would-be mount point.

ceph fs authorize cephfs client.grove /docker rw

Get the Key

ceph auth get-or-create client.grove

Mine looks like this.

[client.grove]
        key = uDEyQEqHajxXWCRU44HEhHMkvVzB2mDHoe3qfV==
        caps mds = "allow rw fsname=cephfs path=/docker"
        caps mon = "allow r fsname=cephfs"
        caps osd = "allow rw tag cephfs data=cephfs"

Copy Key to the Client

It goes here.

/etc/ceph/ceph.keyring

Modify Fstab

This is inside of /etc/fstab

This is TAB spaced, with six columns.

:/docker        /mnt/docker-on-ceph     ceph   name=orchard,_netdev,noatime 0       0

Make the Mount Point

mkdir /mnt/docker-on-ceph

Mount

mount /mnt/docker-on-ceph

References

File System Guide | Red Hat Ceph Storage

Last Modified • Sunday, June 14, 2026. 9:31 pm UTC+00:00 • Commit: e0033bb