-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathceph.conf
51 lines (46 loc) · 1.2 KB
/
ceph.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
[global]
{% if fsid %}
fsid = {{fsid}}
{% endif %}
log file = ""
log to syslog = false
clog to monitors = false
clog to syslog = false
log to stderr = false
auth cluster required = cephx
auth service required = cephx
auth client required = cephx
[mon]
mon data = /var/lib/ceph/mon/ceph-$id
[osd]
filestore xattr use omap = true
osd data = /var/lib/ceph/osd/ceph-$id
osd journal size = 1000
osd mkfs type = xfs
osd mkfs options xfs = -f
{% for host in monitors %}
{% if grains['localhost'] == host %}
{% set addr = ip %}
{% else %}
{% set addr = salt['cmd.run']("python -c 'import socket; print socket.gethostbyname(\"%s\")'" % host) %}
{% endif %}
[mon.{{host}}]
host = {{host}}
mon addr = {{addr}}:6789
{% endfor %}
{% for (host, devices) in devices|dictsort %}
{% if grains['localhost'] == host %}
{% set addr = ip %}
{% else %}
{% set addr = salt['cmd.run']("python -c 'import socket; print socket.gethostbyname(\"%s\")'" % host) %}
{% endif %}
{% for (id, device) in devices|dictsort %}
[osd.{{id}}]
host = {{host}}
devs = /dev/{{device}}
{% endfor %}
{% endfor %}
{% for host in metadata %}
[mds.{{host}}]
host = {{host}}
{% endfor %}