Member-only story
Ceph NFS Setup with HA
3 min readApr 16, 2023
In this article, we will cover how to set up NFS servers on Ceph clusters. Ceph uses NFS-Ganesha NFS server. It only supports NFS v4.0+.
1. Deploying a single NFS server
A single command will deploying a NFS server.
sudo ceph nfs cluster create [nfs-cluster-name]
We can check the status of the creation with these commands.
sudo ceph orch ls --service_name=nfs.[nfs-cluster-name]
sudo ceph orch ps --service_name=nfs.[nfs-cluster-name]
sudo ceph nfs cluster info [nfs-cluster-name]
Here we first created a nfs cluster named singletest. The following screen shot shows its status and information.
2. Exporting a Ceph File System
First, let’s create a file system named cephfs-nfs.
sudo ceph fs volume create cephfs-nfs
Now, we create a user named nfsclient to expose this CephFS through the nfs server that was set up in the first step.
sudo ceph auth get-or-create client.nfsclient \
mon 'allow r' \
osd 'allow rw pool=.nfs namespace=singletest, allow rw tag cephfs data=cephfs-nfs' \
mds 'allow rw path=/' > nfsclient.key