corosync.conf.5 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  1. .\"/*
  2. .\" * Copyright (c) 2005 MontaVista Software, Inc.
  3. .\" * Copyright (c) 2006-2012 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 2012-01-12 "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/corosync.conf
  40. .SH DESCRIPTION
  41. The corosync.conf instructs the corosync executive about various parameters
  42. needed to control the corosync executive. Empty lines and lines starting with
  43. # character are ignored. The configuration file consists of bracketed top level
  44. directives. The possible directive choices are:
  45. .TP
  46. totem { }
  47. This top level directive contains configuration options for the totem protocol.
  48. .TP
  49. logging { }
  50. This top level directive contains configuration options for logging.
  51. .TP
  52. quorum { }
  53. This top level directive contains configuration options for quorum.
  54. .PP
  55. .PP
  56. It is also possible to specify the top level parameter
  57. .B compatibility.
  58. This directive indicates the level of compatibility requested by the user. The
  59. option whitetank can be specified to remain backward compatable with
  60. openais-0.80.z. The option none can be specified to only be compatable
  61. with corosync-1.Y.Z. Extra processing during configuration changes is
  62. required to remain backward compatable.
  63. The default is whitetank. (backwards compatibility)
  64. .PP
  65. .PP
  66. Within the
  67. .B totem
  68. directive, an interface directive is required. There is also one configuration
  69. option which is required:
  70. .PP
  71. .PP
  72. Within the
  73. .B interface
  74. sub-directive of totem there are four parameters which are required. There is
  75. one parameter which is optional.
  76. .TP
  77. ringnumber
  78. This specifies the ring number for the interface. When using the redundant
  79. ring protocol, each interface should specify separate ring numbers to uniquely
  80. identify to the membership protocol which interface to use for which redundant
  81. ring. The ringnumber must start at 0.
  82. .TP
  83. bindnetaddr
  84. This specifies the network address the corosync executive should bind
  85. to. For example, if the local interface is 192.168.5.92 with netmask
  86. 255.255.255.0, set bindnetaddr to 192.168.5.0. If the local interface
  87. is 192.168.5.92 with netmask 255.255.255.192, set bindnetaddr to
  88. 192.168.5.64, and so forth.
  89. This may also be an IPV6 address, in which case IPV6 networking will be used.
  90. In this case, the full address must be specified and there is no automatic
  91. selection of the network interface within a specific subnet as with IPv4.
  92. If IPv6 networking is used, the nodeid field must be specified.
  93. .TP
  94. broadcast
  95. This is optional and can be set to yes. If it is set to yes, the broadcast
  96. address will be used for communication. If this option is set, mcastaddr
  97. should not be set.
  98. .TP
  99. mcastaddr
  100. This is the multicast address used by corosync executive. The default
  101. should work for most networks, but the network administrator should be queried
  102. about a multicast address to use. Avoid 224.x.x.x because this is a "config"
  103. multicast address.
  104. This may also be an IPV6 multicast address, in which case IPV6 networking
  105. will be used. If IPv6 networking is used, the nodeid field must be specified.
  106. .TP
  107. mcastport
  108. This specifies the UDP port number. It is possible to use the same multicast
  109. address on a network with the corosync services configured for different
  110. UDP ports.
  111. Please note corosync uses two UDP ports mcastport (for mcast receives) and
  112. mcastport - 1 (for mcast sends).
  113. If you have multiple clusters on the same network using the same mcastaddr
  114. please configure the mcastports with a gap.
  115. .TP
  116. ttl
  117. This specifies the Time To Live (TTL). If you run your cluster on a routed
  118. network then the default of "1" will be too small. This option provides
  119. a way to increase this up to 255. The valid range is 0..255.
  120. Note that this is only valid on multicast transport types.
  121. .TP
  122. member
  123. This specifies a member on the interface and used with the udpu transport only.
  124. Every node that should be a member of the membership should be specified as
  125. a separate member directive. Within the member directive there is a parameter
  126. memberaddr which specifies the ip address of one of the nodes.
  127. .PP
  128. .PP
  129. Within the
  130. .B totem
  131. directive, there are seven configuration options of which one is required,
  132. five are optional, and one is required when IPV6 is configured in the interface
  133. subdirective. The required directive controls the version of the totem
  134. configuration. The optional option unless using IPV6 directive controls
  135. identification of the processor. The optional options control secrecy and
  136. authentication, the redundant ring mode of operation, maximum network MTU,
  137. and the nodeid field.
  138. .TP
  139. version
  140. This specifies the version of the configuration file. Currently the only
  141. valid version for this directive is 2.
  142. .PP
  143. .PP
  144. .TP
  145. nodeid
  146. This configuration option is optional when using IPv4 and required when using
  147. IPv6. This is a 32 bit value specifying the node identifier delivered to the
  148. cluster membership service. If this is not specified with IPv4, the node id
  149. will be determined from the 32 bit IP address the system to which the system
  150. is bound with ring identifier of 0. The node identifier value of zero is
  151. reserved and should not be used.
  152. .TP
  153. clear_node_high_bit
  154. This configuration option is optional and is only relevant when no nodeid is
  155. specified. Some openais clients require a signed 32 bit nodeid that is greater
  156. than zero however by default openais uses all 32 bits of the IPv4 address space
  157. when generating a nodeid. Set this option to yes to force the high bit to be
  158. zero and therefor ensure the nodeid is a positive signed 32 bit integer.
  159. WARNING: The clusters behavior is undefined if this option is enabled on only
  160. a subset of the cluster (for example during a rolling upgrade).
  161. .TP
  162. secauth
  163. This specifies that HMAC/SHA1 authentication should be used to authenticate
  164. all messages. It further specifies that all data should be encrypted with the
  165. sober128 encryption algorithm to protect data from eavesdropping.
  166. Enabling this option adds a 36 byte header to every message sent by totem which
  167. reduces total throughput. Encryption and authentication consume 75% of CPU
  168. cycles in aisexec as measured with gprof when enabled.
  169. For 100mbit networks with 1500 MTU frame transmissions:
  170. A throughput of 9mb/sec is possible with 100% cpu utilization when this
  171. option is enabled on 3ghz cpus.
  172. A throughput of 10mb/sec is possible wth 20% cpu utilization when this
  173. optin is disabled on 3ghz cpus.
  174. For gig-e networks with large frame transmissions:
  175. A throughput of 20mb/sec is possible when this option is enabled on
  176. 3ghz cpus.
  177. A throughput of 60mb/sec is possible when this option is disabled on
  178. 3ghz cpus.
  179. The default is on.
  180. .TP
  181. rrp_mode
  182. This specifies the mode of redundant ring, which may be none, active, or
  183. passive. Active replication offers slightly lower latency from transmit
  184. to delivery in faulty network environments but with less performance.
  185. Passive replication may nearly double the speed of the totem protocol
  186. if the protocol doesn't become cpu bound. The final option is none, in
  187. which case only one network interface will be used to operate the totem
  188. protocol.
  189. If only one interface directive is specified, none is automatically chosen.
  190. If multiple interface directives are specified, only active or passive may
  191. be chosen.
  192. .TP
  193. netmtu
  194. This specifies the network maximum transmit unit. To set this value beyond
  195. 1500, the regular frame MTU, requires ethernet devices that support large, or
  196. also called jumbo, frames. If any device in the network doesn't support large
  197. frames, the protocol will not operate properly. The hosts must also have their
  198. mtu size set from 1500 to whatever frame size is specified here.
  199. Please note while some NICs or switches claim large frame support, they support
  200. 9000 MTU as the maximum frame size including the IP header. Setting the netmtu
  201. and host MTUs to 9000 will cause totem to use the full 9000 bytes of the frame.
  202. Then Linux will add a 18 byte header moving the full frame size to 9018. As a
  203. result some hardware will not operate properly with this size of data. A netmtu
  204. of 8982 seems to work for the few large frame devices that have been tested.
  205. Some manufacturers claim large frame support when in fact they support frame
  206. sizes of 4500 bytes.
  207. Increasing the MTU from 1500 to 8982 doubles throughput performance from 30MB/sec
  208. to 60MB/sec as measured with evsbench with 175000 byte messages with the secauth
  209. directive set to off.
  210. When sending multicast traffic, if the network frequently reconfigures, chances are
  211. that some device in the network doesn't support large frames.
  212. Choose hardware carefully if intending to use large frame support.
  213. The default is 1500.
  214. .TP
  215. vsftype
  216. This directive controls the virtual synchrony filter type used to identify
  217. a primary component. The preferred choice is YKD dynamic linear voting,
  218. however, for clusters larger then 32 nodes YKD consumes alot of memory. For
  219. large scale clusters that are created by changing the MAX_PROCESSORS_COUNT
  220. #define in the C code totem.h file, the virtual synchrony filter "none" is
  221. recommended but then AMF and DLCK services (which are currently experimental)
  222. are not safe for use.
  223. The default is ykd. The vsftype can also be set to none.
  224. .TP
  225. transport
  226. This directive controls the transport mechanism used. If the interface to
  227. which corosync is binding is an RDMA interface such as RoCEE or Infiniband, the
  228. "iba" parameter may be specified. To avoid the use of multicast entirely, a
  229. unicast transport parameter "udpu" can be specified. This requires specifying
  230. the list of members that could potentially make up the membership before
  231. deployment.
  232. The default is udp. The transport type can also be set to udpu or iba.
  233. Within the
  234. .B totem
  235. directive, there are several configuration options which are used to control
  236. the operation of the protocol. It is generally not recommended to change any
  237. of these values without proper guidance and sufficient testing. Some networks
  238. may require larger values if suffering from frequent reconfigurations. Some
  239. applications may require faster failure detection times which can be achieved
  240. by reducing the token timeout.
  241. .TP
  242. token
  243. This timeout specifies in milliseconds until a token loss is declared after not
  244. receiving a token. This is the time spent detecting a failure of a processor
  245. in the current configuration. Reforming a new configuration takes about 50
  246. milliseconds in addition to this timeout.
  247. The default is 1000 milliseconds.
  248. .TP
  249. token_retransmit
  250. This timeout specifies in milliseconds after how long before receiving a token
  251. the token is retransmitted. This will be automatically calculated if token
  252. is modified. It is not recommended to alter this value without guidance from
  253. the corosync community.
  254. The default is 238 milliseconds.
  255. .TP
  256. hold
  257. This timeout specifies in milliseconds how long the token should be held by
  258. the representative when the protocol is under low utilization. It is not
  259. recommended to alter this value without guidance from the corosync community.
  260. The default is 180 milliseconds.
  261. .TP
  262. token_retransmits_before_loss_const
  263. This value identifies how many token retransmits should be attempted before
  264. forming a new configuration. If this value is set, retransmit and hold will
  265. be automatically calculated from retransmits_before_loss and token.
  266. The default is 4 retransmissions.
  267. .TP
  268. join
  269. This timeout specifies in milliseconds how long to wait for join messages in
  270. the membership protocol.
  271. The default is 50 milliseconds.
  272. .TP
  273. send_join
  274. This timeout specifies in milliseconds an upper range between 0 and send_join
  275. to wait before sending a join message. For configurations with less then
  276. 32 nodes, this parameter is not necessary. For larger rings, this parameter
  277. is necessary to ensure the NIC is not overflowed with join messages on
  278. formation of a new ring. A reasonable value for large rings (128 nodes) would
  279. be 80msec. Other timer values must also change if this value is changed. Seek
  280. advice from the corosync mailing list if trying to run larger configurations.
  281. The default is 0 milliseconds.
  282. .TP
  283. consensus
  284. This timeout specifies in milliseconds how long to wait for consensus to be
  285. achieved before starting a new round of membership configuration. The minimum
  286. value for consensus must be 1.2 * token. This value will be automatically
  287. calculated at 1.2 * token if the user doesn't specify a consensus value.
  288. For two node clusters, a consensus larger then the join timeout but less then
  289. token is safe. For three node or larger clusters, consensus should be larger
  290. then token. There is an increasing risk of odd membership changes, which stil
  291. guarantee virtual synchrony, as node count grows if consensus is less than
  292. token.
  293. The default is 1200 milliseconds.
  294. .TP
  295. merge
  296. This timeout specifies in milliseconds how long to wait before checking for
  297. a partition when no multicast traffic is being sent. If multicast traffic
  298. is being sent, the merge detection happens automatically as a function of
  299. the protocol.
  300. The default is 200 milliseconds.
  301. .TP
  302. downcheck
  303. This timeout specifies in milliseconds how long to wait before checking
  304. that a network interface is back up after it has been downed.
  305. The default is 1000 millseconds.
  306. .TP
  307. fail_recv_const
  308. This constant specifies how many rotations of the token without receiving any
  309. of the messages when messages should be received may occur before a new
  310. configuration is formed.
  311. The default is 2500 failures to receive a message.
  312. .TP
  313. seqno_unchanged_const
  314. This constant specifies how many rotations of the token without any multicast
  315. traffic should occur before the merge detection timeout is started.
  316. The default is 30 rotations.
  317. .TP
  318. heartbeat_failures_allowed
  319. [HeartBeating mechanism]
  320. Configures the optional HeartBeating mechanism for faster failure detection. Keep in
  321. mind that engaging this mechanism in lossy networks could cause faulty loss declaration
  322. as the mechanism relies on the network for heartbeating.
  323. So as a rule of thumb use this mechanism if you require improved failure in low to
  324. medium utilized networks.
  325. This constant specifies the number of heartbeat failures the system should tolerate
  326. before declaring heartbeat failure e.g 3. Also if this value is not set or is 0 then the
  327. heartbeat mechanism is not engaged in the system and token rotation is the method
  328. of failure detection
  329. The default is 0 (disabled).
  330. .TP
  331. max_network_delay
  332. [HeartBeating mechanism]
  333. This constant specifies in milliseconds the approximate delay that your network takes
  334. to transport one packet from one machine to another. This value is to be set by system
  335. engineers and please dont change if not sure as this effects the failure detection
  336. mechanism using heartbeat.
  337. The default is 50 milliseconds.
  338. .TP
  339. window_size
  340. This constant specifies the maximum number of messages that may be sent on one
  341. token rotation. If all processors perform equally well, this value could be
  342. large (300), which would introduce higher latency from origination to delivery
  343. for very large rings. To reduce latency in large rings(16+), the defaults are
  344. a safe compromise. If 1 or more slow processor(s) are present among fast
  345. processors, window_size should be no larger then 256000 / netmtu to avoid
  346. overflow of the kernel receive buffers. The user is notified of this by
  347. the display of a retransmit list in the notification logs. There is no loss
  348. of data, but performance is reduced when these errors occur.
  349. The default is 50 messages.
  350. .TP
  351. max_messages
  352. This constant specifies the maximum number of messages that may be sent by one
  353. processor on receipt of the token. The max_messages parameter is limited to
  354. 256000 / netmtu to prevent overflow of the kernel transmit buffers.
  355. The default is 17 messages.
  356. .TP
  357. miss_count_const
  358. This constant defines the maximum number of times on receipt of a token
  359. a message is checked for retransmission before a retransmission occurs. This
  360. parameter is useful to modify for switches that delay multicast packets
  361. compared to unicast packets. The default setting works well for nearly all
  362. modern switches.
  363. The default is 5 messages.
  364. .TP
  365. rrp_problem_count_timeout
  366. This specifies the time in milliseconds to wait before decrementing the
  367. problem count by 1 for a particular ring to ensure a link is not marked
  368. faulty for transient network failures.
  369. The default is 2000 milliseconds.
  370. .TP
  371. rrp_problem_count_threshold
  372. This specifies the number of times a problem is detected with a link before
  373. setting the link faulty. Once a link is set faulty, no more data is
  374. transmitted upon it. Also, the problem counter is no longer decremented when
  375. the problem count timeout expires.
  376. A problem is detected whenever all tokens from the proceeding processor have
  377. not been received within the rrp_token_expired_timeout. The
  378. rrp_problem_count_threshold * rrp_token_expired_timeout should be atleast 50
  379. milliseconds less then the token timeout, or a complete reconfiguration
  380. may occur.
  381. The default is 10 problem counts.
  382. .TP
  383. rrp_problem_count_mcast_threshold
  384. This specifies the number of times a problem is detected with multicast before
  385. setting the link faulty for passive rrp mode. This variable is unused in active
  386. rrp mode.
  387. The default is 10 times rrp_problem_count_threshold.
  388. .TP
  389. rrp_token_expired_timeout
  390. This specifies the time in milliseconds to increment the problem counter for
  391. the redundant ring protocol after not having received a token from all rings
  392. for a particular processor.
  393. This value will automatically be calculated from the token timeout and
  394. problem_count_threshold but may be overridden. It is not recommended to
  395. override this value without guidance from the corosync community.
  396. The default is 47 milliseconds.
  397. .TP
  398. rrp_autorecovery_check_timeout
  399. This specifies the time in milliseconds to check if the failed ring can be
  400. auto-recovered.
  401. The default is 1000 milliseconds.
  402. .PP
  403. Within the
  404. .B logging
  405. directive, there are several configuration options which are all optional.
  406. .PP
  407. The following 3 options are valid only for the top level logging directive:
  408. .TP
  409. timestamp
  410. This specifies that a timestamp is placed on all log messages.
  411. The default is off.
  412. .TP
  413. fileline
  414. This specifies that file and line should be printed.
  415. The default is off.
  416. .TP
  417. function_name
  418. This specifies that the code function name should be printed.
  419. The default is off.
  420. .PP
  421. The following options are valid both for top level logging directive
  422. and they can be overriden in logger_subsys entries.
  423. .TP
  424. to_stderr
  425. .TP
  426. to_logfile
  427. .TP
  428. to_syslog
  429. These specify the destination of logging output. Any combination of
  430. these options may be specified. Valid options are
  431. .B yes
  432. and
  433. .B no.
  434. The default is syslog and stderr.
  435. Please note, if you are using to_logfile and want to rotate the file, use logrotate(8)
  436. with the option
  437. .B
  438. copytruncate.
  439. eg.
  440. .IP
  441. .RS
  442. .ne 18
  443. .nf
  444. .ta 4n 30n 33n
  445. /var/log/corosync.log {
  446. missingok
  447. compress
  448. notifempty
  449. daily
  450. rotate 7
  451. copytruncate
  452. }
  453. .ta
  454. .fi
  455. .RE
  456. .IP
  457. .PP
  458. .TP
  459. logfile
  460. If the
  461. .B to_logfile
  462. directive is set to
  463. .B yes
  464. , this option specifies the pathname of the log file.
  465. No default.
  466. .TP
  467. logfile_priority
  468. This specifies the logfile priority for this particular subsystem. Ignored if debug is on.
  469. Possible values are: alert, crit, debug (same as debug = on), emerg, err, info, notice, warning.
  470. The default is: info.
  471. .TP
  472. syslog_facility
  473. This specifies the syslog facility type that will be used for any messages
  474. sent to syslog. options are daemon, local0, local1, local2, local3, local4,
  475. local5, local6 & local7.
  476. The default is daemon.
  477. .TP
  478. syslog_priority
  479. This specifies the syslog level for this particular subsystem. Ignored if debug is on.
  480. Possible values are: alert, crit, debug (same as debug = on), emerg, err, info, notice, warning.
  481. The default is: info.
  482. .TP
  483. debug
  484. This specifies whether debug output is logged for this particular logger.
  485. The default is off.
  486. .PP
  487. Within the
  488. .B logging
  489. directive, logger_subsys directives are optional.
  490. .PP
  491. Within the
  492. .B logger_subsys
  493. sub-directive, all of the above logging configuration options are valid and
  494. can be used to override the default settings.
  495. The subsys entry, described below, is mandatory to identify the subsystem.
  496. .TP
  497. subsys
  498. This specifies the subsystem identity (name) for which logging is specified. This is the
  499. name used by a service in the log_init () call. E.g. 'CPG'. This directive is
  500. required.
  501. .PP
  502. Within the
  503. .B quorum
  504. directive it is possible to specify the quorum algorithm to use with the
  505. .TP
  506. provider
  507. directive. At the time of writing only corosync_votequorum is supported. Please refer
  508. to quorum modules man pages (8) for specific config options.
  509. .SH "FILES"
  510. .TP
  511. /etc/corosync/corosync.conf
  512. The corosync executive configuration file.
  513. .SH "SEE ALSO"
  514. .BR corosync_overview (8),
  515. .BR logrotate (8)
  516. .PP