Skip to contentSkip to conversation

config: Update sample config with more examples

PATCH Applied Wido den Hollander 2 participants 8 messages Apr 21, 2011 – Apr 29, 2011 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 config: Update sample config with more examples

---
 src/sample.ceph.conf |   77 ++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 65 insertions(+), 12 deletions(-)
src/sample.ceph.conf +65 -12
index 473114b..67cb5ae 100644
@@ -10,6 +10,22 @@
 ; the current host (e.g., in a setup with a startup.conf on each
 ; node).
 
+; The variables $type, $id and $name are available to use in paths
+; $type = The type of daemon, possible values: mon, mds and osd
+; $id = The ID of the daemon, for mon.alpha, $id will be alpha
+; $name = $type.$id
+
+; For example:
+; osd.0
+;  $type = osd
+;  $id = 0
+;  $name = osd.0
+
+; mon.beta
+;  $type = mon
+;  $id = beta
+;  $name = mon.beta
+
 ; global
 [global]
 	; enable secure authentication
@@ -18,17 +34,42 @@
         ; allow ourselves to open a lot of files
         max open files = 131072
 
-        ; set up logging
-        log file = /var/log/ceph/$name.log
+        ; You can change the default log location if you want to
+        ;log dir = /var/log/ceph	
+        ;log file = $name.log
+
+        ; Logging to syslog is also possible
+        ; If you want to disable logging to files, you should empty log dir and file
+        ;log to syslog = true
+        ;log dir =
+        ;log file = 
+
+        ; This is the default pid file location
+        ;pid file = /var/run/ceph/$name.pid
 
-        ; set up pid files
-        pid file = /var/run/ceph/$name.pid
+        ; If you want to run a IPv6 cluster, set this to true. Dual-stack isn't possible
+        ;ms bind ipv6 = true
 
 ; monitors
 ;  You need at least one.  You need at least three if you want to
 ;  tolerate any node failures.  Always create an odd number.
 [mon]
-	mon data = /data/mon$id
+	mon data = /data/$name
+
+        ; If you are using for example the RADOS Gateway and want to have your newly created
+        ; pools a higher replication level, you can set a default
+        ;osd pool default size = 3
+
+        ; You can also specify a CRUSH rule for new pools
+        ; Wiki: http://ceph.newdream.net/wiki/Custom_data_placement_with_CRUSH
+        ;osd pool default crush rule = 0
+
+        ; Timing is critical for monitors, but if you want to allow the clocks to drift a 
+        ; bit more, you can specify the max drift.
+        ;mon clock drift allowed = 1
+
+        ; Tell the monitor to backoff from this warning for 30 seconds
+        ;mon clock drift warn backoff = 30
 
 	; logging, for debugging monitor crashes, in order of
 	; their likelihood of being helpful :)
@@ -37,15 +78,15 @@
 	;debug paxos = 20
 	;debug auth = 20
 
-[mon.0]
+[mon.alpha]
 	host = alpha
 	mon addr = 192.168.0.10:6789
 
-[mon.1]
+[mon.beta]
 	host = beta
 	mon addr = 192.168.0.11:6789
 
-[mon.2]
+[mon.gamma]
 	host = gamma
 	mon addr = 192.168.0.12:6789
 
@@ -70,17 +111,25 @@
 ;  Define as many as you like.
 [osd]
 	; This is where the btrfs volume will be mounted.
-	osd data = /data/osd$id
+	osd data = /data/$name
 
 	; Ideally, make this a separate disk or partition.  A few
  	; hundred MB should be enough; more if you have fast or many
  	; disks.  You can use a file under the osd data dir if need be
- 	; (e.g. /data/osd$id/journal), but it will be slower than a
+ 	; (e.g. /data/$name/journal), but it will be slower than a
  	; separate disk or partition.
 
         ; This is an example of a file-based journal.
-	osd journal = /data/osd$id/journal
-	osd journal size = 1000 ; journal size, in megabytes
+	osd journal = /data/$name/journal
+        ; Journal size, in megabytes
+	osd journal size = 1000
+
+        ; If you want to run the journal on a tmpfs, disable DirectIO
+        ;journal dio = false
+
+        ; You can change the number of recovery operations to speed up recovery
+        ; or slow it down if your machines can't handle it
+        ;osd recovery max active = 3
 
 	; osd logging to debug osd issues, in order of likelihood of being
 	; helpful
@@ -98,6 +147,10 @@
 	; usually fine for basic testing).
 	btrfs devs = /dev/sdx
 
+        ; If you want to specify some other mount options, you can do so.
+        ; The default values are rw,noatime
+        ;btrfs options = rw,noatime
+
 [osd.1]
 	host = epsilon
 	btrfs devs = /dev/sdy
Signature · 1 line
1.7.0.4
#1 lore raw

Looks good. I would leave out the "log dir" stuff, though. That thing has been deprecated since forever in favor of "log file".

cheers,
Colin

Quoted 144 lines · Wido den Hollander

---
 src/sample.ceph.conf |   77 ++++++++++++++++++++++++++++++++++++++++++--------

 1 files changed, 65 insertions(+), 12 deletions(-)
src/sample.ceph.conf +0 -0
index 473114b..67cb5ae 100644
@@ -10,6 +10,22 @@

 ; the current host (e.g., in a setup with a startup.conf on each ; node).

