corosync.conf.5 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561
  1. .\"/*
  2. .\" * Copyright (c) 2005 MontaVista Software, Inc.
  3. .\" * Copyright (c) 2006 Red Hat, Inc.
  4. .\" *
  5. .\" * All rights reserved.
  6. .\" *
  7. .\" * Author: Steven Dake (sdake@redhat.com)
  8. .\" *
  9. .\" * This software licensed under BSD license, the text of which follows:
  10. .\" *
  11. .\" * Redistribution and use in source and binary forms, with or without
  12. .\" * modification, are permitted provided that the following conditions are met:
  13. .\" *
  14. .\" * - Redistributions of source code must retain the above copyright notice,
  15. .\" * this list of conditions and the following disclaimer.
  16. .\" * - Redistributions in binary form must reproduce the above copyright notice,
  17. .\" * this list of conditions and the following disclaimer in the documentation
  18. .\" * and/or other materials provided with the distribution.
  19. .\" * - Neither the name of the MontaVista Software, Inc. nor the names of its
  20. .\" * contributors may be used to endorse or promote products derived from this
  21. .\" * software without specific prior written permission.
  22. .\" *
  23. .\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  24. .\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  25. .\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  26. .\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  27. .\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  28. .\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  29. .\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  30. .\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  31. .\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  32. .\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  33. .\" * THE POSSIBILITY OF SUCH DAMAGE.
  34. .\" */
  35. .TH COROSYNC_CONF 5 2006-03-28 "corosync Man Page" "Corosync Cluster Engine Programmer's Manual"
  36. .SH NAME
  37. corosync.conf - corosync executive configuration file
  38. .SH SYNOPSIS
  39. /etc/corosync.conf
  40. .SH DESCRIPTION
  41. The corosync.conf instructs the corosync executive about various parameters
  42. needed to control the corosync executive. The configuration file consists of
  43. bracketed top level directives. The possible directive choices are
  44. .IR "totem { } , logging { }.
  45. These directives are described below.
  46. .TP
  47. totem { }
  48. This top level directive contains configuration options for the totem protocol.
  49. .TP
  50. logging { }
  51. This top level directive contains configuration options for logging.
  52. .TP
  53. event { }
  54. This top level directive contains configuration options for the event service.
  55. .TP
  56. aisexec { }
  57. This top level directive contains configuration options for user privilegies.
  58. .PP
  59. .PP
  60. Within the
  61. .B totem
  62. directive, an interface directive is required. There is also one configuration
  63. option which is required:
  64. .PP
  65. .PP
  66. Within the
  67. .B interface
  68. sub-directive of totem there are four parameters which are required:
  69. .TP
  70. ringnumber
  71. This specifies the ring number for the interface. When using the redundant
  72. ring protocol, each interface should specify separate ring numbers to uniquely
  73. identify to the membership protocol which interface to use for which redundant
  74. ring.
  75. .TP
  76. bindnetaddr
  77. This specifies the address which the corosync executive should bind.
  78. This address should always end in zero. If the totem traffic should
  79. be routed over 192.168.5.92, set bindnetaddr to 192.168.5.0.
  80. This may also be an IPV6 address, in which case IPV6 networking will be used.
  81. In this case, the full address must be specified and there is no automatic
  82. selection of the network interface within a specific subnet as with IPv4.
  83. If IPv6 networking is used, the nodeid field must be specified.
  84. .TP
  85. broadcast
  86. This is optional and can be set to yes. If it is set to yes, the broadcast
  87. address will be used for communication. If this option is set, mcastaddr
  88. should not be set.
  89. .TP
  90. mcastaddr
  91. This is the multicast address used by corosync executive. The default
  92. should work for most networks, but the network administrator should be queried
  93. about a multicast address to use. Avoid 224.x.x.x because this is a "config"
  94. multicast address.
  95. This may also be an IPV6 multicast address, in which case IPV6 networking
  96. will be used. If IPv6 networking is used, the nodeid field must be specified.
  97. .TP
  98. mcastport
  99. This specifies the UDP port number. It is possible to use the same multicast
  100. address on a network with the corosync services configured for different
  101. UDP ports.
  102. .PP
  103. .PP
  104. Within the
  105. .B totem
  106. directive, there are seven configuration options of which one is required,
  107. five are optional, and one is required when IPV6 is configured in the interface
  108. subdirective. The required directive controls the version of the totem
  109. configuration. The optional option unless using IPV6 directive controls
  110. identification of the processor. The optional options control secrecy and
  111. authentication, the redundant ring mode of operation, maximum network MTU,
  112. and number of sending threads, and the nodeid field.
  113. .TP
  114. version
  115. This specifies the version of the configuration file. Currently the only
  116. valid version for this directive is 2.
  117. .PP
  118. .PP
  119. .TP
  120. nodeid
  121. This configuration option is optional when using IPv4 and required when using
  122. IPv6. This is a 32 bit value specifying the node identifier delivered to the
  123. cluster membership service. If this is not specified with IPv4, the node id
  124. will be determined from the 32 bit IP address the system to which the system
  125. is bound with ring identifier of 0. The node identifier value of zero is
  126. reserved and should not be used.
  127. .TP
  128. clear_node_high_bit
  129. This configuration option is optional and is only relevant when no nodeid is
  130. specified. Some openais clients require a signed 32 bit nodeid that is greater
  131. than zero however by default openais uses all 32 bits of the IPv4 address space
  132. when generating a nodeid. Set this option to yes to force the high bit to be
  133. zero and therefor ensure the nodeid is a positive signed 32 bit integer.
  134. WARNING: The clusters behavior is undefined if this option is enabled on only
  135. a subset of the cluster (for example during a rolling upgrade).
  136. .TP
  137. secauth
  138. This specifies that HMAC/SHA1 authentication should be used to authenticate
  139. all messages. It further specifies that all data should be encrypted with the
  140. sober128 encryption algorithm to protect data from eavesdropping.
  141. Enabling this option adds a 36 byte header to every message sent by totem which
  142. reduces total throughput. Encryption and authentication consume 75% of CPU
  143. cycles in aisexec as measured with gprof when enabled.
  144. For 100mbit networks with 1500 MTU frame transmissions:
  145. A throughput of 9mb/sec is possible with 100% cpu utilization when this
  146. option is enabled on 3ghz cpus.
  147. A throughput of 10mb/sec is possible wth 20% cpu utilization when this
  148. optin is disabled on 3ghz cpus.
  149. For gig-e networks with large frame transmissions:
  150. A throughput of 20mb/sec is possible when this option is enabled on
  151. 3ghz cpus.
  152. A throughput of 60mb/sec is possible when this option is disabled on
  153. 3ghz cpus.
  154. The default is on.
  155. .TP
  156. rrp_mode
  157. This specifies the mode of redundant ring, which may be none, active, or
  158. passive. Active replication offers slightly lower latency from transmit
  159. to delivery in faulty network environments but with less performance.
  160. Passive replication may nearly double the speed of the totem protocol
  161. if the protocol doesn't become cpu bound. The final option is none, in
  162. which case only one network interface will be used to operate the totem
  163. protocol.
  164. If only one interface directive is specified, none is automatically chosen.
  165. If multiple interface directives are specified, only active or passive may
  166. be chosen.
  167. .TP
  168. netmtu
  169. This specifies the network maximum transmit unit. To set this value beyond
  170. 1500, the regular frame MTU, requires ethernet devices that support large, or
  171. also called jumbo, frames. If any device in the network doesn't support large
  172. frames, the protocol will not operate properly. The hosts must also have their
  173. mtu size set from 1500 to whatever frame size is specified here.
  174. Please note while some NICs or switches claim large frame support, they support
  175. 9000 MTU as the maximum frame size including the IP header. Setting the netmtu
  176. and host MTUs to 9000 will cause totem to use the full 9000 bytes of the frame.
  177. Then Linux will add a 18 byte header moving the full frame size to 9018. As a
  178. result some hardware will not operate properly with this size of data. A netmtu
  179. of 8982 seems to work for the few large frame devices that have been tested.
  180. Some manufacturers claim large frame support when in fact they support frame
  181. sizes of 4500 bytes.
  182. Increasing the MTU from 1500 to 8982 doubles throughput performance from 30MB/sec
  183. to 60MB/sec as measured with evsbench with 175000 byte messages with the secauth
  184. directive set to off.
  185. When sending multicast traffic, if the network frequently reconfigures, chances are
  186. that some device in the network doesn't support large frames.
  187. Choose hardware carefully if intending to use large frame support.
  188. The default is 1500.
  189. .TP
  190. threads
  191. This directive controls how many threads are used to encrypt and send multicast
  192. messages. If secauth is off, the protocol will never use threaded sending.
  193. If secauth is on, this directive allows systems to be configured to use
  194. multiple threads to encrypt and send multicast messages.
  195. A thread directive of 0 indicates that no threaded send should be used. This
  196. mode offers best performance for non-SMP systems.
  197. The default is 0.
  198. .TP
  199. vsftype
  200. This directive controls the virtual synchrony filter type used to identify
  201. a primary component. The preferred choice is YKD dynamic linear voting,
  202. however, for clusters larger then 32 nodes YKD consumes alot of memory. For
  203. large scale clusters that are created by changing the MAX_PROCESSORS_COUNT
  204. #define in the C code totem.h file, the virtual synchrony filter "none" is
  205. recommended but then AMF and DLCK services (which are currently experimental)
  206. are not safe for use.
  207. The default is ykd. The vsftype can also be set to none.
  208. Within the
  209. .B totem
  210. directive, there are several configuration options which are used to control
  211. the operation of the protocol. It is generally not recommended to change any
  212. of these values without proper guidance and sufficient testing. Some networks
  213. may require larger values if suffering from frequent reconfigurations. Some
  214. applications may require faster failure detection times which can be achieved
  215. by reducing the token timeout.
  216. .TP
  217. token
  218. This timeout specifies in milliseconds until a token loss is declared after not
  219. receiving a token. This is the time spent detecting a failure of a processor
  220. in the current configuration. Reforming a new configuration takes about 50
  221. milliseconds in addition to this timeout.
  222. The default is 1000 milliseconds.
  223. .TP
  224. token_retransmit
  225. This timeout specifies in milliseconds after how long before receiving a token
  226. the token is retransmitted. This will be automatically calculated if token
  227. is modified. It is not recommended to alter this value without guidance from
  228. the corosync community.
  229. The default is 238 milliseconds.
  230. .TP
  231. hold
  232. This timeout specifies in milliseconds how long the token should be held by
  233. the representative when the protocol is under low utilization. It is not
  234. recommended to alter this value without guidance from the corosync community.
  235. The default is 180 milliseconds.
  236. .TP
  237. retransmits_before_loss
  238. This value identifies how many token retransmits should be attempted before
  239. forming a new configuration. If this value is set, retransmit and hold will
  240. be automatically calculated from retransmits_before_loss and token.
  241. The default is 4 retransmissions.
  242. .TP
  243. join
  244. This timeout specifies in milliseconds how long to wait for join messages in
  245. the membership protocol.
  246. The default is 100 milliseconds.
  247. .TP
  248. send_join
  249. This timeout specifies in milliseconds an upper range between 0 and send_join
  250. to wait before sending a join message. For configurations with less then
  251. 32 nodes, this parameter is not necessary. For larger rings, this parameter
  252. is necessary to ensure the NIC is not overflowed with join messages on
  253. formation of a new ring. A reasonable value for large rings (128 nodes) would
  254. be 80msec. Other timer values must also change if this value is changed. Seek
  255. advice from the corosync mailing list if trying to run larger configurations.
  256. The default is 0 milliseconds.
  257. .TP
  258. consensus
  259. This timeout specifies in milliseconds how long to wait for consensus to be
  260. achieved before starting a new round of membership configuration.
  261. The default is 200 milliseconds.
  262. .TP
  263. merge
  264. This timeout specifies in milliseconds how long to wait before checking for
  265. a partition when no multicast traffic is being sent. If multicast traffic
  266. is being sent, the merge detection happens automatically as a function of
  267. the protocol.
  268. The default is 200 milliseconds.
  269. .TP
  270. downcheck
  271. This timeout specifies in milliseconds how long to wait before checking
  272. that a network interface is back up after it has been downed.
  273. The default is 1000 millseconds.
  274. .TP
  275. fail_to_recv_const
  276. This constant specifies how many rotations of the token without receiving any
  277. of the messages when messages should be received may occur before a new
  278. configuration is formed.
  279. The default is 50 failures to receive a message.
  280. .TP
  281. seqno_unchanged_const
  282. This constant specifies how many rotations of the token without any multicast
  283. traffic should occur before the merge detection timeout is started.
  284. The default is 30 rotations.
  285. .TP
  286. heartbeat_failures_allowed
  287. [HeartBeating mechanism]
  288. Configures the optional HeartBeating mechanism for faster failure detection. Keep in
  289. mind that engaging this mechanism in lossy networks could cause faulty loss declaration
  290. as the mechanism relies on the network for heartbeating.
  291. So as a rule of thumb use this mechanism if you require improved failure in low to
  292. medium utilized networks.
  293. This constant specifies the number of heartbeat failures the system should tolerate
  294. before declaring heartbeat failure e.g 3. Also if this value is not set or is 0 then the
  295. heartbeat mechanism is not engaged in the system and token rotation is the method
  296. of failure detection
  297. The default is 0 (disabled).
  298. .TP
  299. max_network_delay
  300. [HeartBeating mechanism]
  301. This constant specifies in milliseconds the approximate delay that your network takes
  302. to transport one packet from one machine to another. This value is to be set by system
  303. engineers and please dont change if not sure as this effects the failure detection
  304. mechanism using heartbeat.
  305. The default is 50 milliseconds.
  306. .TP
  307. window_size
  308. This constant specifies the maximum number of messages that may be sent on one
  309. token rotation. If all processors perform equally well, this value could be
  310. large (300), which would introduce higher latency from origination to delivery
  311. for very large rings. To reduce latency in large rings(16+), the defaults are
  312. a safe compromise. If 1 or more slow processor(s) are present among fast
  313. processors, window_size should be no larger then 256000 / netmtu to avoid
  314. overflow of the kernel receive buffers. The user is notified of this by
  315. the display of a retransmit list in the notification logs. There is no loss
  316. of data, but performance is reduced when these errors occur.
  317. The default is 50 messages.
  318. .TP
  319. max_messages
  320. This constant specifies the maximum number of messages that may be sent by one
  321. processor on receipt of the token. The max_messages parameter is limited to
  322. 256000 / netmtu to prevent overflow of the kernel transmit buffers.
  323. The default is 17 messages.
  324. .TP
  325. rrp_problem_count_timeout
  326. This specifies the time in milliseconds to wait before decrementing the
  327. problem count by 1 for a particular ring to ensure a link is not marked
  328. faulty for transient network failures.
  329. The default is 1000 milliseconds.
  330. .TP
  331. rrp_problem_count_threshold
  332. This specifies the number of times a problem is detected with a link before
  333. setting the link faulty. Once a link is set faulty, no more data is
  334. transmitted upon it. Also, the problem counter is no longer decremented when
  335. the problem count timeout expires.
  336. A problem is detected whenever all tokens from the proceeding processor have
  337. not been received within the rrp_token_expired_timeout. The
  338. rrp_problem_count_threshold * rrp_token_expired_timeout should be atleast 50
  339. milliseconds less then the token timeout, or a complete reconfiguration
  340. may occur.
  341. The default is 20 problem counts.
  342. .TP
  343. rrp_token_expired_timeout
  344. This specifies the time in milliseconds to increment the problem counter for
  345. the redundant ring protocol after not having received a token from all rings
  346. for a particular processor.
  347. This value will automatically be calculated from the token timeout and
  348. problem_count_threshold but may be overridden. It is not recommended to
  349. override this value without guidance from the corosync community.
  350. The default is 47 milliseconds.
  351. .PP
  352. Within the
  353. .B logging
  354. directive, there are several configuration options which are all optional.
  355. .PP
  356. The following 3 options are valid only for the top level logging directive:
  357. .TP
  358. timestamp
  359. This specifies that a timestamp is placed on all log messages.
  360. The default is off.
  361. .TP
  362. fileline
  363. This specifies that file and line should be printed.
  364. The default is off.
  365. .TP
  366. function_name
  367. This specifies that the code function name should be printed.
  368. The default is off.
  369. .PP
  370. The following options are valid both for top level logging directive
  371. and they can be overriden in logger_subsys entries.
  372. .TP
  373. to_stderr
  374. .TP
  375. to_logfile
  376. .TP
  377. to_syslog
  378. These specify the destination of logging output. Any combination of
  379. these options may be specified. Valid options are
  380. .B yes
  381. and
  382. .B no.
  383. The default is syslog and stderr.
  384. .TP
  385. logfile
  386. If the
  387. .B to_logfile
  388. directive is set to
  389. .B yes
  390. , this option specifies the pathname of the log file.
  391. No default.
  392. .TP
  393. logfile_priority
  394. This specifies the logfile priority for this particular subsystem. Ignored if debug is on.
  395. Possible values are: alert, crit, debug (same as debug = on), emerg, err, info, notice, warning.
  396. The default is: info.
  397. .TP
  398. syslog_facility
  399. This specifies the syslog facility type that will be used for any messages
  400. sent to syslog. options are daemon, local0, local1, local2, local3, local4,
  401. local5, local6 & local7.
  402. The default is daemon.
  403. .TP
  404. syslog_priority
  405. This specifies the syslog level for this particular subsystem. Ignored if debug is on.
  406. Possible values are: alert, crit, debug (same as debug = on), emerg, err, info, notice, warning.
  407. The default is: info.
  408. .TP
  409. debug
  410. This specifies whether debug output is logged for this particular logger.
  411. The default is off.
  412. .TP
  413. tags
  414. This specifies which tags should be traced for this particular logger.
  415. Set debug directive to
  416. .B on
  417. in order to enable tracing using tags.
  418. Values are specified using a vertical bar as a logical OR separator:
  419. enter|leave|trace1|trace2|trace3|...
  420. The default is none.
  421. .PP
  422. Within the
  423. .B logging
  424. directive, logger_subsys directives are optional.
  425. .PP
  426. Within the
  427. .B logger_subsys
  428. sub-directive, all of the above logging configuration options are valid and
  429. can be used to override the default settings.
  430. The subsys entry, described below, is mandatory to identify the subsystem.
  431. .TP
  432. subsys
  433. This specifies the subsystem identity (name) for which logging is specified. This is the
  434. name used by a service in the log_init () call. E.g. 'CKPT'. This directive is
  435. required.
  436. .PP
  437. Within the
  438. .B aisexec
  439. directive, there are two configuration options which are all optional:
  440. .TP
  441. user
  442. .TP
  443. group
  444. These specify the user and group, which is able to run and use corosync.
  445. In any case, this is able to do root:root. But if you don't want run
  446. corosync as root, you can use this directives.
  447. The default is ais.
  448. .SH "FILES"
  449. .TP
  450. /etc/corosync.conf
  451. The corosync executive configuration file.
  452. .SH "SEE ALSO"
  453. .BR corosync_overview (8)
  454. .PP