Project

General

Profile

ceph.conf

changping Wu, 05/30/2011 08:29 PM

Download (4.35 KB)

 
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 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
; The variables $type, $id and $name are available to use in paths
14
; $type = The type of daemon, possible values: mon, mds and osd
15
; $id = The ID of the daemon, for mon.alpha, $id will be alpha
16
; $name = $type.$id
17

    
18
; For example:
19
; osd.0
20
;  $type = osd
21
;  $id = 0
22
;  $name = osd.0
23

    
24
; mon.beta
25
;  $type = mon
26
;  $id = beta
27
;  $name = mon.beta
28

    
29
; global
30
[global]
31
	; enable secure authentication
32
	;auth supported = cephx
33

    
34
        ; allow ourselves to open a lot of files
35
        max open files = 131072
36

    
37
        ; set log file
38
        log file = /var/log/ceph/$name.log
39
        ;log_to_syslog = true        ; uncomment this line to log to syslog
40

    
41
        ; set up pid files
42
        pid file = /var/run/ceph/$name.pid
43

    
44
        ; If you want to run a IPv6 cluster, set this to true. Dual-stack isn't possible
45
        ;ms bind ipv6 = true
46

    
47
; monitors
48
;  You need at least one.  You need at least three if you want to
49
;  tolerate any node failures.  Always create an odd number.
50
[mon]
51
        mon data = /mnt/data/$name
52

    
53
        ; If you are using for example the RADOS Gateway and want to have your newly created
54
        ; pools a higher replication level, you can set a default
55
        osd pool default size = 2
56

    
57
        ; You can also specify a CRUSH rule for new pools
58
        ; Wiki: http://ceph.newdream.net/wiki/Custom_data_placement_with_CRUSH
59
        osd pool default crush rule = 4
60

    
61
        ; Timing is critical for monitors, but if you want to allow the clocks to drift a
62
        ; bit more, you can specify the max drift.
63
        mon clock drift allowed = 1
64

    
65
        ; Tell the monitor to backoff from this warning for 30 seconds
66
        mon clock drift warn backoff = 30
67

    
68
	; logging, for debugging monitor crashes, in order of
69
	; their likelihood of being helpful :)
70
	;debug ms = 30
71
	;debug mon = 30
72
	;debug paxos = 30
73
	;debug auth = 30
74

    
75
[mon.alpha]
76
	host = ubuntu-client0
77
	mon addr = 172.16.10.176:6789
78

    
79
[mon.beta]
80
	host = ubuntu-client0
81
	mon addr = 172.16.10.176:6790
82

    
83
;[mon.gamma]
84
;	host = gamma
85
;	mon addr = 192.168.0.12:6789
86

    
87
; mds
88
;  You need at least one.  Define two to get a standby.
89
[mds]
90
	; where the mds keeps it's secret encryption keys
91
	keyring = /mnt/data/keyring.$name
92

    
93
	; mds logging to debug issues.
94
	debug ms = 1
95
	debug mds = 20
96

    
97
[mds.alpha]
98
	host = ubuntu-client0
99

    
100
[mds.beta]
101
	host = ubuntu-client0
102

    
103
; osd
104
;  You need at least one.  Two if you want data to be replicated.
105
;  Define as many as you like.
106
[osd]
107
	; This is where the btrfs volume will be mounted.
108
	osd data = /mnt/data/$name
109

    
110
	; Ideally, make this a separate disk or partition.  A few
111
 	; hundred MB should be enough; more if you have fast or many
112
 	; disks.  You can use a file under the osd data dir if need be
113
 	; (e.g. /data/$name/journal), but it will be slower than a
114
 	; separate disk or partition.
115

    
116
        ; This is an example of a file-based journal.
117
	osd journal = /mnt/data/$name/journal
118
	osd journal size = 1000 ; journal size, in megabytes
119

    
120
        ; If you want to run the journal on a tmpfs, disable DirectIO
121
        ;journal dio = false
122

    
123
        ; You can change the number of recovery operations to speed up recovery
124
        ; or slow it down if your machines can't handle it
125
         osd recovery max active = 2
126

    
127
	; osd logging to debug osd issues, in order of likelihood of being
128
	; helpful
129
	;debug ms = 30
130
	;debug osd = 30
131
	;debug filestore = 30
132
	;debug journal = 30
133
        btrfs options = defaults,async,rw,noatime,nodiratime
134

    
135
[osd.0]
136
	host = ubuntu-client0
137

    
138
	; if 'btrfs devs' is not specified, you're responsible for
139
	; setting up the 'osd data' dir.  if it is not btrfs, things
140
	; will behave up until you try to recover from a crash (which
141
	; usually fine for basic testing).
142
	btrfs devs = /dev/sda5
143

    
144
        ; If you want to specify some other mount options, you can do so.
145
        ; The default values are rw,noatime
146
        ;btrfs options = rw,noatime
147

    
148
[osd.1]
149
	host = ubuntu-client0
150
	btrfs devs = /dev/sda6
151

    
152
;[osd.2]
153
;	host = zeta
154
;	btrfs devs = /dev/sdx
155

    
156
;[osd.3]
157
;	host = eta
158
;	btrfs devs = /dev/sdy