src/sample.ceph.conf +16 -0
+; The variables $type, $id and $name are available to use in paths
+; $type = The type of daemon, possible values: mon, mds and osd
+; $id = The ID of the daemon, for mon.alpha, $id will be alpha
+; $name = $type.$id
+
+; For example:
+; osd.0
+;  $type = osd
+;  $id = 0
+;  $name = osd.0
+
+; mon.beta
+;  $type = mon
+;  $id = beta
+;  $name = mon.beta
+

 ; global
 [global]
       ; enable secure authentication

src/sample.ceph.conf +0 -0
@@ -18,17 +34,42 @@

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

-        ; set up logging
-        log file = /var/log/ceph/$name.log
+        ; You can change the default log location if you want to
+        ;log dir = /var/log/ceph
+        ;log file = $name.log

src/sample.ceph.conf +11 -2
+
+        ; Logging to syslog is also possible
+        ; If you want to disable logging to files, you should empty log dir and file
+        ;log to syslog = true
+        ;log dir =
+        ;log file =
+
+        ; This is the default pid file location
+        ;pid file = /var/run/ceph/$name.pid
 
-        ; set up pid files
-        pid file = /var/run/ceph/$name.pid
+        ; If you want to run a IPv6 cluster, set this to true. Dual-stack isn't possible
+        ;ms bind ipv6 = true

 ; monitors
 ;  You need at least one.  You need at least three if you want to ;  tolerate any node failures.  Always create an odd number. [mon]
-       mon data = /data/mon$id
+       mon data = /data/$name

src/sample.ceph.conf +15 -0
+
+        ; If you are using for example the RADOS Gateway and want to have your newly created
+        ; pools a higher replication level, you can set a default
+        ;osd pool default size = 3
+
+        ; You can also specify a CRUSH rule for new pools
+        ; Wiki: http://ceph.newdream.net/wiki/Custom_data_placement_with_CRUSH
+        ;osd pool default crush rule = 0
+
+        ; Timing is critical for monitors, but if you want to allow the clocks to drift a
+        ; bit more, you can specify the max drift.
+        ;mon clock drift allowed = 1
+
+        ; Tell the monitor to backoff from this warning for 30 seconds
+        ;mon clock drift warn backoff = 30

       ; logging, for debugging monitor crashes, in order of ; their likelihood of being helpful :)

src/sample.ceph.conf +0 -0
@@ -37,15 +78,15 @@

       ;debug paxos = 20
       ;debug auth = 20

-[mon.0]
+[mon.alpha]
       host = alpha
       mon addr = 192.168.0.10:6789

-[mon.1]
+[mon.beta]
       host = beta
       mon addr = 192.168.0.11:6789

-[mon.2]
+[mon.gamma]
       host = gamma
       mon addr = 192.168.0.12:6789

src/sample.ceph.conf +0 -0
@@ -70,17 +111,25 @@

 ;  Define as many as you like.
 [osd]
       ; This is where the btrfs volume will be mounted.
-       osd data = /data/osd$id
+       osd data = /data/$name

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

        ; This is an example of a file-based journal.
-       osd journal = /data/osd$id/journal
-       osd journal size = 1000 ; journal size, in megabytes
+       osd journal = /data/$name/journal
+        ; Journal size, in megabytes
+       osd journal size = 1000

src/sample.ceph.conf +7 -0
+
+        ; If you want to run the journal on a tmpfs, disable DirectIO
+        ;journal dio = false
+
+        ; You can change the number of recovery operations to speed up recovery
+        ; or slow it down if your machines can't handle it
+        ;osd recovery max active = 3

       ; osd logging to debug osd issues, in order of likelihood of being ; helpful

src/sample.ceph.conf +0 -0
@@ -98,6 +147,10 @@

       ; usually fine for basic testing).
       btrfs devs = /dev/sdx

+        ; If you want to specify some other mount options, you can do so.
+        ; The default values are rw,noatime
+        ;btrfs options = rw,noatime
+
 [osd.1]
       host = epsilon
       btrfs devs = /dev/sdy
--
1.7.0.4

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw

Hi,

Quoted 2 lines · Colin McCabe

Looks good. I would leave out the "log dir" stuff, though. That thing has been deprecated since forever in favor of "log file".

Is it really deprecated? A quick search through the code shows it is still there.

DoutStreamBuff shows:

// If conf->log_file was specified, that takes the highest priority

