4
0

corosync.conf.5 22 KB

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