]> git.proxmox.com Git - pve-docs.git/blame_incremental - pve-storage-cephfs.adoc
qm: add documentation for vm network MTU setting
[pve-docs.git] / pve-storage-cephfs.adoc
... / ...
CommitLineData
1[[storage_cephfs]]
2Ceph Filesystem (CephFS)
3------------------------
4ifdef::wiki[]
5:pve-toplevel:
6:title: Storage: CephFS
7endif::wiki[]
8
9Storage pool type: `cephfs`
10
11CephFS implements a POSIX-compliant filesystem, using a https://ceph.com[Ceph]
12storage cluster to store its data. As CephFS builds upon Ceph, it shares most of
13its properties. This includes redundancy, scalability, self-healing, and high
14availability.
15
16TIP: {pve} can xref:chapter_pveceph[manage Ceph setups], which makes
17configuring a CephFS storage easier. As modern hardware offers a lot of
18processing power and RAM, running storage services and VMs on same node is
19possible without a significant performance impact.
20
21To use the CephFS storage plugin, you must replace the stock Debian Ceph client,
22by adding our xref:sysadmin_package_repositories_ceph[Ceph repository].
23Once added, run `apt update`, followed by `apt dist-upgrade`, in order to get
24the newest packages.
25
26WARNING: Please ensure that there are no other Ceph repositories configured.
27Otherwise the installation will fail or there will be mixed package versions on
28the node, leading to unexpected behavior.
29
30[[storage_cephfs_config]]
31Configuration
32~~~~~~~~~~~~~
33
34This backend supports the common storage properties `nodes`,
35`disable`, `content`, as well as the following `cephfs` specific properties:
36
37monhost::
38
39List of monitor daemon addresses. Optional, only needed if Ceph is not running
40on the {pve} cluster.
41
42path::
43
44The local mount point. Optional, defaults to `/mnt/pve/<STORAGE_ID>/`.
45
46username::
47
48Ceph user id. Optional, only needed if Ceph is not running on the {pve} cluster,
49where it defaults to `admin`.
50
51subdir::
52
53CephFS subdirectory to mount. Optional, defaults to `/`.
54
55fuse::
56
57Access CephFS through FUSE, instead of the kernel client. Optional, defaults
58to `0`.
59
60.Configuration example for an external Ceph cluster (`/etc/pve/storage.cfg`)
61----
62cephfs: cephfs-external
63 monhost 10.1.1.20 10.1.1.21 10.1.1.22
64 path /mnt/pve/cephfs-external
65 content backup
66 username admin
67----
68NOTE: Don't forget to set up the client's secret key file, if cephx was not
69disabled.
70
71Authentication
72~~~~~~~~~~~~~~
73
74NOTE: If Ceph is installed locally on the {pve} cluster, the following is done
75automatically when adding the storage.
76
77If you use `cephx` authentication, which is enabled by default, you need to
78provide the secret from the external Ceph cluster.
79
80To configure the storage via the CLI, you first need to make the file
81containing the secret available. One way is to copy the file from the external
82Ceph cluster directly to one of the {pve} nodes. The following example will
83copy it to the `/root` directory of the node on which we run it:
84
85----
86# scp <external cephserver>:/etc/ceph/cephfs.secret /root/cephfs.secret
87----
88
89Then use the `pvesm` CLI tool to configure the external RBD storage, use the
90`--keyring` parameter, which needs to be a path to the secret file that you
91copied. For example:
92
93----
94# pvesm add cephfs <name> --monhost "10.1.1.20 10.1.1.21 10.1.1.22" --content backup --keyring /root/cephfs.secret
95----
96
97When configuring an external RBD storage via the GUI, you can copy and paste
98the secret into the appropriate field.
99
100The secret is only the key itself, as opposed to the `rbd` backend which also
101contains a `[client.userid]` section.
102
103The secret will be stored at
104
105----
106# /etc/pve/priv/ceph/<STORAGE_ID>.secret
107----
108
109A secret can be received from the Ceph cluster (as Ceph admin) by issuing the
110command below, where `userid` is the client ID that has been configured to
111access the cluster. For further information on Ceph user management, see the
112Ceph docs.footnoteref:[cephusermgmt]
113
114----
115# ceph auth get-key client.userid > cephfs.secret
116----
117
118Storage Features
119~~~~~~~~~~~~~~~~
120
121The `cephfs` backend is a POSIX-compliant filesystem, on top of a Ceph cluster.
122
123.Storage features for backend `cephfs`
124[width="100%",cols="m,m,3*d",options="header"]
125|==============================================================================
126|Content types |Image formats |Shared |Snapshots |Clones
127|vztmpl iso backup snippets |none |yes |yes^[1]^ |no
128|==============================================================================
129^[1]^ While no known bugs exist, snapshots are not yet guaranteed to be stable,
130as they lack sufficient testing.
131
132ifdef::wiki[]
133
134See Also
135~~~~~~~~
136
137* link:/wiki/Storage[Storage]
138
139endif::wiki[]
140