]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | ## |
2 | # Sample ceph ceph.conf file. | |
3 | ## | |
4 | # This file defines cluster membership, the various locations | |
5 | # that Ceph stores data, and any other runtime options. | |
6 | ||
7 | # If a 'host' is defined for a daemon, the init.d start/stop script will | |
8 | # verify that it matches the hostname (or else ignore it). If it is | |
9 | # not defined, it is assumed that the daemon is intended to start on | |
10 | # the current host (e.g., in a setup with a startup.conf on each | |
11 | # node). | |
12 | ||
13 | ## Metavariables | |
14 | # $cluster ; Expands to the Ceph Storage Cluster name. Useful | |
15 | # ; when running multiple Ceph Storage Clusters | |
16 | # ; on the same hardware. | |
17 | # ; Example: /etc/ceph/$cluster.keyring | |
18 | # ; (Default: ceph) | |
19 | # | |
20 | # $type ; Expands to one of mds, osd, or mon, depending on | |
21 | # ; the type of the instant daemon. | |
22 | # ; Example: /var/lib/ceph/$type | |
23 | # | |
24 | # $id ; Expands to the daemon identifier. For osd.0, this | |
25 | # ; would be 0; for mds.a, it would be a. | |
26 | # ; Example: /var/lib/ceph/$type/$cluster-$id | |
27 | # | |
28 | # $host ; Expands to the host name of the instant daemon. | |
29 | # | |
30 | # $name ; Expands to $type.$id. | |
31 | # ; Example: /var/run/ceph/$cluster-$name.asok | |
32 | ||
33 | [global] | |
34 | ### http://docs.ceph.com/docs/master/rados/configuration/general-config-ref/ | |
35 | ||
36 | ;fsid = {UUID} # use `uuidgen` to generate your own UUID | |
37 | ;public network = 192.168.0.0/24 | |
38 | ;cluster network = 192.168.0.0/24 | |
39 | ||
40 | # Each running Ceph daemon has a running process identifier (PID) file. | |
41 | # The PID file is generated upon start-up. | |
42 | # Type: String (optional) | |
43 | # (Default: N/A). The default path is /var/run/$cluster/$name.pid. | |
44 | pid file = /var/run/ceph/$name.pid | |
45 | ||
46 | # If set, when the Ceph Storage Cluster starts, Ceph sets the max open fds | |
47 | # at the OS level (i.e., the max # of file descriptors). | |
48 | # It helps prevents Ceph OSD Daemons from running out of file descriptors. | |
49 | # Type: 64-bit Integer (optional) | |
50 | # (Default: 0) | |
51 | ;max open files = 131072 | |
52 | ||
53 | ||
54 | ### http://docs.ceph.com/docs/master/rados/operations/ | |
55 | ### http://docs.ceph.com/docs/master/rados/configuration/auth-config-ref/ | |
56 | ||
57 | # If enabled, the Ceph Storage Cluster daemons (i.e., ceph-mon, ceph-osd, | |
58 | # and ceph-mds) must authenticate with each other. | |
59 | # Type: String (optional); Valid settings are "cephx" or "none". | |
60 | # (Default: cephx) | |
61 | auth cluster required = cephx | |
62 | ||
63 | # If enabled, the Ceph Storage Cluster daemons require Ceph Clients to | |
64 | # authenticate with the Ceph Storage Cluster in order to access Ceph | |
65 | # services. | |
66 | # Type: String (optional); Valid settings are "cephx" or "none". | |
67 | # (Default: cephx) | |
68 | auth service required = cephx | |
69 | ||
70 | # If enabled, the Ceph Client requires the Ceph Storage Cluster to | |
71 | # authenticate with the Ceph Client. | |
72 | # Type: String (optional); Valid settings are "cephx" or "none". | |
73 | # (Default: cephx) | |
74 | auth client required = cephx | |
75 | ||
76 | # If set to true, Ceph requires signatures on all message traffic between | |
77 | # the Ceph Client and the Ceph Storage Cluster, and between daemons | |
78 | # comprising the Ceph Storage Cluster. | |
79 | # Type: Boolean (optional) | |
80 | # (Default: false) | |
81 | ;cephx require signatures = true | |
82 | ||
83 | # kernel RBD client do not support authentication yet: | |
84 | cephx cluster require signatures = true | |
85 | cephx service require signatures = false | |
86 | ||
87 | # The path to the keyring file. | |
88 | # Type: String (optional) | |
89 | # Default: /etc/ceph/$cluster.$name.keyring,/etc/ceph/$cluster.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin | |
90 | ;keyring = /etc/ceph/$cluster.$name.keyring | |
91 | ||
92 | ||
93 | ### http://docs.ceph.com/docs/master/rados/configuration/pool-pg-config-ref/ | |
94 | ||
95 | ||
96 | ## Replication level, number of data copies. | |
97 | # Type: 32-bit Integer | |
98 | # (Default: 3) | |
99 | ;osd pool default size = 3 | |
100 | ||
101 | ## Replication level in degraded state, less than 'osd pool default size' value. | |
102 | # Sets the minimum number of written replicas for objects in the | |
103 | # pool in order to acknowledge a write operation to the client. If | |
104 | # minimum is not met, Ceph will not acknowledge the write to the | |
105 | # client. This setting ensures a minimum number of replicas when | |
106 | # operating in degraded mode. | |
107 | # Type: 32-bit Integer | |
108 | # (Default: 0), which means no particular minimum. If 0, minimum is size - (size / 2). | |
109 | ;osd pool default min size = 2 | |
110 | ||
111 | ## Ensure you have a realistic number of placement groups. We recommend | |
112 | ## approximately 100 per OSD. E.g., total number of OSDs multiplied by 100 | |
113 | ## divided by the number of replicas (i.e., osd pool default size). So for | |
114 | ## 10 OSDs and osd pool default size = 3, we'd recommend approximately | |
115 | ## (100 * 10) / 3 = 333 | |
116 | ||
117 | # Description: The default number of placement groups for a pool. The | |
118 | # default value is the same as pg_num with mkpool. | |
119 | # Type: 32-bit Integer | |
120 | # (Default: 8) | |
121 | ;osd pool default pg num = 128 | |
122 | ||
123 | # Description: The default number of placement groups for placement for a | |
124 | # pool. The default value is the same as pgp_num with mkpool. | |
125 | # PG and PGP should be equal (for now). | |
126 | # Type: 32-bit Integer | |
127 | # (Default: 8) | |
128 | ;osd pool default pgp num = 128 | |
129 | ||
130 | # The default CRUSH ruleset to use when creating a pool | |
131 | # Type: 32-bit Integer | |
132 | # (Default: 0) | |
133 | ;osd pool default crush rule = 0 | |
134 | ||
135 | # The bucket type to use for chooseleaf in a CRUSH rule. | |
136 | # Uses ordinal rank rather than name. | |
137 | # Type: 32-bit Integer | |
138 | # (Default: 1) Typically a host containing one or more Ceph OSD Daemons. | |
139 | ;osd crush chooseleaf type = 1 | |
140 | ||
141 | ||
142 | ### http://docs.ceph.com/docs/master/rados/troubleshooting/log-and-debug/ | |
143 | ||
144 | # The location of the logging file for your cluster. | |
145 | # Type: String | |
146 | # Required: No | |
147 | # Default: /var/log/ceph/$cluster-$name.log | |
148 | ;log file = /var/log/ceph/$cluster-$name.log | |
149 | ||
150 | # Determines if logging messages should appear in syslog. | |
151 | # Type: Boolean | |
152 | # Required: No | |
153 | # (Default: false) | |
154 | ;log to syslog = true | |
155 | ||
156 | ||
157 | ### http://docs.ceph.com/docs/master/rados/configuration/ms-ref/ | |
158 | ||
159 | # Enable if you want your daemons to bind to IPv6 address instead of | |
160 | # IPv4 ones. (Not required if you specify a daemon or cluster IP.) | |
161 | # Type: Boolean | |
162 | # (Default: false) | |
163 | ;ms bind ipv6 = true | |
164 | ||
165 | ################## | |
166 | ## Monitors | |
167 | ## You need at least one. You need at least three if you want to | |
168 | ## tolerate any node failures. Always create an odd number. | |
169 | [mon] | |
170 | ### http://docs.ceph.com/docs/master/rados/configuration/mon-config-ref/ | |
171 | ### http://docs.ceph.com/docs/master/rados/configuration/mon-osd-interaction/ | |
172 | ||
173 | # The IDs of initial monitors in a cluster during startup. | |
174 | # If specified, Ceph requires an odd number of monitors to form an | |
175 | # initial quorum (e.g., 3). | |
176 | # Type: String | |
177 | # (Default: None) | |
178 | ;mon initial members = mycephhost | |
179 | ||
180 | ;mon host = cephhost01,cephhost02 | |
181 | ;mon addr = 192.168.0.101,192.168.0.102 | |
182 | ||
183 | # The monitor's data location | |
184 | # Default: /var/lib/ceph/mon/$cluster-$id | |
185 | ;mon data = /var/lib/ceph/mon/$name | |
186 | ||
187 | # The clock drift in seconds allowed between monitors. | |
188 | # Type: Float | |
189 | # (Default: .050) | |
190 | ;mon clock drift allowed = .15 | |
191 | ||
192 | # Exponential backoff for clock drift warnings | |
193 | # Type: Float | |
194 | # (Default: 5) | |
195 | ;mon clock drift warn backoff = 30 # Tell the monitor to backoff from this warning for 30 seconds | |
196 | ||
197 | # The percentage of disk space used before an OSD is considered full. | |
198 | # Type: Float | |
199 | # (Default: .95) | |
200 | ;mon osd full ratio = .95 | |
201 | ||
202 | # The percentage of disk space used before an OSD is considered nearfull. | |
203 | # Type: Float | |
204 | # (Default: .85) | |
205 | ;mon osd nearfull ratio = .85 | |
206 | ||
207 | # The number of seconds Ceph waits before marking a Ceph OSD | |
208 | # Daemon "down" and "out" if it doesn't respond. | |
209 | # Type: 32-bit Integer | |
210 | # (Default: 600) | |
211 | ;mon osd down out interval = 600 | |
212 | ||
213 | # The grace period in seconds before declaring unresponsive Ceph OSD | |
214 | # Daemons "down". | |
215 | # Type: 32-bit Integer | |
216 | # (Default: 900) | |
217 | ;mon osd report timeout = 300 | |
218 | ||
219 | ### http://docs.ceph.com/docs/master/rados/troubleshooting/log-and-debug/ | |
220 | ||
221 | # logging, for debugging monitor crashes, in order of | |
222 | # their likelihood of being helpful :) | |
223 | ;debug ms = 1 | |
224 | ;debug mon = 20 | |
225 | ;debug paxos = 20 | |
226 | ;debug auth = 20 | |
227 | ||
228 | ||
229 | ;[mon.alpha] | |
230 | ; host = alpha | |
231 | ; mon addr = 192.168.0.10:6789 | |
232 | ||
233 | ;[mon.beta] | |
234 | ; host = beta | |
235 | ; mon addr = 192.168.0.11:6789 | |
236 | ||
237 | ;[mon.gamma] | |
238 | ; host = gamma | |
239 | ; mon addr = 192.168.0.12:6789 | |
240 | ||
241 | ||
242 | ################## | |
243 | ## Metadata servers | |
244 | # You must deploy at least one metadata server to use CephFS. There is | |
245 | # experimental support for running multiple metadata servers. Do not run | |
246 | # multiple metadata servers in production. | |
247 | [mds] | |
248 | ### http://docs.ceph.com/docs/master/cephfs/mds-config-ref/ | |
249 | ||
250 | # where the mds keeps it's secret encryption keys | |
251 | ;keyring = /var/lib/ceph/mds/$name/keyring | |
252 | ||
253 | # Determines whether a 'ceph-mds' daemon should poll and | |
254 | # replay the log of an active MDS (hot standby). | |
255 | # Type: Boolean | |
256 | # (Default: false) | |
257 | ;mds standby replay = true | |
258 | ||
259 | ; mds logging to debug issues. | |
260 | ;debug ms = 1 | |
261 | ;debug mds = 20 | |
262 | ;debug journaler = 20 | |
263 | ||
264 | # The number of inodes to cache. | |
265 | # Type: 32-bit Integer | |
266 | # (Default: 100000) | |
267 | ;mds cache size = 250000 | |
268 | ||
269 | ;[mds.alpha] | |
270 | ; host = alpha | |
271 | ||
272 | ;[mds.beta] | |
273 | ; host = beta | |
274 | ||
275 | ################## | |
276 | ## osd | |
277 | # You need at least one. Two or more if you want data to be replicated. | |
278 | # Define as many as you like. | |
279 | [osd] | |
280 | ### http://docs.ceph.com/docs/master/rados/configuration/osd-config-ref/ | |
281 | ||
282 | # The path to the OSDs data. | |
283 | # You must create the directory when deploying Ceph. | |
284 | # You should mount a drive for OSD data at this mount point. | |
285 | # We do not recommend changing the default. | |
286 | # Type: String | |
287 | # Default: /var/lib/ceph/osd/$cluster-$id | |
288 | ;osd data = /var/lib/ceph/osd/$name | |
289 | ||
290 | ## You can change the number of recovery operations to speed up recovery | |
291 | ## or slow it down if your machines can't handle it | |
292 | ||
293 | # The number of active recovery requests per OSD at one time. | |
294 | # More requests will accelerate recovery, but the requests | |
295 | # places an increased load on the cluster. | |
296 | # Type: 32-bit Integer | |
297 | # (Default: 5) | |
298 | ;osd recovery max active = 3 | |
299 | ||
300 | # The maximum number of backfills allowed to or from a single OSD. | |
301 | # Type: 64-bit Integer | |
302 | # (Default: 10) | |
303 | ;osd max backfills = 5 | |
304 | ||
305 | # The maximum number of simultaneous scrub operations for a Ceph OSD Daemon. | |
306 | # Type: 32-bit Int | |
307 | # (Default: 1) | |
308 | ;osd max scrubs = 2 | |
309 | ||
310 | # You may add settings for ceph-deploy so that it will create and mount | |
311 | # the correct type of file system. Remove the comment `#` character for | |
312 | # the following settings and replace the values in parenthesis | |
313 | # with appropriate values, or leave the following settings commented | |
314 | # out to accept the default values. | |
315 | ||
316 | #osd mkfs type = {fs-type} | |
317 | #osd mkfs options {fs-type} = {mkfs options} # default for xfs is "-f" | |
318 | #osd mount options {fs-type} = {mount options} # default mount option is "rw, noatime" | |
319 | ;osd mkfs type = btrfs | |
320 | ;osd mount options btrfs = noatime,nodiratime | |
321 | ||
322 | ## Ideally, make this a separate disk or partition. A few | |
323 | ## hundred MB should be enough; more if you have fast or many | |
324 | ## disks. You can use a file under the osd data dir if need be | |
325 | ## (e.g. /data/$name/journal), but it will be slower than a | |
326 | ## separate disk or partition. | |
327 | # The path to the OSD's journal. This may be a path to a file or a block | |
328 | # device (such as a partition of an SSD). If it is a file, you must | |
329 | # create the directory to contain it. | |
330 | # We recommend using a drive separate from the osd data drive. | |
331 | # Type: String | |
332 | # Default: /var/lib/ceph/osd/$cluster-$id/journal | |
333 | ;osd journal = /var/lib/ceph/osd/$name/journal | |
334 | ||
335 | # Check log files for corruption. Can be computationally expensive. | |
336 | # Type: Boolean | |
337 | # (Default: false) | |
338 | ;osd check for log corruption = true | |
339 | ||
340 | ### http://docs.ceph.com/docs/master/rados/configuration/journal-ref/ | |
341 | ||
342 | # The size of the journal in megabytes. If this is 0, | |
343 | # and the journal is a block device, the entire block device is used. | |
344 | # Since v0.54, this is ignored if the journal is a block device, | |
345 | # and the entire block device is used. | |
346 | # Type: 32-bit Integer | |
347 | # (Default: 5120) | |
348 | # Recommended: Begin with 1GB. Should be at least twice the product | |
349 | # of the expected speed multiplied by "filestore max sync interval". | |
350 | ;osd journal size = 2048 ; journal size, in megabytes | |
351 | ||
352 | ## If you want to run the journal on a tmpfs, disable DirectIO | |
353 | # Enables direct i/o to the journal. | |
354 | # Requires "journal block align" set to "true". | |
355 | # Type: Boolean | |
356 | # Required: Yes when using aio. | |
357 | # (Default: true) | |
358 | ;journal dio = false | |
359 | ||
360 | # osd logging to debug osd issues, in order of likelihood of being helpful | |
361 | ;debug ms = 1 | |
362 | ;debug osd = 20 | |
363 | ;debug filestore = 20 | |
364 | ;debug journal = 20 | |
365 | ||
366 | ### http://docs.ceph.com/docs/master/rados/configuration/filestore-config-ref/ | |
367 | ||
368 | # The maximum interval in seconds for synchronizing the filestore. | |
369 | # Type: Double (optional) | |
370 | # (Default: 5) | |
371 | ;filestore max sync interval = 5 | |
372 | ||
373 | # Enable snapshots for a btrfs filestore. | |
374 | # Type: Boolean | |
375 | # Required: No. Only used for btrfs. | |
376 | # (Default: true) | |
377 | ;filestore btrfs snap = false | |
378 | ||
379 | # Enables the filestore flusher. | |
380 | # Type: Boolean | |
381 | # Required: No | |
382 | # (Default: false) | |
383 | ;filestore flusher = true | |
384 | ||
385 | # Defines the maximum number of in progress operations the file store | |
386 | # accepts before blocking on queuing new operations. | |
387 | # Type: Integer | |
388 | # Required: No. Minimal impact on performance. | |
389 | # (Default: 500) | |
390 | ;filestore queue max ops = 500 | |
391 | ||
392 | ## Filestore and OSD settings can be tweak to achieve better performance | |
393 | ||
394 | ### http://docs.ceph.com/docs/master/rados/configuration/filestore-config-ref/#misc | |
395 | ||
396 | # Min number of files in a subdir before merging into parent NOTE: A negative value means to disable subdir merging | |
397 | # Type: Integer | |
398 | # Required: No | |
399 | # Default: 10 | |
400 | ;filestore merge threshold = 10 | |
401 | ||
402 | # filestore_split_multiple * abs(filestore_merge_threshold) * 16 is the maximum number of files in a subdirectory before splitting into child directories. | |
403 | # Type: Integer | |
404 | # Required: No | |
405 | # Default: 2 | |
406 | ;filestore split multiple = 2 | |
407 | ||
408 | # The number of filesystem operation threads that execute in parallel. | |
409 | # Type: Integer | |
410 | # Required: No | |
411 | # Default: 2 | |
412 | ;filestore op threads = 4 | |
413 | ||
414 | # The number of threads to service Ceph OSD Daemon operations. Set to 0 to disable it. Increasing the number may increase the request processing rate. | |
415 | # Type: 32-bit Integer | |
416 | # Default: 2 | |
417 | ;osd op threads = 2 | |
418 | ||
419 | ## CRUSH | |
420 | ||
421 | # By default OSDs update their details (location, weight and root) on the CRUSH map during startup | |
422 | # Type: Boolean | |
423 | # Required: No; | |
424 | # (Default: true) | |
425 | ;osd crush update on start = false | |
426 | ||
427 | ;[osd.0] | |
428 | ; host = delta | |
429 | ||
430 | ;[osd.1] | |
431 | ; host = epsilon | |
432 | ||
433 | ;[osd.2] | |
434 | ; host = zeta | |
435 | ||
436 | ;[osd.3] | |
437 | ; host = eta | |
438 | ||
439 | ||
440 | ################## | |
441 | ## client settings | |
442 | [client] | |
443 | ||
444 | ### http://docs.ceph.com/docs/master/rbd/rbd-config-ref/ | |
445 | ||
446 | # Enable caching for RADOS Block Device (RBD). | |
447 | # Type: Boolean | |
448 | # Required: No | |
449 | # (Default: true) | |
450 | rbd cache = true | |
451 | ||
452 | # The RBD cache size in bytes. | |
453 | # Type: 64-bit Integer | |
454 | # Required: No | |
455 | # (Default: 32 MiB) | |
456 | ;rbd cache size = 33554432 | |
457 | ||
458 | # The dirty limit in bytes at which the cache triggers write-back. | |
459 | # If 0, uses write-through caching. | |
460 | # Type: 64-bit Integer | |
461 | # Required: No | |
462 | # Constraint: Must be less than rbd cache size. | |
463 | # (Default: 24 MiB) | |
464 | ;rbd cache max dirty = 25165824 | |
465 | ||
466 | # The dirty target before the cache begins writing data to the data storage. | |
467 | # Does not block writes to the cache. | |
468 | # Type: 64-bit Integer | |
469 | # Required: No | |
470 | # Constraint: Must be less than rbd cache max dirty. | |
471 | # (Default: 16 MiB) | |
472 | ;rbd cache target dirty = 16777216 | |
473 | ||
474 | # The number of seconds dirty data is in the cache before writeback starts. | |
475 | # Type: Float | |
476 | # Required: No | |
477 | # (Default: 1.0) | |
478 | ;rbd cache max dirty age = 1.0 | |
479 | ||
480 | # Start out in write-through mode, and switch to write-back after the | |
481 | # first flush request is received. Enabling this is a conservative but | |
482 | # safe setting in case VMs running on rbd are too old to send flushes, | |
483 | # like the virtio driver in Linux before 2.6.32. | |
484 | # Type: Boolean | |
485 | # Required: No | |
486 | # (Default: true) | |
487 | ;rbd cache writethrough until flush = true | |
488 | ||
489 | # The Ceph admin socket allows you to query a daemon via a socket interface | |
490 | # From a client perspective this can be a virtual machine using librbd | |
491 | # Type: String | |
492 | # Required: No | |
493 | ;admin socket = /var/run/ceph/$cluster-$type.$id.$pid.$cctid.asok | |
494 | ||
495 | ||
496 | ################## | |
497 | ## radosgw client settings | |
498 | [client.radosgw.gateway] | |
499 | ||
500 | ### http://docs.ceph.com/docs/master/radosgw/config-ref/ | |
501 | ||
502 | # Sets the location of the data files for Ceph Object Gateway. | |
503 | # You must create the directory when deploying Ceph. | |
504 | # We do not recommend changing the default. | |
505 | # Type: String | |
506 | # Default: /var/lib/ceph/radosgw/$cluster-$id | |
507 | ;rgw data = /var/lib/ceph/radosgw/$name | |
508 | ||
509 | # Client's hostname | |
510 | ;host = ceph-radosgw | |
511 | ||
512 | # where the radosgw keeps it's secret encryption keys | |
513 | ;keyring = /etc/ceph/ceph.client.radosgw.keyring | |
514 | ||
515 | # FastCgiExternalServer uses this socket. | |
516 | # If you do not specify a socket path, Ceph Object Gateway will not run as an external server. | |
517 | # The path you specify here must be the same as the path specified in the rgw.conf file. | |
518 | # Type: String | |
519 | # Default: None | |
520 | ;rgw socket path = /var/run/ceph/ceph.radosgw.gateway.fastcgi.sock | |
521 | ||
522 | # The location of the logging file for your radosgw. | |
523 | # Type: String | |
524 | # Required: No | |
525 | # Default: /var/log/ceph/$cluster-$name.log | |
526 | ;log file = /var/log/ceph/client.radosgw.gateway.log | |
527 | ||
528 | # Enable 100-continue if it is operational. | |
529 | # Type: Boolean | |
530 | # Default: true | |
531 | ;rgw print continue = false | |
532 | ||
533 | # The DNS name of the served domain. | |
534 | # Type: String | |
535 | # Default: None | |
536 | ;rgw dns name = radosgw.ceph.internal |