KB450228 – Mounting CephFS

Last modified: July 28, 2021
You are here:


  • This guide will show you how to mount CephFS filesystem on a Linux client using a kernel driver mount and secret file.



Ceph-Common Package Installation

  • The only package required on the client is ceph-common package and its dependencies.
  • First, we’ll have to enable the Ceph repositories on our client machines.

CentOS 7

root@centos7-45drives:~# cat <<EOF >> /etc/yum.repos.d/ceph_stable.repo 
  baseurl = http://download.ceph.com/rpm-octopus/el7/$basearch 
  gpgcheck = 1 
  gpgkey = https://download.ceph.com/keys/release.asc 
  name = Ceph Stable $basearch repo priority = 2
  baseurl = http://download.ceph.com/rpm-octopus/el7/noarch
  gpgcheck = 1
  gpgkey = https://download.ceph.com/keys/release.asc
  name = Ceph Stable noarch repo
  priority = 2
  • Now we can install the ceph-common package.
root@centos7-45drives:~# yum install ceph-common

Ubuntu 20.04

  • Create the file “ceph-octopus.list” to the directory below, and add the following lines to the document.
root@ubuntu-45drives:~# vim /etc/apt/source.list.d/ceph-octopus.list
deb https://download.ceph.com/debian-octopus/ focal main
# deb-src https://download.ceph.com/debian-octopus/ focal main
  • Update the system to get the new repo.
root@ubuntu-45drives:~# apt update 
if the update fails try the flag "--allow-unverified"
root@ubuntu-45drives:~# apt upgrade
  • Now we can install the ceph-common package.
root@ubuntu-45drives:~# apt install ceph-common

Creating CephFS mount point on client

  • First, create a directory to mount CephFS.
root@client-45drives:~# mkdir /mnt/mycephfsmount

Mounting CephFS on client

  • Next, we mount the filesystem to that directory using the following command.
root@client-45drives:~# mount -t ceph {ip-address-of-ceph-monitor}:/ /mnt/mycephfsmount -o name=admin,secretfile=/etc/ceph/admin.secret

  • For example, if our Ceph Monitors were,, and, we would mount CephFS similar to the following.
root@client-45drives:~# mount -t ceph,, /mnt/mycephfsmount -o name=admin,secretfile=/etc/ceph/admin.secret

Configuring CephFS in /etc/fstab

  • Next, we’ll have to configure our CephFS mount to automagically remount on reboot by editing the /etc/fstab file.
root@client-45drives:~# vim /etc/fstab
  • We can add the following to our fstab file to ensure it will remount on reboot.
CEPH-MON-IP(s):/     /mnt/mycephfsmount   ceph    name=admin,secretfile=/etc/ceph/admin.secret	noatime,_netdev 0 0,, /mnt/mycephfsmount ceph name=admin,secretfile=/etc/ceph/admin.secret,noatime,_netdev 0 0


  • If we run df -h we should now see CephFS mounted and the available storage for the mount.
root@client-45drives:~# df -h

Further Reading

Was this article helpful?
Dislike 0
Views: 1385
Unboxing Racking Storage Drives Cable Setup Power UPS Sizing Remote Access