Frequently Asked Question
CephFS is the native file system provided by the Ceph distributed storage system. It allows you to mount a Ceph cluster as a traditional POSIX-compliant file system on Linux hosts, enabling applications to access objects stored in Ceph without modifying code.
How to use CephFS
1. Prerequisites
- Ensure you have a running Ceph cluster with the
cephfsservice enabled - Confirm the CephFS metadata server (MDS) and data pool are configured
- Verify network connectivity between the client host and Ceph monitors
2. Install Ceph client tools
On your Linux client host, install the Ceph client package:
sudo apt install ceph-client # Debian/Ubuntu
# or
sudo yum install ceph # RHEL/CentOS
3. Retrieve Ceph configuration
Obtain the cluster's configuration file (typically /etc/ceph/ceph.conf):
sudo cp /etc/ceph/ceph.conf /etc/ceph/ceph.conf
4. Add the CephFS client keyring
Ensure the client has access to the CephFS keyring:
sudo ceph auth get client.admin
# If needed, copy the keyring to the client host
sudo cp /etc/ceph/ceph.client.admin /etc/ceph/ceph.client.admin
5. Mount the CephFS filesystem
Create a mount point and mount the CephFS:
sudo mkdir -p /mnt/cephfs
sudo mount -t cephfs cephfs /mnt/cephfs
- Replace
cephfswith your actual CephFS namespace (if different) - Use the cluster's monitor addresses if specified in
ceph.conf
6. Verify the mount
Check that the filesystem is mounted correctly:
df -h /mnt/cephfs
ls -la /mnt/cephfs
7. Unmount when finished
sudo umount /mnt/cephfs
Common issues to check
- Ensure the
cephfsservice is running on the MDS nodes - Verify the client has the correct keyring permissions
- Confirm network routing between client and Ceph monitors
- Check for firewall rules blocking Ceph ports (6789, 6800-6802)
Notes
cephfs /mnt/cephfs cephfs _netdev,defaults 0 0
- CephFS supports standard Linux file operations (read, write, permissions)
- For persistent mounts, add an entry to
/etc/fstab: - Use
ceph fs statusto check CephFS service health - Consult Ceph documentation for advanced configuration options
cephfs
CephFS is a distributed file system provided by the Ceph storage platform. It allows you to mount a POSIX‑compatible file system on client machines, enabling standard file operations across a highly scalable backend.
Getting started
- Confirm prerequisites
- A running Ceph cluster with a CephFS service (MDS) configured.
- Network connectivity between the client host and the Ceph monitors.
- Appropriate permissions on the CephFS export (e.g., a client key with
allow rwxfor the desired namespace).
# Debian/Ubuntu
sudo apt install ceph-client
# RHEL/CentOS
sudo yum install ceph
- Install Ceph client tools on the client host
- Obtain the cluster configuration
- Copy the cluster’s
ceph.conffile to the client, typically located at/etc/ceph/ceph.conf. - Ensure the file contains the monitor addresses and the CephFS namespace details.
- Add the client keyring
sudo ceph auth get client.admin
sudo cp /etc/ceph/ceph.client.admin /etc/ceph/ceph.client.admin
- Retrieve the key for the client that is allowed to access CephFS:
- If the key is not already present on the client, copy it:
sudo mkdir -p /mnt/cephfs
- Create a mount point
sudo mount -t cephfs :/ /mnt/cephfs
- Mount the CephFS export
- Replace with the hostname or IP of an MDS node.
- Replace with the CephFS namespace you wish to mount (e.g.,
myfs).
df -h /mnt/cephfs
ls -la /mnt/cephfs
- Verify the mount
- Persist the mount (optional)
:/ /mnt/cephfs cephfs _netdev,defaults 0 0
- Add an entry to
/etc/fstabfor automatic mounting at boot:
Common troubleshooting steps
- Service health – Run
ceph fs statusto ensure the MDS service is healthy. - Keyring permissions – Confirm the client key has
allow rwxfor the target namespace. - Network – Verify that ports 6789 (monitor), 6800‑6802 (OSD), and the MDS port (usually 6803) are open between client and cluster.
- Firewall – Ensure local firewall rules do not block traffic to the MDS.
- Mount errors – Check
dmesgorjournalctlfor kernel‑level messages related to the mount attempt.
Basic usage after mounting
Once the CephFS filesystem is mounted at /mnt/cephfs, you can treat it like any other Linux file system:
- Create directories:
mkdir /mnt/cephfs/data - Create files:
echo "test" > /mnt/cephfs/data/file.txt - Set permissions:
chmod 644 /mnt/cephfs/data/file.txt - List contents:
ls -l /mnt/cephfs
All operations are performed over the Ceph backend, providing distributed performance and high availability.
This FAQ was generated and/or edited by GAIN, GENs Artificial Intelligence Network and should not be considered 100% accurate. Always check facts and do your research, things change all the time. If you are unsure about any information provided, please raise a support ticket for clarification.