if (!conf->log_file.empty()) {
    string log_file(normalize_relative(conf->log_file.c_str()));
    if (conf->log_per_instance) {

But why is log_dir still there?

But you're right, for regular logging log file should be used. Still, why is log dir still there?

Quoted 155 lines

cheers,
Colin

Quoted 149 lines · Wido den Hollander
---
 src/sample.ceph.conf |   77 ++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 65 insertions(+), 12 deletions(-)
src/sample.ceph.conf +65 -13
index 473114b..67cb5ae 100644
@@ -10,6 +10,22 @@
 ; the current host (e.g., in a setup with a startup.conf on each
 ; node).
 
+; The variables $type, $id and $name are available to use in paths
+; $type = The type of daemon, possible values: mon, mds and osd
+; $id = The ID of the daemon, for mon.alpha, $id will be alpha
+; $name = $type.$id
+
+; For example:
+; osd.0
+;  $type = osd
+;  $id = 0
+;  $name = osd.0
+
+; mon.beta
+;  $type = mon
+;  $id = beta
+;  $name = mon.beta
+
 ; global
 [global]
       ; enable secure authentication
@@ -18,17 +34,42 @@
        ; allow ourselves to open a lot of files
        max open files = 131072
 
-        ; set up logging
-        log file = /var/log/ceph/$name.log
+        ; You can change the default log location if you want to
+        ;log dir = /var/log/ceph
+        ;log file = $name.log
+
+        ; Logging to syslog is also possible
+        ; If you want to disable logging to files, you should empty log dir and file
+        ;log to syslog = true
+        ;log dir =
+        ;log file =
+
+        ; This is the default pid file location
+        ;pid file = /var/run/ceph/$name.pid
 
-        ; set up pid files
-        pid file = /var/run/ceph/$name.pid
+        ; If you want to run a IPv6 cluster, set this to true. Dual-stack isn't possible
+        ;ms bind ipv6 = true
 
 ; monitors
 ;  You need at least one.  You need at least three if you want to
 ;  tolerate any node failures.  Always create an odd number.
 [mon]
-       mon data = /data/mon$id
+       mon data = /data/$name
+
+        ; If you are using for example the RADOS Gateway and want to have your newly created
+        ; pools a higher replication level, you can set a default
+        ;osd pool default size = 3
+
+        ; You can also specify a CRUSH rule for new pools
+        ; Wiki: http://ceph.newdream.net/wiki/Custom_data_placement_with_CRUSH
+        ;osd pool default crush rule = 0
+
+        ; Timing is critical for monitors, but if you want to allow the clocks to drift a
+        ; bit more, you can specify the max drift.
+        ;mon clock drift allowed = 1
+
+        ; Tell the monitor to backoff from this warning for 30 seconds
+        ;mon clock drift warn backoff = 30
 
       ; logging, for debugging monitor crashes, in order of
       ; their likelihood of being helpful :)
@@ -37,15 +78,15 @@
       ;debug paxos = 20
       ;debug auth = 20
 
-[mon.0]
+[mon.alpha]
       host = alpha
       mon addr = 192.168.0.10:6789
 
-[mon.1]
+[mon.beta]
       host = beta
       mon addr = 192.168.0.11:6789
 
-[mon.2]
+[mon.gamma]
       host = gamma
       mon addr = 192.168.0.12:6789
 
@@ -70,17 +111,25 @@
 ;  Define as many as you like.
 [osd]
       ; This is where the btrfs volume will be mounted.
-       osd data = /data/osd$id
+       osd data = /data/$name
 
       ; Ideally, make this a separate disk or partition.  A few
       ; hundred MB should be enough; more if you have fast or many
       ; disks.  You can use a file under the osd data dir if need be
-       ; (e.g. /data/osd$id/journal), but it will be slower than a
+       ; (e.g. /data/$name/journal), but it will be slower than a
       ; separate disk or partition.
 
        ; This is an example of a file-based journal.
-       osd journal = /data/osd$id/journal
-       osd journal size = 1000 ; journal size, in megabytes
+       osd journal = /data/$name/journal
+        ; Journal size, in megabytes
+       osd journal size = 1000
+
+        ; If you want to run the journal on a tmpfs, disable DirectIO
+        ;journal dio = false
+
+        ; You can change the number of recovery operations to speed up recovery
+        ; or slow it down if your machines can't handle it
+        ;osd recovery max active = 3
 
       ; osd logging to debug osd issues, in order of likelihood of being
       ; helpful
@@ -98,6 +147,10 @@
       ; usually fine for basic testing).
       btrfs devs = /dev/sdx
 
+        ; If you want to specify some other mount options, you can do so.
+        ; The default values are rw,noatime
+        ;btrfs options = rw,noatime
+
 [osd.1]
       host = epsilon
       btrfs devs = /dev/sdy
--

1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 16 lines · Wido den Hollander

Hi,

Quoted 2 lines · Colin McCabe

Looks good. I would leave out the "log dir" stuff, though. That thing has been deprecated since forever in favor of "log file".

Is it really deprecated? A quick search through the code shows it is still there.

DoutStreamBuff shows:

