]> git.proxmox.com Git - pve-docs.git/blob - pve-storage-cephfs.adoc
Fix #2015: add how to get a auth secret for cephfs
[pve-docs.git] / pve-storage-cephfs.adoc
1 [[storage_cephfs]]
2 Ceph Filesystem (CephFS)
3 ------------------------
4 ifdef::wiki[]
5 :pve-toplevel:
6 :title: Storage: CephFS
7 endif::wiki[]
8
9 Storage pool type: `cephfs`
10
11 CephFS implements a POSIX-compliant filesystem using a http://ceph.com[Ceph]
12 storage cluster to store its data. As CephFS builds on Ceph it shares most of
13 its properties, this includes redundancy, scalability, self healing and high
14 availability.
15
16 TIP: {pve} can xref:chapter_pveceph[manage ceph setups], which makes
17 configuring a CephFS storage easier. As recent hardware has plenty of CPU power
18 and RAM, running storage services and VMs on same node is possible without a
19 big performance impact.
20
21 [[storage_cephfs_config]]
22 Configuration
23 ~~~~~~~~~~~~~
24
25 This backend supports the common storage properties `nodes`,
26 `disable`, `content`, and the following `cephfs` specific properties:
27
28 monhost::
29
30 List of monitor daemon addresses. Optional, only needed if Ceph is not running
31 on the PVE cluster.
32
33 path::
34
35 The local mount point. Optional, defaults to `/mnt/pve/<STORAGE_ID>/`.
36
37 username::
38
39 Ceph user id. Optional, only needed if Ceph is not running on the PVE cluster
40 where it defaults to `admin`.
41
42 subdir::
43
44 CephFS subdirectory to mount. Optional, defaults to `/`.
45
46 fuse::
47
48 Access CephFS through FUSE, instead of the kernel client. Optional, defaults
49 to `0`.
50
51 .Configuration Example for a external Ceph cluster (`/etc/pve/storage.cfg`)
52 ----
53 cephfs: cephfs-external
54 monhost 10.1.1.20 10.1.1.21 10.1.1.22
55 path /mnt/pve/cephfs-external
56 content backup
57 username admin
58 ----
59 NOTE: Don't forget to setup the client secret key file if cephx was not turned
60 off.
61
62 Authentication
63 ~~~~~~~~~~~~~~
64
65 If you use the, by-default enabled, `cephx` authentication, you need to copy
66 the secret from your external Ceph cluster to a Proxmox VE host.
67
68 Create the directory `/etc/pve/priv/ceph` with
69
70 mkdir /etc/pve/priv/ceph
71
72 Then copy the secret
73
74 scp cephfs.secret <proxmox>:/etc/pve/priv/ceph/<STORAGE_ID>.secret
75
76 The secret must be named to match your `<STORAGE_ID>`. Copying the
77 secret generally requires root privileges. The file must only contain the
78 secret key itself, opposed to the `rbd` backend which also contains a
79 `[client.userid]` section.
80
81 A secret can be received from the ceph cluster (as ceph admin) by issuing the
82 following command. Replace the `userid` with the actual client ID configured to
83 access the cluster. For further ceph user managment see the Ceph docs
84 footnote:[Ceph user management http://docs.ceph.com/docs/luminous/rados/operations/user-management/].
85
86 ceph auth get-key client.userid > cephfs.secret
87
88 If Ceph is installed locally on the PVE cluster, i.e., setup with `pveceph`,
89 this is done automatically.
90
91 Storage Features
92 ~~~~~~~~~~~~~~~~
93
94 The `cephfs` backend is a POSIX-compliant filesystem on top of a Ceph cluster.
95
96 .Storage features for backend `cephfs`
97 [width="100%",cols="m,m,3*d",options="header"]
98 |==============================================================================
99 |Content types |Image formats |Shared |Snapshots |Clones
100 |vztmpl iso backup snippets |none |yes |yes^[1]^ |no
101 |==============================================================================
102 ^[1]^ Snapshots, while no known bugs, cannot be guaranteed to be stable yet, as
103 they lack testing.
104
105 ifdef::wiki[]
106
107 See Also
108 ~~~~~~~~
109
110 * link:/wiki/Storage[Storage]
111
112 endif::wiki[]
113