1 =======================
2 CephFS Exports over NFS
3 =======================
5 CephFS namespaces can be exported over NFS protocol using the
6 `NFS-Ganesha NFS server <https://github.com/nfs-ganesha/nfs-ganesha/wiki>`_.
11 - Latest Ceph file system with mgr enabled
12 - 'nfs-ganesha', 'nfs-ganesha-ceph', 'nfs-ganesha-rados-grace' and
13 'nfs-ganesha-rados-urls' packages (version 3.3 and above)
15 Create NFS Ganesha Cluster
16 ==========================
20 $ ceph nfs cluster create <type=cephfs> <clusterid> [<placement>]
22 This creates a common recovery pool for all Ganesha daemons, new user based on
23 cluster_id and common ganesha config rados object.
25 Here type is export type and placement specifies the size of cluster and hosts.
26 For more details on placement specification refer the `orchestrator doc
27 <https://docs.ceph.com/docs/master/mgr/orchestrator/#placement-specification>`_.
28 Currently only CephFS export type is supported.
30 Update NFS Ganesha Cluster
31 ==========================
35 $ ceph nfs cluster update <clusterid> <placement>
37 This updates the deployed cluster according to the placement value.
39 Delete NFS Ganesha Cluster
40 ==========================
44 $ ceph nfs cluster delete <clusterid>
46 This deletes the deployed cluster.
48 List NFS Ganesha Cluster
49 ========================
55 This lists deployed clusters.
57 Show NFS Ganesha Cluster Information
58 ====================================
62 $ ceph nfs cluster info [<clusterid>]
64 This displays ip and port of deployed cluster.
66 Set Customized Ganesha Configuration
67 ====================================
71 $ ceph nfs cluster config set <clusterid> -i <config_file>
73 With this the nfs cluster will use the specified config and it will have
74 precedence over default config blocks.
76 Reset Ganesha Configuration
77 ===========================
81 $ ceph nfs cluster config reset <clusterid>
83 This removes the user defined configuration.
90 $ ceph nfs export create cephfs <fsname> <clusterid> <binding> [--readonly] [--path=/path/in/cephfs]
92 It creates export rados objects containing the export block. Here binding is
93 the pseudo root name and type is export type.
100 $ ceph nfs export delete <clusterid> <binding>
102 It deletes an export in cluster based on pseudo root name (binding).
109 $ ceph nfs export ls <clusterid> [--detailed]
111 It lists export for a cluster. With detailed option enabled it shows entire
119 $ ceph nfs export get <clusterid> <binding>
121 It displays export block for a cluster based on pseudo root name (binding).
123 Configuring NFS-Ganesha to export CephFS with vstart
124 ====================================================
130 $ MDS=1 MON=1 OSD=3 NFS=1 ../src/vstart.sh -n -d --cephadm
132 It can deploy only single ganesha daemon with vstart on default ganesha port.
134 2) Using test orchestrator
138 $ MDS=1 MON=1 OSD=3 NFS=1 ../src/vstart.sh -n -d
140 It can deploy multiple ganesha daemons on random port. But this requires
141 ganesha packages to be installed.
143 NFS: It is the number of NFS-Ganesha clusters to be created.
148 After the exports are successfully created and Ganesha daemons are no longer in
149 grace period. The exports can be mounted by
153 $ mount -t nfs -o port=<ganesha-port> <ganesha-host-name>:<ganesha-pseudo-path> <mount-point>
155 .. note:: Only NFS v4.0+ is supported.