// If conf->log_file was specified, that takes the highest priority if (!conf->log_file.empty()) {
   string log_file(normalize_relative(conf->log_file.c_str())); if (conf->log_per_instance) {

Quoted 4 lines

But why is log_dir still there?

But you're right, for regular logging log file should be used. Still, why is log dir still there?

Mainly because of a desire not to break old configuration files. At some point we should try to get rid of it, though. Maybe the first step is to have a phase where we issue a warning about it.

sincerely,
Colin

Quoted 151 lines
Quoted 151 lines

cheers,
Colin

Quoted 144 lines · Wido den Hollander

---
 src/sample.ceph.conf |   77 ++++++++++++++++++++++++++++++++++++++++++--------

 1 files changed, 65 insertions(+), 12 deletions(-)
src/sample.ceph.conf +0 -0
index 473114b..67cb5ae 100644
@@ -10,6 +10,22 @@

 ; the current host (e.g., in a setup with a startup.conf on each ; node).

src/sample.ceph.conf +16 -0
+; The variables $type, $id and $name are available to use in paths
+; $type = The type of daemon, possible values: mon, mds and osd
+; $id = The ID of the daemon, for mon.alpha, $id will be alpha
+; $name = $type.$id
+
+; For example:
+; osd.0
+;  $type = osd
+;  $id = 0
+;  $name = osd.0
+
+; mon.beta
+;  $type = mon
+;  $id = beta
+;  $name = mon.beta
+

 ; global
 [global]
       ; enable secure authentication

src/sample.ceph.conf +0 -0
@@ -18,17 +34,42 @@

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

-        ; set up logging
-        log file = /var/log/ceph/$name.log
+        ; You can change the default log location if you want to
+        ;log dir = /var/log/ceph
+        ;log file = $name.log

src/sample.ceph.conf +11 -2
+
+        ; Logging to syslog is also possible
+        ; If you want to disable logging to files, you should empty log dir and file
+        ;log to syslog = true
+        ;log dir =
+        ;log file =
+
+        ; This is the default pid file location
+        ;pid file = /var/run/ceph/$name.pid
 
-        ; set up pid files
-        pid file = /var/run/ceph/$name.pid
+        ; If you want to run a IPv6 cluster, set this to true. Dual-stack isn't possible
+        ;ms bind ipv6 = true

 ; monitors
 ;  You need at least one.  You need at least three if you want to ;  tolerate any node failures.  Always create an odd number. [mon]
-       mon data = /data/mon$id
+       mon data = /data/$name

src/sample.ceph.conf +15 -0
+
+        ; If you are using for example the RADOS Gateway and want to have your newly created
+        ; pools a higher replication level, you can set a default
+        ;osd pool default size = 3
+
+        ; You can also specify a CRUSH rule for new pools
+        ; Wiki: http://ceph.newdream.net/wiki/Custom_data_placement_with_CRUSH
+        ;osd pool default crush rule = 0
+
+        ; Timing is critical for monitors, but if you want to allow the clocks to drift a
+        ; bit more, you can specify the max drift.
+        ;mon clock drift allowed = 1
+
+        ; Tell the monitor to backoff from this warning for 30 seconds
+        ;mon clock drift warn backoff = 30

       ; logging, for debugging monitor crashes, in order of ; their likelihood of being helpful :)

src/sample.ceph.conf +0 -0
@@ -37,15 +78,15 @@

       ;debug paxos = 20
       ;debug auth = 20

-[mon.0]
+[mon.alpha]
       host = alpha
       mon addr = 192.168.0.10:6789

-[mon.1]
+[mon.beta]
       host = beta
       mon addr = 192.168.0.11:6789

-[mon.2]
+[mon.gamma]
       host = gamma
       mon addr = 192.168.0.12:6789

src/sample.ceph.conf +0 -0
@@ -70,17 +111,25 @@

 ;  Define as many as you like.
 [osd]
       ; This is where the btrfs volume will be mounted.
-       osd data = /data/osd$id
+       osd data = /data/$name

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

        ; This is an example of a file-based journal.
-       osd journal = /data/osd$id/journal
-       osd journal size = 1000 ; journal size, in megabytes
+       osd journal = /data/$name/journal
+        ; Journal size, in megabytes
+       osd journal size = 1000

src/sample.ceph.conf +7 -0
+
+        ; If you want to run the journal on a tmpfs, disable DirectIO
+        ;journal dio = false
+
+        ; You can change the number of recovery operations to speed up recovery
+        ; or slow it down if your machines can't handle it
+        ;osd recovery max active = 3

       ; osd logging to debug osd issues, in order of likelihood of being ; helpful

src/sample.ceph.conf +0 -0
@@ -98,6 +147,10 @@

       ; usually fine for basic testing).
       btrfs devs = /dev/sdx

+        ; If you want to specify some other mount options, you can do so.
+        ; The default values are rw,noatime
+        ;btrfs options = rw,noatime
+
 [osd.1]
       host = epsilon
       btrfs devs = /dev/sdy
--
1.7.0.4

Quoted 12 lines
Quoted 5 lines
Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw

Hi Colin,

Quoted 17 lines · Colin McCabe
Quoted 16 lines · Wido den Hollander

Hi,

Quoted 2 lines · Colin McCabe

Looks good. I would leave out the "log dir" stuff, though. That thing has been deprecated since forever in favor of "log file".

Is it really deprecated? A quick search through the code shows it is still there.

DoutStreamBuff shows:

// If conf->log_file was specified, that takes the highest priority

