]> git.proxmox.com Git - ceph.git/blame - ceph/doc/cephfs/nfs.rst
import ceph 16.2.6
[ceph.git] / ceph / doc / cephfs / nfs.rst
CommitLineData
11fdf7f2
TL
1===
2NFS
3===
4
5CephFS namespaces can be exported over NFS protocol using the
6`NFS-Ganesha NFS server <https://github.com/nfs-ganesha/nfs-ganesha/wiki>`_.
7
8Requirements
9============
10
9f95a23c 11- Ceph file system (preferably latest stable luminous or higher versions)
11fdf7f2
TL
12- In the NFS server host machine, 'libcephfs2' (preferably latest stable
13 luminous or higher), 'nfs-ganesha' and 'nfs-ganesha-ceph' packages (latest
14 ganesha v2.5 stable or higher versions)
15- NFS-Ganesha server host connected to the Ceph public network
16
17Configuring NFS-Ganesha to export CephFS
18========================================
19
20NFS-Ganesha provides a File System Abstraction Layer (FSAL) to plug in different
21storage backends. `FSAL_CEPH <https://github.com/nfs-ganesha/nfs-ganesha/tree/next/src/FSAL/FSAL_CEPH>`_
22is the plugin FSAL for CephFS. For each NFS-Ganesha export, FSAL_CEPH uses a
23libcephfs client, user-space CephFS client, to mount the CephFS path that
24NFS-Ganesha exports.
25
26Setting up NFS-Ganesha with CephFS, involves setting up NFS-Ganesha's
27configuration file, and also setting up a Ceph configuration file and cephx
28access credentials for the Ceph clients created by NFS-Ganesha to access
29CephFS.
30
31NFS-Ganesha configuration
32-------------------------
33
34A sample ganesha.conf configured with FSAL_CEPH can be found here,
35`<https://github.com/nfs-ganesha/nfs-ganesha/blob/next/src/config_samples/ceph.conf>`_.
36It is suitable for a standalone NFS-Ganesha server, or an active/passive
37configuration of NFS-Ganesha servers managed by some sort of clustering
38software (e.g., Pacemaker). Important details about the options are
39added as comments in the sample conf. There are options to do the following:
40
41- minimize Ganesha caching wherever possible since the libcephfs clients
42 (of FSAL_CEPH) also cache aggressively
43
44- read from Ganesha config files stored in RADOS objects
45
46- store client recovery data in RADOS OMAP key-value interface
47
48- mandate NFSv4.1+ access
49
50- enable read delegations (need at least v13.0.1 'libcephfs2' package
51 and v2.6.0 stable 'nfs-ganesha' and 'nfs-ganesha-ceph' packages)
52
53Configuration for libcephfs clients
54-----------------------------------
55
56Required ceph.conf for libcephfs clients includes:
57
58* a [client] section with ``mon_host`` option set to let the clients connect
9f95a23c 59 to the Ceph cluster's monitors, usually generated via ``ceph config generate-minimal-conf``, e.g., ::
11fdf7f2 60
9f95a23c
TL
61 [global]
62 mon host = [v2:192.168.1.7:3300,v1:192.168.1.7:6789], [v2:192.168.1.8:3300,v1:192.168.1.8:6789], [v2:192.168.1.9:3300,v1:192.168.1.9:6789]
11fdf7f2
TL
63
64Mount using NFSv4 clients
65=========================
66
67It is preferred to mount the NFS-Ganesha exports using NFSv4.1+ protocols
68to get the benefit of sessions.
69
70Conventions for mounting NFS resources are platform-specific. The
71following conventions work on Linux and some Unix platforms:
72
73From the command line::
74
75 mount -t nfs -o nfsvers=4.1,proto=tcp <ganesha-host-name>:<ganesha-pseudo-path> <mount-point>
76
77Current limitations
78===================
79
9f95a23c
TL
80- Per running ganesha daemon, FSAL_CEPH can only export one Ceph file system
81 although multiple directories in a Ceph file system may be exported.