corosync.conf.5 22 KB

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