if (!conf->log_file.empty()) {
   string log_file(normalize_relative(conf->log_file.c_str()));
   if (conf->log_per_instance) {
Quoted 9 lines
Quoted 4 lines

But why is log_dir still there?

But you're right, for regular logging log file should be used. Still, why is log dir still there?

Mainly because of a desire not to break old configuration files. At some point we should try to get rid of it, though. Maybe the first step is to have a phase where we issue a warning about it.

The "log dir" is still a bit of a pain when you want to fully disable logging to a file. Although 'log dir' is deprecated, this won't work:

[global]
log to syslog = true
log file =

This will result in a fallback to 'log dir' and would keep logging to files enabled.

My first patch was correct in that case, if you want to turn of logging to files, you have to set both to NULL.

Wido

Quoted 167 lines

sincerely,
Colin

Quoted 163 lines
Quoted 151 lines

cheers,
Colin

Quoted 144 lines · Wido den Hollander
---
 src/sample.ceph.conf |   77 ++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 65 insertions(+), 12 deletions(-)
src/sample.ceph.conf +65 -13
index 473114b..67cb5ae 100644
@@ -10,6 +10,22 @@
 ; the current host (e.g., in a setup with a startup.conf on each
 ; node).
 
+; The variables $type, $id and $name are available to use in paths
+; $type = The type of daemon, possible values: mon, mds and osd
+; $id = The ID of the daemon, for mon.alpha, $id will be alpha
+; $name = $type.$id
+
+; For example:
+; osd.0
+;  $type = osd
+;  $id = 0
+;  $name = osd.0
+
+; mon.beta
+;  $type = mon
+;  $id = beta
+;  $name = mon.beta
+
 ; global
 [global]
       ; enable secure authentication
@@ -18,17 +34,42 @@
        ; allow ourselves to open a lot of files
        max open files = 131072
 
-        ; set up logging
-        log file = /var/log/ceph/$name.log
+        ; You can change the default log location if you want to
+        ;log dir = /var/log/ceph
+        ;log file = $name.log
+
+        ; Logging to syslog is also possible
+        ; If you want to disable logging to files, you should empty log dir and file
+        ;log to syslog = true
+        ;log dir =
+        ;log file =
+
+        ; This is the default pid file location
+        ;pid file = /var/run/ceph/$name.pid
 
-        ; set up pid files
-        pid file = /var/run/ceph/$name.pid
+        ; If you want to run a IPv6 cluster, set this to true. Dual-stack isn't possible
+        ;ms bind ipv6 = true
 
 ; monitors
 ;  You need at least one.  You need at least three if you want to
 ;  tolerate any node failures.  Always create an odd number.
 [mon]
-       mon data = /data/mon$id
+       mon data = /data/$name
+
+        ; If you are using for example the RADOS Gateway and want to have your newly created
+        ; pools a higher replication level, you can set a default
+        ;osd pool default size = 3
+
+        ; You can also specify a CRUSH rule for new pools
+        ; Wiki: http://ceph.newdream.net/wiki/Custom_data_placement_with_CRUSH
+        ;osd pool default crush rule = 0
+
+        ; Timing is critical for monitors, but if you want to allow the clocks to drift a
+        ; bit more, you can specify the max drift.
+        ;mon clock drift allowed = 1
+
+        ; Tell the monitor to backoff from this warning for 30 seconds
+        ;mon clock drift warn backoff = 30
 
       ; logging, for debugging monitor crashes, in order of
       ; their likelihood of being helpful :)
@@ -37,15 +78,15 @@
       ;debug paxos = 20
       ;debug auth = 20
 
-[mon.0]
+[mon.alpha]
       host = alpha
       mon addr = 192.168.0.10:6789
 
-[mon.1]
+[mon.beta]
       host = beta
       mon addr = 192.168.0.11:6789
 
-[mon.2]
+[mon.gamma]
       host = gamma
       mon addr = 192.168.0.12:6789
 
@@ -70,17 +111,25 @@
 ;  Define as many as you like.
 [osd]
       ; This is where the btrfs volume will be mounted.
-       osd data = /data/osd$id
+       osd data = /data/$name
 
       ; Ideally, make this a separate disk or partition.  A few
       ; hundred MB should be enough; more if you have fast or many
       ; disks.  You can use a file under the osd data dir if need be
-       ; (e.g. /data/osd$id/journal), but it will be slower than a
+       ; (e.g. /data/$name/journal), but it will be slower than a
       ; separate disk or partition.
 
        ; This is an example of a file-based journal.
-       osd journal = /data/osd$id/journal
-       osd journal size = 1000 ; journal size, in megabytes
+       osd journal = /data/$name/journal
+        ; Journal size, in megabytes
+       osd journal size = 1000
+
+        ; If you want to run the journal on a tmpfs, disable DirectIO
+        ;journal dio = false
+
+        ; You can change the number of recovery operations to speed up recovery
+        ; or slow it down if your machines can't handle it
+        ;osd recovery max active = 3
 
       ; osd logging to debug osd issues, in order of likelihood of being
       ; helpful
@@ -98,6 +147,10 @@
       ; usually fine for basic testing).
       btrfs devs = /dev/sdx
 
+        ; If you want to specify some other mount options, you can do so.
+        ; The default values are rw,noatime
+        ;btrfs options = rw,noatime
+
 [osd.1]
       host = epsilon
       btrfs devs = /dev/sdy
--

1.7.0.4

Quoted 5 lines
Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

Resending to the list. My previous message bounced because of phone email client silliness.

C.

Quoted 234 lines · Colin McCabe

Very good point. I think that default could be changed (with a little care), so that log file = "" will work as expected.

I'll take a look in a bit.

C.

Quoted 225 lines · Wido den Hollander

Hi Colin,

Quoted 18 lines · Colin McCabe
Quoted 16 lines · Wido den Hollander

Hi,

Quoted 2 lines · Colin McCabe

Looks good. I would leave out the "log dir" stuff, though. That thing has been deprecated since forever in favor of "log file".

Is it really deprecated? A quick search through the code shows it is still there.

DoutStreamBuff shows:

