corosync.conf.5 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644
  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-10-10 "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. .TP
  58. qb { }
  59. This top level directive contains configuration options related to libqb.
  60. .PP
  61. The
  62. .B interface sub-directive of totem is optional for UDP and knet transports.
  63. For knet, multiple interface subsections define parameters for each knet link on the
  64. system.
  65. For UDP, there should be just one interface section that defines the multicast or
  66. broadcast options for the link.
  67. For UDPU an interface section is not needed and it is recommended that the nodelist
  68. is used to define cluster nodes.
  69. .TP
  70. linknumber
  71. This specifies the link number for the interface. When using the knet
  72. protocol, each interface should specify separate link numbers to uniquely
  73. identify to the membership protocol which interface to use for which link.
  74. The linknumber must start at 0. For UDP the only supported linknumber is 0.
  75. .TP
  76. knet_link_priority
  77. This specifies the priority for the link when knet is used in 'passive'
  78. mode. (see link_mode below)
  79. .TP
  80. knet_ping_interval
  81. This specifies the interval between knet link pings.
  82. (default 1000 ms)
  83. .TP
  84. knet_ping_timeout
  85. If no ping is received within this time, the knet link is declared dead.
  86. (default 2000 ms)
  87. .TP
  88. knet_ping_precision
  89. How many values of latency are used to calculate
  90. the average link latency. (default 2048 samples)
  91. .TP
  92. bindnetaddr (udp only)
  93. This specifies the network address the corosync executive should bind
  94. to when using udp.
  95. bindnetaddr (udp only)
  96. should be an IP address configured on the system, or a network
  97. address.
  98. For example, if the local interface is 192.168.5.92 with netmask
  99. 255.255.255.0, you should set bindnetaddr to 192.168.5.92 or 192.168.5.0.
  100. If the local interface is 192.168.5.92 with netmask 255.255.255.192,
  101. set bindnetaddr to 192.168.5.92 or 192.168.5.64, and so forth.
  102. This may also be an IPV6 address, in which case IPV6 networking will be used.
  103. In this case, the exact address must be specified and there is no automatic
  104. selection of the network interface within a specific subnet as with IPv4.
  105. If IPv6 networking is used, the nodeid field in nodelist must be specified.
  106. .TP
  107. broadcast (udp only)
  108. This is optional and can be set to yes. If it is set to yes, the broadcast
  109. address will be used for communication. If this option is set, mcastaddr
  110. should not be set.
  111. .TP
  112. mcastaddr (udp only)
  113. This is the multicast address used by corosync executive. The default
  114. should work for most networks, but the network administrator should be queried
  115. about a multicast address to use. Avoid 224.x.x.x because this is a "config"
  116. multicast address.
  117. This may also be an IPV6 multicast address, in which case IPV6 networking
  118. will be used. If IPv6 networking is used, the nodeid field in nodelist must
  119. be specified.
  120. It's not necessary to use this option if cluster_name option is used. If both options
  121. are used, mcastaddr has higher priority.
  122. .TP
  123. mcastport (udp only)
  124. This specifies the UDP port number. It is possible to use the same multicast
  125. address on a network with the corosync services configured for different
  126. UDP ports.
  127. Please note corosync uses two UDP ports mcastport (for mcast receives) and
  128. mcastport - 1 (for mcast sends).
  129. If you have multiple clusters on the same network using the same mcastaddr
  130. please configure the mcastports with a gap.
  131. .TP
  132. ttl (udp only)
  133. This specifies the Time To Live (TTL). If you run your cluster on a routed
  134. network then the default of "1" will be too small. This option provides
  135. a way to increase this up to 255. The valid range is 0..255.
  136. .PP
  137. .PP
  138. Within the
  139. .B totem
  140. directive, there are seven configuration options of which one is required,
  141. five are optional, and one is required when IPV6 is configured in the interface
  142. subdirective. The required directive controls the version of the totem
  143. configuration. The optional option unless using IPV6 directive controls
  144. identification of the processor. The optional options control secrecy and
  145. authentication, the network mode of operation and maximum network MTU
  146. field.
  147. .TP
  148. version
  149. This specifies the version of the configuration file. Currently the only
  150. valid version for this directive is 2.
  151. .PP
  152. clear_node_high_bit
  153. This configuration option is optional and is only relevant when no nodeid is
  154. specified. Some corosync clients require a signed 32 bit nodeid that is greater
  155. than zero however by default corosync uses all 32 bits of the IPv4 address space
  156. when generating a nodeid. Set this option to yes to force the high bit to be
  157. zero and therefor ensure the nodeid is a positive signed 32 bit integer.
  158. WARNING: The clusters behavior is undefined if this option is enabled on only
  159. a subset of the cluster (for example during a rolling upgrade).
  160. .TP
  161. crypto_hash
  162. This specifies which HMAC authentication should be used to authenticate all
  163. messages. Valid values are none (no authentication), md5, sha1, sha256,
  164. sha384 and sha512. Encrypted transmission is only supported for
  165. the knet transport.
  166. The default is sha1.
  167. .TP
  168. crypto_cipher
  169. This specifies which cipher should be used to encrypt all messages.
  170. Valid values are none (no encryption), aes256, aes192, aes128 and 3des.
  171. Enabling crypto_cipher, requires also enabling of crypto_hash. Encrypted
  172. transmission is only supported for the knet transport.
  173. The default is aes256.
  174. .TP
  175. link_mode
  176. This specifies the Kronosnet mode, which may be passive, active, or
  177. rr (round-robin).
  178. .B passive:
  179. the active link with the lowest priority will be used. If one or more
  180. links share the same priority the one with the lowest link ID will
  181. be used.
  182. .B active:
  183. All active links will be used simultaneously to send traffic.
  184. link priority is ignored.
  185. .B rr:
  186. Round-Robin policy. Each packet will be sent to the next active link in
  187. order.
  188. If only one interface directive is specified, passive is automatically chosen.
  189. The maximum number of interface directives that is allowed with Kronosnet
  190. is 8. For other transports it is 1.
  191. When using multiple interfaces, make sure to use different multicast
  192. address/port (port for same address must differ by at least two) pair
  193. for each interface (this is checked by parser).
  194. .TP
  195. netmtu
  196. This specifies the network maximum transmit unit. To set this value beyond
  197. 1500, the regular frame MTU, requires ethernet devices that support large, or
  198. also called jumbo, frames. If any device in the network doesn't support large
  199. frames, the protocol will not operate properly. The hosts must also have their
  200. mtu size set from 1500 to whatever frame size is specified here.
  201. Please note while some NICs or switches claim large frame support, they support
  202. 9000 MTU as the maximum frame size including the IP header. Setting the netmtu
  203. and host MTUs to 9000 will cause totem to use the full 9000 bytes of the frame.
  204. Then Linux will add a 18 byte header moving the full frame size to 9018. As a
  205. result some hardware will not operate properly with this size of data. A netmtu
  206. of 8982 seems to work for the few large frame devices that have been tested.
  207. Some manufacturers claim large frame support when in fact they support frame
  208. sizes of 4500 bytes.
  209. When sending multicast traffic, if the network frequently reconfigures, chances are
  210. that some device in the network doesn't support large frames.
  211. Choose hardware carefully if intending to use large frame support.
  212. The default is 1500.
  213. .TP
  214. transport
  215. This directive controls the transport mechanism used.
  216. The default is knet. The transport type can also be set to udpu or udp.
  217. Only knet allows crypto or multiple interfaces per node.
  218. .TP
  219. cluster_name
  220. This specifies the name of cluster and it's used for automatic generating
  221. of multicast address.
  222. .TP
  223. config_version
  224. This specifies version of config file. This is converted to unsigned 64-bit int.
  225. By default it's 0. Option is used to prevent joining old nodes with not
  226. up-to-date configuration. If value is not 0, and node is going for first time
  227. (only for first time, join after split doesn't follow this rules)
  228. from single-node membership to multiple nodes membership, other nodes
  229. config_versions are collected. If current node config_version is not
  230. equal to highest of collected versions, corosync is terminated.
  231. .TP
  232. ip_version
  233. Specifies version of IP to use for communication. Value can be one of
  234. ipv4 or ipv6. Default (if unspecified) is ipv4.
  235. Within the
  236. .B totem
  237. directive, there are several configuration options which are used to control
  238. the operation of the protocol. It is generally not recommended to change any
  239. of these values without proper guidance and sufficient testing. Some networks
  240. may require larger values if suffering from frequent reconfigurations. Some
  241. applications may require faster failure detection times which can be achieved
  242. by reducing the token timeout.
  243. .TP
  244. token
  245. This timeout is used directly or as a base for real token timeout calculation (explained in
  246. .B token_coefficient
  247. section). Token timeout specifies in milliseconds until a token loss is declared after not
  248. receiving a token. This is the time spent detecting a failure of a processor
  249. in the current configuration. Reforming a new configuration takes about 50
  250. milliseconds in addition to this timeout.
  251. For real token timeout used by totem it's possible to read cmap value of
  252. .B runtime.config.token
  253. key.
  254. The default is 1000 milliseconds.
  255. .TP
  256. token_coefficient
  257. This value is used only when
  258. .B nodelist
  259. section is specified and contains at least 3 nodes. If so, real token timeout
  260. is then computed as token + (number_of_nodes - 2) * token_coefficient.
  261. This allows cluster to scale without manually changing token timeout
  262. every time new node is added. This value can be set to 0 resulting
  263. in effective removal of this feature.
  264. The default is 650 milliseconds.
  265. .TP
  266. token_retransmit
  267. This timeout specifies in milliseconds after how long before receiving a token
  268. the token is retransmitted. This will be automatically calculated if token
  269. is modified. It is not recommended to alter this value without guidance from
  270. the corosync community.
  271. The default is 238 milliseconds.
  272. .TP
  273. hold
  274. This timeout specifies in milliseconds how long the token should be held by
  275. the representative when the protocol is under low utilization. It is not
  276. recommended to alter this value without guidance from the corosync community.
  277. The default is 180 milliseconds.
  278. .TP
  279. token_retransmits_before_loss_const
  280. This value identifies how many token retransmits should be attempted before
  281. forming a new configuration. If this value is set, retransmit and hold will
  282. be automatically calculated from retransmits_before_loss and token.
  283. The default is 4 retransmissions.
  284. .TP
  285. join
  286. This timeout specifies in milliseconds how long to wait for join messages in
  287. the membership protocol.
  288. The default is 50 milliseconds.
  289. .TP
  290. send_join
  291. This timeout specifies in milliseconds an upper range between 0 and send_join
  292. to wait before sending a join message. For configurations with less then
  293. 32 nodes, this parameter is not necessary. For larger rings, this parameter
  294. is necessary to ensure the NIC is not overflowed with join messages on
  295. formation of a new ring. A reasonable value for large rings (128 nodes) would
  296. be 80msec. Other timer values must also change if this value is changed. Seek
  297. advice from the corosync mailing list if trying to run larger configurations.
  298. The default is 0 milliseconds.
  299. .TP
  300. consensus
  301. This timeout specifies in milliseconds how long to wait for consensus to be
  302. achieved before starting a new round of membership configuration. The minimum
  303. value for consensus must be 1.2 * token. This value will be automatically
  304. calculated at 1.2 * token if the user doesn't specify a consensus value.
  305. For two node clusters, a consensus larger then the join timeout but less then
  306. token is safe. For three node or larger clusters, consensus should be larger
  307. then token. There is an increasing risk of odd membership changes, which stil
  308. guarantee virtual synchrony, as node count grows if consensus is less than
  309. token.
  310. The default is 1200 milliseconds.
  311. .TP
  312. merge
  313. This timeout specifies in milliseconds how long to wait before checking for
  314. a partition when no multicast traffic is being sent. If multicast traffic
  315. is being sent, the merge detection happens automatically as a function of
  316. the protocol.
  317. The default is 200 milliseconds.
  318. .TP
  319. downcheck
  320. This timeout specifies in milliseconds how long to wait before checking
  321. that a network interface is back up after it has been downed.
  322. The default is 1000 millseconds.
  323. .TP
  324. fail_recv_const
  325. This constant specifies how many rotations of the token without receiving any
  326. of the messages when messages should be received may occur before a new
  327. configuration is formed.
  328. The default is 2500 failures to receive a message.
  329. .TP
  330. seqno_unchanged_const
  331. This constant specifies how many rotations of the token without any multicast
  332. traffic should occur before the hold timer is started.
  333. The default is 30 rotations.
  334. .TP
  335. heartbeat_failures_allowed
  336. [HeartBeating mechanism]
  337. Configures the optional HeartBeating mechanism for faster failure detection. Keep in
  338. mind that engaging this mechanism in lossy networks could cause faulty loss declaration
  339. as the mechanism relies on the network for heartbeating.
  340. So as a rule of thumb use this mechanism if you require improved failure in low to
  341. medium utilized networks.
  342. This constant specifies the number of heartbeat failures the system should tolerate
  343. before declaring heartbeat failure e.g 3. Also if this value is not set or is 0 then the
  344. heartbeat mechanism is not engaged in the system and token rotation is the method
  345. of failure detection
  346. The default is 0 (disabled).
  347. .TP
  348. max_network_delay
  349. [HeartBeating mechanism]
  350. This constant specifies in milliseconds the approximate delay that your network takes
  351. to transport one packet from one machine to another. This value is to be set by system
  352. engineers and please don't change if not sure as this effects the failure detection
  353. mechanism using heartbeat.
  354. The default is 50 milliseconds.
  355. .TP
  356. window_size
  357. This constant specifies the maximum number of messages that may be sent on one
  358. token rotation. If all processors perform equally well, this value could be
  359. large (300), which would introduce higher latency from origination to delivery
  360. for very large rings. To reduce latency in large rings(16+), the defaults are
  361. a safe compromise. If 1 or more slow processor(s) are present among fast
  362. processors, window_size should be no larger then 256000 / netmtu to avoid
  363. overflow of the kernel receive buffers. The user is notified of this by
  364. the display of a retransmit list in the notification logs. There is no loss
  365. of data, but performance is reduced when these errors occur.
  366. The default is 50 messages.
  367. .TP
  368. max_messages
  369. This constant specifies the maximum number of messages that may be sent by one
  370. processor on receipt of the token. The max_messages parameter is limited to
  371. 256000 / netmtu to prevent overflow of the kernel transmit buffers.
  372. The default is 17 messages.
  373. .TP
  374. miss_count_const
  375. This constant defines the maximum number of times on receipt of a token
  376. a message is checked for retransmission before a retransmission occurs. This
  377. parameter is useful to modify for switches that delay multicast packets
  378. compared to unicast packets. The default setting works well for nearly all
  379. modern switches.
  380. The default is 5 messages.
  381. .PP
  382. Within the
  383. .B logging
  384. directive, there are several configuration options which are all optional.
  385. .PP
  386. The following 3 options are valid only for the top level logging directive:
  387. .TP
  388. timestamp
  389. This specifies that a timestamp is placed on all log messages.
  390. The default is off.
  391. .TP
  392. fileline
  393. This specifies that file and line should be printed.
  394. The default is off.
  395. .TP
  396. function_name
  397. This specifies that the code function name should be printed.
  398. The default is off.
  399. .PP
  400. The following options are valid both for top level logging directive
  401. and they can be overridden in logger_subsys entries.
  402. .TP
  403. to_stderr
  404. .TP
  405. to_logfile
  406. .TP
  407. to_syslog
  408. These specify the destination of logging output. Any combination of
  409. these options may be specified. Valid options are
  410. .B yes
  411. and
  412. .B no.
  413. The default is syslog and stderr.
  414. Please note, if you are using to_logfile and want to rotate the file, use logrotate(8)
  415. with the option
  416. .B
  417. copytruncate.
  418. eg.
  419. .ne 18
  420. .RS
  421. .nf
  422. .ft CW
  423. /var/log/corosync.log {
  424. missingok
  425. compress
  426. notifempty
  427. daily
  428. rotate 7
  429. copytruncate
  430. }
  431. .ft
  432. .fi
  433. .RE
  434. .TP
  435. logfile
  436. If the
  437. .B to_logfile
  438. directive is set to
  439. .B yes
  440. , this option specifies the pathname of the log file.
  441. No default.
  442. .TP
  443. logfile_priority
  444. This specifies the logfile priority for this particular subsystem. Ignored if debug is on.
  445. Possible values are: alert, crit, debug (same as debug = on), emerg, err, info, notice, warning.
  446. The default is: info.
  447. .TP
  448. syslog_facility
  449. This specifies the syslog facility type that will be used for any messages
  450. sent to syslog. options are daemon, local0, local1, local2, local3, local4,
  451. local5, local6 & local7.
  452. The default is daemon.
  453. .TP
  454. syslog_priority
  455. This specifies the syslog level for this particular subsystem. Ignored if debug is on.
  456. Possible values are: alert, crit, debug (same as debug = on), emerg, err, info, notice, warning.
  457. The default is: info.
  458. .TP
  459. debug
  460. This specifies whether debug output is logged for this particular logger. Also can contain
  461. value trace, what is highest level of debug information.
  462. The default is off.
  463. .PP
  464. Within the
  465. .B logging
  466. directive, logger_subsys directives are optional.
  467. .PP
  468. Within the
  469. .B logger_subsys
  470. sub-directive, all of the above logging configuration options are valid and
  471. can be used to override the default settings.
  472. The subsys entry, described below, is mandatory to identify the subsystem.
  473. .TP
  474. subsys
  475. This specifies the subsystem identity (name) for which logging is specified. This is the
  476. name used by a service in the log_init () call. E.g. 'CPG'. This directive is
  477. required.
  478. .PP
  479. Within the
  480. .B quorum
  481. directive it is possible to specify the quorum algorithm to use with the
  482. .TP
  483. provider
  484. directive. At the time of writing only corosync_votequorum is supported.
  485. See votequorum(5) for configuration options.
  486. .PP
  487. Within the
  488. .B nodelist
  489. directive it is possible to specify specific information about nodes in cluster. Directive
  490. can contain only
  491. .B node
  492. sub-directive, which specifies every node that should be a member of the membership, and where
  493. non-default options are needed. Every node must have at least ring0_addr field filled.
  494. Every node that should be a member of the membership must be specified.
  495. Possible options are:
  496. .TP
  497. ringX_addr
  498. This specifies ip address of one of the nodes. X is link number.
  499. .TP
  500. nodeid
  501. This configuration option is required for each node. It is a 32 bit value
  502. specifying the node identifier delivered to the
  503. cluster membership service. The node identifier value of zero is
  504. reserved and should not be used.
  505. .PP
  506. Within the
  507. .B qb
  508. directive it is possible to specify options for libqb.
  509. Possible option is:
  510. .TP
  511. ipc_type
  512. This specifies type of IPC to use. Can be one of native (default), shm and socket.
  513. Native means one of shm or socket, depending on what is supported by OS. On systems
  514. with support for both, SHM is selected. SHM is generally faster, but need to allocate
  515. ring buffer file in /dev/shm.
  516. .SH "FILES"
  517. .TP
  518. /etc/corosync/corosync.conf
  519. The corosync executive configuration file.
  520. .SH "SEE ALSO"
  521. .BR corosync_overview (8),
  522. .BR votequorum (5),
  523. .BR corosync-qdevice (8),
  524. .BR logrotate (8)
  525. .PP