]> git.proxmox.com Git - pve-docs.git/blame - pveceph.adoc
ha: document ignored state
[pve-docs.git] / pveceph.adoc
CommitLineData
80c0adcb 1[[chapter_pveceph]]
0840a663 2ifdef::manvolnum[]
b2f242ab
DM
3pveceph(1)
4==========
404a158e 5:pve-toplevel:
0840a663
DM
6
7NAME
8----
9
21394e70 10pveceph - Manage Ceph Services on Proxmox VE Nodes
0840a663 11
49a5e11c 12SYNOPSIS
0840a663
DM
13--------
14
15include::pveceph.1-synopsis.adoc[]
16
17DESCRIPTION
18-----------
19endif::manvolnum[]
0840a663 20ifndef::manvolnum[]
fe93f133
DM
21Manage Ceph Services on Proxmox VE Nodes
22========================================
49d3ad91 23:pve-toplevel:
0840a663
DM
24endif::manvolnum[]
25
8997dd6e
DM
26[thumbnail="gui-ceph-status.png"]
27
c994e4e5
DM
28{pve} unifies your compute and storage systems, i.e. you can use the
29same physical nodes within a cluster for both computing (processing
30VMs and containers) and replicated storage. The traditional silos of
31compute and storage resources can be wrapped up into a single
32hyper-converged appliance. Separate storage networks (SANs) and
33connections via network (NAS) disappear. With the integration of Ceph,
34an open source software-defined storage platform, {pve} has the
35ability to run and manage Ceph storage directly on the hypervisor
36nodes.
37
38Ceph is a distributed object store and file system designed to provide
39excellent performance, reliability and scalability. For smaller
40deployments, it is possible to install a Ceph server for RADOS Block
41Devices (RBD) directly on your {pve} cluster nodes, see
42xref:ceph_rados_block_devices[Ceph RADOS Block Devices (RBD)]. Recent
43hardware has plenty of CPU power and RAM, so running storage services
44and VMs on the same node is possible.
21394e70
DM
45
46To simplify management, we provide 'pveceph' - a tool to install and
47manage {ceph} services on {pve} nodes.
48
49
50Precondition
51------------
52
c994e4e5
DM
53To build a Proxmox Ceph Cluster there should be at least three (preferably)
54identical servers for the setup.
21394e70 55
470d4313 56A 10Gb network, exclusively used for Ceph, is recommended. A meshed
c994e4e5
DM
57network setup is also an option if there are no 10Gb switches
58available, see {webwiki-url}Full_Mesh_Network_for_Ceph_Server[wiki] .
21394e70
DM
59
60Check also the recommendations from
19920184 61http://docs.ceph.com/docs/master/start/hardware-recommendations/[Ceph's website].
21394e70
DM
62
63
64Installation of Ceph Packages
65-----------------------------
66
67On each node run the installation script as follows:
68
69[source,bash]
70----
19920184 71pveceph install
21394e70
DM
72----
73
74This sets up an `apt` package repository in
75`/etc/apt/sources.list.d/ceph.list` and installs the required software.
76
77
78Creating initial Ceph configuration
79-----------------------------------
80
8997dd6e
DM
81[thumbnail="gui-ceph-config.png"]
82
21394e70
DM
83After installation of packages, you need to create an initial Ceph
84configuration on just one node, based on your network (`10.10.10.0/24`
85in the following example) dedicated for Ceph:
86
87[source,bash]
88----
89pveceph init --network 10.10.10.0/24
90----
91
92This creates an initial config at `/etc/pve/ceph.conf`. That file is
c994e4e5 93automatically distributed to all {pve} nodes by using
21394e70
DM
94xref:chapter_pmxcfs[pmxcfs]. The command also creates a symbolic link
95from `/etc/ceph/ceph.conf` pointing to that file. So you can simply run
96Ceph commands without the need to specify a configuration file.
97
98
99Creating Ceph Monitors
100----------------------
101
8997dd6e
DM
102[thumbnail="gui-ceph-monitor.png"]
103
21394e70
DM
104On each node where a monitor is requested (three monitors are recommended)
105create it by using the "Ceph" item in the GUI or run.
106
107
108[source,bash]
109----
110pveceph createmon
111----
112
113
114Creating Ceph OSDs
115------------------
116
8997dd6e
DM
117[thumbnail="gui-ceph-osd-status.png"]
118
21394e70
DM
119via GUI or via CLI as follows:
120
121[source,bash]
122----
123pveceph createosd /dev/sd[X]
124----
125
126If you want to use a dedicated SSD journal disk:
127
128NOTE: In order to use a dedicated journal disk (SSD), the disk needs
129to have a https://en.wikipedia.org/wiki/GUID_Partition_Table[GPT]
130partition table. You can create this with `gdisk /dev/sd(x)`. If there
131is no GPT, you cannot select the disk as journal. Currently the
132journal size is fixed to 5 GB.
133
134[source,bash]
135----
136pveceph createosd /dev/sd[X] -journal_dev /dev/sd[X]
137----
138
139Example: Use /dev/sdf as data disk (4TB) and /dev/sdb is the dedicated SSD
140journal disk.
141
142[source,bash]
143----
144pveceph createosd /dev/sdf -journal_dev /dev/sdb
145----
146
147This partitions the disk (data and journal partition), creates
148filesystems and starts the OSD, afterwards it is running and fully
149functional. Please create at least 12 OSDs, distributed among your
150nodes (4 OSDs on each node).
151
152It should be noted that this command refuses to initialize disk when
153it detects existing data. So if you want to overwrite a disk you
154should remove existing data first. You can do that using:
155
156[source,bash]
157----
158ceph-disk zap /dev/sd[X]
159----
160
161You can create OSDs containing both journal and data partitions or you
162can place the journal on a dedicated SSD. Using a SSD journal disk is
163highly recommended if you expect good performance.
164
165
166Ceph Pools
167----------
168
8997dd6e
DM
169[thumbnail="gui-ceph-pools.png"]
170
21394e70
DM
171The standard installation creates per default the pool 'rbd',
172additional pools can be created via GUI.
173
174
175Ceph Client
176-----------
177
8997dd6e
DM
178[thumbnail="gui-ceph-log.png"]
179
21394e70
DM
180You can then configure {pve} to use such pools to store VM or
181Container images. Simply use the GUI too add a new `RBD` storage (see
182section xref:ceph_rados_block_devices[Ceph RADOS Block Devices (RBD)]).
183
184You also need to copy the keyring to a predefined location.
185
186NOTE: The file name needs to be `<storage_id> + `.keyring` - `<storage_id>` is
187the expression after 'rbd:' in `/etc/pve/storage.cfg` which is
188`my-ceph-storage` in the following example:
189
190[source,bash]
191----
192mkdir /etc/pve/priv/ceph
193cp /etc/ceph/ceph.client.admin.keyring /etc/pve/priv/ceph/my-ceph-storage.keyring
194----
0840a663
DM
195
196
197ifdef::manvolnum[]
198include::pve-copyright.adoc[]
199endif::manvolnum[]