// If conf->log_file was specified, that takes the highest priority if (!conf->log_file.empty()) {
string log_file(normalize_relative(conf->log_file.c_str())); if (conf->log_per_instance) {

Quoted 9 lines
Quoted 4 lines

But why is log_dir still there?

But you're right, for regular logging log file should be used. Still, why is log dir still there?

Mainly because of a desire not to break old configuration files. At some point we should try to get rid of it, though. Maybe the first step is to have a phase where we issue a warning about it.

The "log dir" is still a bit of a pain when you want to fully disable logging to a file. Although 'log dir' is deprecated, this won't work:

[global]
log to syslog = true
log file =

This will result in a fallback to 'log dir' and would keep logging to files enabled.

My first patch was correct in that case, if you want to turn of logging to files, you have to set both to NULL.

Wido

Quoted 177 lines

sincerely,
Colin

Quoted 173 lines
Quoted 159 lines

cheers,
Colin

Quoted 151 lines · Wido den Hollander

---
src/sample.ceph.conf | 77
++++++++++++++++++++++++++++++++++++++++++--------

1 files changed, 65 insertions(+), 12 deletions(-)
src/sample.ceph.conf +0 -0
index 473114b..67cb5ae 100644
@@ -10,6 +10,22 @@

; the current host (e.g., in a setup with a startup.conf on each ; node).

src/sample.ceph.conf +16 -0
+; The variables $type, $id and $name are available to use in paths
+; $type = The type of daemon, possible values: mon, mds and osd
+; $id = The ID of the daemon, for mon.alpha, $id will be alpha
+; $name = $type.$id
+
+; For example:
+; osd.0
+; $type = osd
+; $id = 0
+; $name = osd.0
+
+; mon.beta
+; $type = mon
+; $id = beta
+; $name = mon.beta
+

; global
[global]
; enable secure authentication

src/sample.ceph.conf +0 -0
@@ -18,17 +34,42 @@

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

- ; set up logging
- log file = /var/log/ceph/$name.log
+ ; You can change the default log location if you want to
+ ;log dir = /var/log/ceph
+ ;log file = $name.log
+
+ ; Logging to syslog is also possible
+ ; If you want to disable logging to files, you should empty log dir and file
+ ;log to syslog = true
+ ;log dir =
+ ;log file =
+
+ ; This is the default pid file location
+ ;pid file = /var/run/ceph/$name.pid

- ; set up pid files
- pid file = /var/run/ceph/$name.pid
+ ; If you want to run a IPv6 cluster, set this to true. Dual-stack isn't possible
+ ;ms bind ipv6 = true

; monitors
; You need at least one. You need at least three if you want to ; tolerate any node failures. Always create an odd number. [mon]
- mon data = /data/mon$id
+ mon data = /data/$name
+
+ ; If you are using for example the RADOS Gateway and want to have your newly created
+ ; pools a higher replication level, you can set a default
+ ;osd pool default size = 3
+
+ ; You can also specify a CRUSH rule for new pools
+ ; Wiki:
http://ceph.newdream.net/wiki/Custom_data_placement_with_CRUSH
+ ;osd pool default crush rule = 0
+
+ ; Timing is critical for monitors, but if you want to allow the clocks to drift a
+ ; bit more, you can specify the max drift.
+ ;mon clock drift allowed = 1
+
+ ; Tell the monitor to backoff from this warning for 30 seconds
+ ;mon clock drift warn backoff = 30

; logging, for debugging monitor crashes, in order of ; their likelihood of being helpful :)

src/sample.ceph.conf +0 -0
@@ -37,15 +78,15 @@

;debug paxos = 20
;debug auth = 20

-[mon.0]
+[mon.alpha]
host = alpha
mon addr = 192.168.0.10:6789

-[mon.1]
+[mon.beta]
host = beta
mon addr = 192.168.0.11:6789

-[mon.2]
+[mon.gamma]
host = gamma
mon addr = 192.168.0.12:6789

src/sample.ceph.conf +0 -0
@@ -70,17 +111,25 @@

; Define as many as you like.
[osd]
; This is where the btrfs volume will be mounted.
- osd data = /data/osd$id
+ osd data = /data/$name

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

; This is an example of a file-based journal.
- osd journal = /data/osd$id/journal
- osd journal size = 1000 ; journal size, in megabytes
+ osd journal = /data/$name/journal
+ ; Journal size, in megabytes
+ osd journal size = 1000

src/sample.ceph.conf +5 -0
+
+ ; If you want to run the journal on a tmpfs, disable DirectIO
+ ;journal dio = false
+
+ ; You can change the number of recovery operations to speed up

recovery
+ ; or slow it down if your machines can't handle it
+ ;osd recovery max active = 3

; osd logging to debug osd issues, in order of likelihood of being ; helpful

src/sample.ceph.conf +0 -0
@@ -98,6 +147,10 @@

; usually fine for basic testing).
btrfs devs = /dev/sdx

+ ; If you want to specify some other mount options, you can do so.
+ ; The default values are rw,noatime
+ ;btrfs options = rw,noatime
+
[osd.1]
host = epsilon
btrfs devs = /dev/sdy
--
1.7.0.4

Quoted 6 lines
Quoted 6 lines

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Applied
#7 lore raw

applied as 2d82fefc040a6412fc75cce6eaed2b4670db31de.

The "log dir" issue was resolved by 2047b59d655643590459d4a2883240d8946daeb7

cheers,
Colin

Quoted 241 lines · Colin McCabe

Resending to the list. My previous message bounced because of phone email client silliness.

C.

Quoted 234 lines · Colin McCabe

Very good point. I think that default could be changed (with a little care), so that log file = "" will work as expected.

I'll take a look in a bit.

C.

Quoted 225 lines · Wido den Hollander

Hi Colin,

Quoted 18 lines · Colin McCabe
Quoted 16 lines · Wido den Hollander

Hi,

Quoted 2 lines · Colin McCabe

Looks good. I would leave out the "log dir" stuff, though. That thing has been deprecated since forever in favor of "log file".

Is it really deprecated? A quick search through the code shows it is still there.

DoutStreamBuff shows:

// If conf->log_file was specified, that takes the highest priority if (!conf->log_file.empty()) {
string log_file(normalize_relative(conf->log_file.c_str())); if (conf->log_per_instance) {

Quoted 9 lines
Quoted 4 lines

But why is log_dir still there?

But you're right, for regular logging log file should be used. Still, why is log dir still there?

Mainly because of a desire not to break old configuration files. At some point we should try to get rid of it, though. Maybe the first step is to have a phase where we issue a warning about it.

The "log dir" is still a bit of a pain when you want to fully disable logging to a file. Although 'log dir' is deprecated, this won't work:

[global]
log to syslog = true
log file =

This will result in a fallback to 'log dir' and would keep logging to files enabled.

My first patch was correct in that case, if you want to turn of logging to files, you have to set both to NULL.

Wido

Quoted 177 lines

sincerely,
Colin

Quoted 173 lines
Quoted 159 lines

cheers,
Colin

Quoted 151 lines · Wido den Hollander

---
src/sample.ceph.conf | 77
++++++++++++++++++++++++++++++++++++++++++--------

1 files changed, 65 insertions(+), 12 deletions(-)
src/sample.ceph.conf +0 -0
index 473114b..67cb5ae 100644
@@ -10,6 +10,22 @@

; the current host (e.g., in a setup with a startup.conf on each ; node).

src/sample.ceph.conf +16 -0
+; The variables $type, $id and $name are available to use in paths
+; $type = The type of daemon, possible values: mon, mds and osd
+; $id = The ID of the daemon, for mon.alpha, $id will be alpha
+; $name = $type.$id
+
+; For example:
+; osd.0
+; $type = osd
+; $id = 0
+; $name = osd.0
+
+; mon.beta
+; $type = mon
+; $id = beta
+; $name = mon.beta
+

; global
[global]
; enable secure authentication

src/sample.ceph.conf +0 -0
@@ -18,17 +34,42 @@

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

- ; set up logging
- log file = /var/log/ceph/$name.log
+ ; You can change the default log location if you want to
+ ;log dir = /var/log/ceph
+ ;log file = $name.log
+
+ ; Logging to syslog is also possible
+ ; If you want to disable logging to files, you should empty log dir and file
+ ;log to syslog = true
+ ;log dir =
+ ;log file =
+
+ ; This is the default pid file location
+ ;pid file = /var/run/ceph/$name.pid

- ; set up pid files
- pid file = /var/run/ceph/$name.pid
+ ; If you want to run a IPv6 cluster, set this to true. Dual-stack isn't possible
+ ;ms bind ipv6 = true

; monitors
; You need at least one. You need at least three if you want to ; tolerate any node failures. Always create an odd number. [mon]
- mon data = /data/mon$id
+ mon data = /data/$name
+
+ ; If you are using for example the RADOS Gateway and want to have your newly created
+ ; pools a higher replication level, you can set a default
+ ;osd pool default size = 3
+
+ ; You can also specify a CRUSH rule for new pools
+ ; Wiki:
http://ceph.newdream.net/wiki/Custom_data_placement_with_CRUSH
+ ;osd pool default crush rule = 0
+
+ ; Timing is critical for monitors, but if you want to allow the clocks to drift a
+ ; bit more, you can specify the max drift.
+ ;mon clock drift allowed = 1
+
+ ; Tell the monitor to backoff from this warning for 30 seconds
+ ;mon clock drift warn backoff = 30

; logging, for debugging monitor crashes, in order of ; their likelihood of being helpful :)

src/sample.ceph.conf +0 -0
@@ -37,15 +78,15 @@

;debug paxos = 20
;debug auth = 20

-[mon.0]
+[mon.alpha]
host = alpha
mon addr = 192.168.0.10:6789

-[mon.1]
+[mon.beta]
host = beta
mon addr = 192.168.0.11:6789

-[mon.2]
+[mon.gamma]
host = gamma
mon addr = 192.168.0.12:6789

src/sample.ceph.conf +0 -0
@@ -70,17 +111,25 @@

; Define as many as you like.
[osd]
; This is where the btrfs volume will be mounted.
- osd data = /data/osd$id
+ osd data = /data/$name

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

; This is an example of a file-based journal.
- osd journal = /data/osd$id/journal
- osd journal size = 1000 ; journal size, in megabytes
+ osd journal = /data/$name/journal
+ ; Journal size, in megabytes
+ osd journal size = 1000

src/sample.ceph.conf +5 -0
+
+ ; If you want to run the journal on a tmpfs, disable DirectIO
+ ;journal dio = false
+
+ ; You can change the number of recovery operations to speed up

recovery
+ ; or slow it down if your machines can't handle it
+ ;osd recovery max active = 3

; osd logging to debug osd issues, in order of likelihood of being ; helpful

src/sample.ceph.conf +0 -0
@@ -98,6 +147,10 @@

; usually fine for basic testing).
btrfs devs = /dev/sdx

+ ; If you want to specify some other mount options, you can do so.
+ ; The default values are rw,noatime
+ ;btrfs options = rw,noatime
+
[osd.1]
host = epsilon
btrfs devs = /dev/sdy
--
1.7.0.4

Quoted 6 lines
Quoted 6 lines

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#8 lore raw

PATCH 1/1 config: Update sample config with more examples

In reply to Colin McCabe
---
 src/sample.ceph.conf |   75 ++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 63 insertions(+), 12 deletions(-)
src/sample.ceph.conf +63 -12
index 473114b..0d609e1 100644
@@ -10,6 +10,22 @@
 ; the current host (e.g., in a setup with a startup.conf on each
 ; node).
 
+; The variables $type, $id and $name are available to use in paths
+; $type = The type of daemon, possible values: mon, mds and osd
+; $id = The ID of the daemon, for mon.alpha, $id will be alpha
+; $name = $type.$id
+
+; For example:
+; osd.0
+;  $type = osd
+;  $id = 0
+;  $name = osd.0
+
+; mon.beta
+;  $type = mon
+;  $id = beta
+;  $name = mon.beta
+
 ; global
 [global]
 	; enable secure authentication
@@ -18,17 +34,40 @@
         ; allow ourselves to open a lot of files
         max open files = 131072
 
-        ; set up logging
-        log file = /var/log/ceph/$name.log
+        ; You can change the default log location if you want to
+        ;log file = /var/log/ceph/$name.log
+
+        ; Logging to syslog is also possible
+        ; If you want to disable logging to files, you should empty log file
+        ;log to syslog = true
+        ;log file = 
+
+        ; This is the default pid file location
+        ;pid file = /var/run/ceph/$name.pid
 
-        ; set up pid files
-        pid file = /var/run/ceph/$name.pid
+        ; If you want to run a IPv6 cluster, set this to true. Dual-stack isn't possible
+        ;ms bind ipv6 = true
 
 ; monitors
 ;  You need at least one.  You need at least three if you want to
 ;  tolerate any node failures.  Always create an odd number.
 [mon]
-	mon data = /data/mon$id
+	mon data = /data/$name
+
+        ; If you are using for example the RADOS Gateway and want to have your newly created
+        ; pools a higher replication level, you can set a default
+        ;osd pool default size = 3
+
+        ; You can also specify a CRUSH rule for new pools
+        ; Wiki: http://ceph.newdream.net/wiki/Custom_data_placement_with_CRUSH
+        ;osd pool default crush rule = 0
+
+        ; Timing is critical for monitors, but if you want to allow the clocks to drift a 
+        ; bit more, you can specify the max drift.
+        ;mon clock drift allowed = 1
+
+        ; Tell the monitor to backoff from this warning for 30 seconds
+        ;mon clock drift warn backoff = 30
 
 	; logging, for debugging monitor crashes, in order of
 	; their likelihood of being helpful :)
@@ -37,15 +76,15 @@
 	;debug paxos = 20
 	;debug auth = 20
 
-[mon.0]
+[mon.alpha]
 	host = alpha
 	mon addr = 192.168.0.10:6789
 
-[mon.1]
+[mon.beta]
 	host = beta
 	mon addr = 192.168.0.11:6789
 
-[mon.2]
+[mon.gamma]
 	host = gamma
 	mon addr = 192.168.0.12:6789
 
@@ -70,17 +109,25 @@
 ;  Define as many as you like.
 [osd]
 	; This is where the btrfs volume will be mounted.
-	osd data = /data/osd$id
+	osd data = /data/$name
 
 	; Ideally, make this a separate disk or partition.  A few
  	; hundred MB should be enough; more if you have fast or many
  	; disks.  You can use a file under the osd data dir if need be
- 	; (e.g. /data/osd$id/journal), but it will be slower than a
+ 	; (e.g. /data/$name/journal), but it will be slower than a
  	; separate disk or partition.
 
         ; This is an example of a file-based journal.
-	osd journal = /data/osd$id/journal
-	osd journal size = 1000 ; journal size, in megabytes
+	osd journal = /data/$name/journal
+        ; Journal size, in megabytes
+	osd journal size = 1000
+
+        ; If you want to run the journal on a tmpfs, disable DirectIO
+        ;journal dio = false
+
+        ; You can change the number of recovery operations to speed up recovery
+        ; or slow it down if your machines can't handle it
+        ;osd recovery max active = 3
 
 	; osd logging to debug osd issues, in order of likelihood of being
 	; helpful
@@ -98,6 +145,10 @@
 	; usually fine for basic testing).
 	btrfs devs = /dev/sdx
 
+        ; If you want to specify some other mount options, you can do so.
+        ; The default values are rw,noatime
+        ;btrfs options = rw,noatime
+
 [osd.1]
 	host = epsilon
 	btrfs devs = /dev/sdy
Signature · 1 line
1.7.0.4