corosync.conf.5 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103
  1. .\"/*
  2. .\" * Copyright (c) 2005 MontaVista Software, Inc.
  3. .\" * Copyright (c) 2006-2025 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 2025-06-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. .TP
  58. system { }
  59. This top level directive contains configuration options related to system.
  60. .TP
  61. resources { }
  62. This top level directive contains configuration options for resources.
  63. .TP
  64. nozzle { }
  65. This top level directive contains configuration options for a libnozzle device.
  66. .PP
  67. Corosync supports multiple types of network transports for communication between the nodes in the cluster. There are three types of transports:
  68. .RS
  69. .IP 1.
  70. KNET. This is a default and recommended transport introduced in Corosync 3. It provides several advantages over the UDP and UDPU transports,
  71. including better performance, link-level redundancy, automatic link recovery, and native IP compression and encryption.
  72. .IP 2.
  73. UDPU. This is for unicast communication. This transport is deprecated.
  74. .IP 3.
  75. UDP. This is for multicast communication. This transport is deprecated and highly discouraged to use.
  76. .RE
  77. The
  78. .B interface
  79. sub-directive of totem is optional for UDP and KNET transports.
  80. For KNET, multiple interface subsections define parameters for each KNET link on the
  81. system.
  82. For UDPU an interface section is not needed and it is recommended that the nodelist
  83. is used to define cluster nodes.
  84. .TP
  85. linknumber
  86. This specifies the link number for the interface. When using the KNET
  87. protocol, each interface should specify separate link numbers to uniquely
  88. identify to the membership protocol which interface to use for which link.
  89. The linknumber must start at 0. For UDP the only supported linknumber is 0.
  90. .TP
  91. knet_link_priority
  92. This specifies the priority for the link when KNET is used in 'passive'
  93. mode (see link_mode below). Link priority should be a value between 0 and 255
  94. inclusive. A value of 0 will be treated as if it were 1.
  95. .TP
  96. knet_ping_interval
  97. This specifies the interval between KNET link pings.
  98. knet_ping_interval and knet_ping_timeout
  99. are a pair, if one is specified the other should be too, otherwise one will be calculated from
  100. the token timeout and one will be taken from the config file.
  101. (default is token timeout / (knet_pong_count*2))
  102. .TP
  103. knet_ping_timeout
  104. If no ping is received within this time, the KNET link is declared dead.
  105. knet_ping_interval and knet_ping_timeout
  106. are a pair, if one is specified the other should be too, otherwise one will be calculated from
  107. the token timeout and one will be taken from the config file.
  108. (default is token timeout / knet_pong_count)
  109. .TP
  110. knet_ping_precision
  111. How many values of latency are used to calculate
  112. the average link latency. (default 2048 samples)
  113. .TP
  114. knet_pong_count
  115. How many valid ping/pongs before a link is marked UP. (default 2)
  116. .TP
  117. knet_transport
  118. Which IP transport KNET should use. valid values are "udp" (or "sctp" if
  119. supported by the installed version of kronosnet). (default: udp)
  120. NOTE: even if currently included, sctp is deprecated and will be removed
  121. in kronoset v2.0
  122. .TP
  123. bindnetaddr (UDP only)
  124. This specifies the network address the corosync executive should bind
  125. to when using UDP transport.
  126. bindnetaddr (UDP only)
  127. should be an IP address configured on the system, or a network
  128. address.
  129. For example, if the local interface is 192.168.5.92 with netmask
  130. 255.255.255.0, you should set bindnetaddr to 192.168.5.92 or 192.168.5.0.
  131. If the local interface is 192.168.5.92 with netmask 255.255.255.192,
  132. set bindnetaddr to 192.168.5.92 or 192.168.5.64, and so forth.
  133. This may also be an IPV6 address, in which case IPV6 networking will be used.
  134. In this case, the exact address must be specified and there is no automatic
  135. selection of the network interface within a specific subnet as with IPv4.
  136. If IPv6 networking is used, the nodeid field in nodelist must be specified.
  137. .TP
  138. broadcast (UDP only)
  139. This is optional and can be set to yes. If it is set to yes, the broadcast
  140. address will be used for communication. If this option is set, mcastaddr
  141. should not be set.
  142. .TP
  143. mcastaddr (UDP only)
  144. This is the multicast address used by corosync executive. The default
  145. should work for most networks, but the network administrator should be queried
  146. about a multicast address to use. Avoid 224.x.x.x because this is a "config"
  147. multicast address.
  148. This may also be an IPV6 multicast address, in which case IPV6 networking
  149. will be used. If IPv6 networking is used, the nodeid field in nodelist must
  150. be specified.
  151. It's not necessary to use this option if cluster_name option is used. If both options
  152. are used, mcastaddr has higher priority.
  153. .TP
  154. mcastport
  155. This specifies the UDP port number. Exact meaning depends on used transport.
  156. For the KNET transport, it is used as both the binding and sending port. For
  157. additional links, the default value is computed as (mcastport + linknumber).
  158. For the UDPU transport, mcastport specifies the bind port. Corosync also
  159. allocates and binds a random sending port for each remote node.
  160. For the UDP transport, it is used as a bind port for mcastaddr.
  161. It is possible to use the same multicast
  162. address on a network with the corosync services configured for different
  163. UDP ports.
  164. Please note corosync uses two UDP ports mcastport (for mcast receives) and
  165. mcastport - 1 (for mcast sends).
  166. If you have multiple clusters on the same network using the same mcastaddr
  167. please configure the mcastports with a gap.
  168. The default is 5405.
  169. .TP
  170. ttl (UDP only)
  171. This specifies the Time To Live (TTL). If you run your cluster on a routed
  172. network then the default of "1" will be too small. This option provides
  173. a way to increase this up to 255. The valid range is 0..255.
  174. .PP
  175. .PP
  176. Within the
  177. .B totem
  178. directive, there are seven configuration options of which one is required,
  179. five are optional, and one is required when IPV6 is configured in the interface
  180. subdirective. The required directive controls the version of the totem
  181. configuration. The optional option unless using IPV6 directive controls
  182. identification of the processor. The optional options control secrecy and
  183. authentication, the network mode of operation and maximum network MTU
  184. field.
  185. .TP
  186. version
  187. This specifies the version of the configuration file. Currently the only
  188. valid version for this directive is 2.
  189. .TP
  190. clear_node_high_bit
  191. This configuration option is optional and is only relevant when no nodeid is
  192. specified. Some corosync clients require a signed 32 bit nodeid that is greater
  193. than zero however by default corosync uses all 32 bits of the IPv4 address space
  194. when generating a nodeid. Set this option to yes to force the high bit to be
  195. zero and therefore ensure the nodeid is a positive signed 32 bit integer.
  196. WARNING: Cluster behavior is undefined if this option is enabled on only
  197. a subset of the cluster (for example during a rolling upgrade).
  198. .TP
  199. crypto_model
  200. This specifies which cryptographic library should be used by KNET.
  201. Supported values depend on the libknet build and on the installed
  202. cryptography libraries. Typically nss and openssl will be available
  203. but gcrypt and others could also be allowed.
  204. The default is nss.
  205. .TP
  206. crypto_hash
  207. This specifies which HMAC authentication should be used to authenticate all
  208. messages. Valid values are none (no authentication), md5, sha1, sha256,
  209. sha384 and sha512. Encrypted transmission is only supported for
  210. the KNET transport.
  211. The default is none.
  212. .TP
  213. crypto_cipher
  214. This specifies which cipher should be used to encrypt all messages.
  215. Valid values are none (no encryption), aes256, aes192 and aes128.
  216. Enabling crypto_cipher, requires also enabling of crypto_hash. Encrypted
  217. transmission is only supported for the KNET transport.
  218. The default is none.
  219. .TP
  220. secauth
  221. This implies crypto_cipher=aes256 and crypto_hash=sha256, unless those options
  222. are explicitly set. Encrypted transmission is only supported for the KNET
  223. transport.
  224. The default is off.
  225. .TP
  226. keyfile
  227. This specifies the fully qualified path to the shared key used to
  228. authenticate and encrypt data used within the Totem protocol.
  229. The default is /etc/corosync/authkey.
  230. .TP
  231. key
  232. Shared key stored in configuration instead of authkey file. This option
  233. has lower precedence than keyfile option so it's
  234. used only when keyfile is not specified.
  235. Using this option is not recommended for security reasons.
  236. .TP
  237. link_mode
  238. This specifies the Kronosnet mode, which may be passive, active, or
  239. rr (round-robin).
  240. .B passive:
  241. the active link with the highest priority (highest number) will be used. If one or more
  242. links share the same priority the one with the lowest link ID will
  243. be used.
  244. .B active:
  245. All active links will be used simultaneously to send traffic.
  246. link priority is ignored.
  247. .B rr:
  248. Round-Robin policy. Each packet will be sent to the next active link in
  249. order.
  250. If only one interface directive is specified, passive is automatically chosen.
  251. The maximum number of interface directives that is allowed with Kronosnet
  252. is 8. For other transports it is 1.
  253. .TP
  254. netmtu
  255. This specifies maximum packet length sent by corosync. It's mainly for the UDPU
  256. (and UDP) transport, where it specifies the network maximum transmit size, but
  257. can be used also with the KNET transport, where it defines the maximum length of packets
  258. passed to the KNET layer. To specify the network MTU manually for KNET, use the
  259. .B knet_mtu
  260. option.
  261. For UDPU (and UDP), setting this value beyond 1500, the regular frame MTU,
  262. requires ethernet devices that support large, or
  263. also called jumbo, frames. If any device in the network doesn't support large
  264. frames, the protocol will not operate properly. The hosts must also have their
  265. mtu size set from 1500 to whatever frame size is specified here.
  266. Please note while some NICs or switches claim large frame support, they support
  267. 9000 MTU as the maximum frame size including the IP header. Setting the netmtu
  268. and host MTUs to 9000 will cause totem to use the full 9000 bytes of the frame.
  269. Then Linux will add a 18 byte header moving the full frame size to 9018. As a
  270. result some hardware will not operate properly with this size of data. A netmtu
  271. of 8982 seems to work for the few large frame devices that have been tested.
  272. Some manufacturers claim large frame support when in fact they support frame
  273. sizes of 4500 bytes.
  274. When sending multicast traffic, if the network frequently reconfigures, chances are
  275. that some device in the network doesn't support large frames.
  276. Choose hardware carefully if intending to use large frame support.
  277. The default is 1500 for UDPU (and UDP) and 65536 for the KNET transport.
  278. .TP
  279. transport
  280. This directive controls the transport mechanism used.
  281. The default is knet (for KNET). The transport type can also be set to udpu (for UDPU) or
  282. udp (for UDP). Only KNET allows crypto or multiple interfaces per node.
  283. .TP
  284. cluster_name
  285. This specifies the name of cluster and it's used for automatic generating
  286. of multicast address.
  287. .TP
  288. config_version
  289. This specifies version of config file. This is converted to unsigned 64-bit int.
  290. By default it's 0. Option is used to prevent joining old nodes with not
  291. up-to-date configuration. If value is not 0, and node is going for first time
  292. (only for first time, join after split doesn't follow this rules)
  293. from single-node membership to multiple nodes membership, other nodes
  294. config_versions are collected. If current node config_version is not
  295. equal to highest of collected versions, corosync is terminated.
  296. .TP
  297. ip_version
  298. This specifies version of IP to ask DNS resolver for.
  299. The value can be one of
  300. .B ipv4
  301. (look only for an IPv4 address)
  302. ,
  303. .B ipv6
  304. (check only IPv6 address)
  305. ,
  306. .B ipv4-6
  307. (look for all address families and use first IPv4 address found in the list if there is such address,
  308. otherwise use first IPv6 address) and
  309. .B ipv6-4
  310. (look for all address families and use first IPv6 address found in the list if there is such address,
  311. otherwise use first IPv4 address).
  312. Default (if unspecified) is
  313. .B ipv6-4
  314. for KNET and UDPU transports and
  315. .B ipv4
  316. for UDP transport.
  317. The KNET transport supports IPv4 and IPv6 addresses concurrently,
  318. provided they are consistent on each link.
  319. .TP
  320. ip_dscp
  321. This specifies the dscp (differentiated services code point) value to be
  322. used in the IP header's type of service (TOS) field according to RFC 2474.
  323. Allowed values are 0-63 and symbolic dscp names cs0, cs1, cs2, cs3, cs4, cs5,
  324. cs6, cs7, af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42,
  325. af43 and ef.
  326. Value 0 disables the dscp support. Use of TOS field then depends on the
  327. used transport.
  328. If ip_dscp is set to a value not equal to zero, and an appropriate
  329. socket option (IP_TOS) is available, the value is put into the upper
  330. six bits of the TOS header field.
  331. .PP
  332. Within the
  333. .B totem
  334. directive, there are several configuration options which are used to control
  335. the operation of the protocol. It is generally not recommended to change any
  336. of these values without proper guidance and sufficient testing. Some networks
  337. may require larger values if suffering from frequent reconfigurations. Some
  338. applications may require faster failure detection times which can be achieved
  339. by reducing the token timeout.
  340. .TP
  341. token
  342. This timeout is used directly or as a base for real token timeout calculation (explained in
  343. .B token_coefficient
  344. section). Token timeout specifies in milliseconds until a token loss is declared after not
  345. receiving a token. This is the time spent detecting a failure of a processor
  346. in the current configuration. Reforming a new configuration takes about 50
  347. milliseconds in addition to this timeout.
  348. For real token timeout used by totem it's possible to read cmap value of
  349. .B runtime.config.totem.token
  350. key.
  351. Be careful to use the same timeout values on each of the nodes in the cluster
  352. or unpredictable results may occur.
  353. The default is 3000 milliseconds.
  354. .TP
  355. token_warning
  356. Specifies the interval between warnings that the token has not been received. The
  357. value is a percentage of the token timeout and can be set to 0 to disable
  358. warnings.
  359. The default is 75%.
  360. .TP
  361. token_coefficient
  362. This value is used only when
  363. .B nodelist
  364. section is specified and contains at least 3 nodes. If so, real token timeout
  365. is then computed as token + (number_of_nodes - 2) * token_coefficient.
  366. This allows cluster to scale without manually changing token timeout
  367. every time new node is added. This value can be set to 0 resulting
  368. in effective removal of this feature.
  369. The default is 650 milliseconds.
  370. .TP
  371. token_retransmit
  372. This timeout specifies in milliseconds after how long before receiving a token
  373. the token is retransmitted. This will be automatically calculated if token
  374. is modified. It is not recommended to alter this value without guidance from
  375. the corosync community.
  376. The minimum is 30 milliseconds. If not set and error occur, make sure
  377. token / (token_retransmits_before_loss_const + 0.2) is more than 30.
  378. The default is 238 milliseconds for two nodes cluster. Three or more nodes reference
  379. .B token_coefficient.
  380. .TP
  381. knet_compression_model
  382. Type of compression used by Kronosnet. Supported values depend on
  383. the libknet build and on the installed compression libraries. Typically zlib and lz4 will be available
  384. but bzip2 and others could also be allowed. The default is 'none'.
  385. .TP
  386. knet_compression_threshold
  387. Tells KNET to NOT compress any packets that are smaller than the value
  388. indicated. Default 100 bytes.
  389. Set to 0 to reset to the default.
  390. Set to 1 to compress everything.
  391. .TP
  392. knet_compression_level
  393. Many compression libraries allow tuning of compression parameters. For example
  394. 0 or 1 ... 9 are commonly used to determine the level of compression. This value
  395. is passed unmodified to the compression library so it is recommended to consult
  396. the library's documentation for more detailed information.
  397. .TP
  398. hold
  399. This timeout specifies in milliseconds how long the token should be held by
  400. the representative when the protocol is under low utilization. It is not
  401. recommended to alter this value without guidance from the corosync community.
  402. The default is 180 milliseconds.
  403. .TP
  404. token_retransmits_before_loss_const
  405. This value identifies how many token retransmits should be attempted before
  406. forming a new configuration. It is also used for token_retransmit
  407. and hold calculations.
  408. The default is 4 retransmissions.
  409. .TP
  410. join
  411. This timeout specifies in milliseconds how long to wait for join messages in
  412. the membership protocol.
  413. The default is 50 milliseconds.
  414. .TP
  415. send_join
  416. This timeout specifies in milliseconds an upper range between 0 and send_join
  417. to wait before sending a join message. For configurations with less than
  418. 32 nodes, this parameter is not necessary. For larger rings, this parameter
  419. is necessary to ensure the NIC is not overflowed with join messages on
  420. formation of a new ring. A reasonable value for large rings (128 nodes) would
  421. be 80msec. Other timer values must also change if this value is changed. Seek
  422. advice from the corosync mailing list if trying to run larger configurations.
  423. The default is 0 milliseconds.
  424. .TP
  425. consensus
  426. This timeout specifies in milliseconds how long to wait for consensus to be
  427. achieved before starting a new round of membership configuration. The minimum
  428. value for consensus must be 1.2 * token. This value will be automatically
  429. calculated at 1.2 * token if the user doesn't specify a consensus value.
  430. For two node clusters, a consensus larger than the join timeout but less than
  431. token is safe. For three node or larger clusters, consensus should be larger
  432. than token. There is an increasing risk of odd membership changes, which still
  433. guarantee virtual synchrony, as node count grows if consensus is less than
  434. token.
  435. The default is 3600 milliseconds.
  436. .TP
  437. merge
  438. This timeout specifies in milliseconds how long to wait before checking for
  439. a partition when no multicast traffic is being sent. If multicast traffic
  440. is being sent, the merge detection happens automatically as a function of
  441. the protocol.
  442. The default is 200 milliseconds.
  443. .TP
  444. downcheck
  445. This timeout specifies in milliseconds how long to wait before checking
  446. that a network interface is back up after it has been downed.
  447. The default is 1000 milliseconds.
  448. .TP
  449. fail_recv_const
  450. This constant specifies how many rotations of the token without receiving any
  451. of the messages when messages should be received may occur before a new
  452. configuration is formed.
  453. The default is 2500 failures to receive a message.
  454. .TP
  455. seqno_unchanged_const
  456. This constant specifies how many rotations of the token without any multicast
  457. traffic should occur before the hold timer is started.
  458. The default is 30 rotations.
  459. .TP
  460. heartbeat_failures_allowed
  461. [HeartBeating mechanism]
  462. Configures the optional HeartBeating mechanism for faster failure detection. Keep in
  463. mind that engaging this mechanism in lossy networks could cause faulty loss declaration
  464. as the mechanism relies on the network for heartbeating.
  465. So as a rule of thumb use this mechanism if you require improved failure in low to
  466. medium utilized networks.
  467. This constant specifies the number of heartbeat failures the system should tolerate
  468. before declaring heartbeat failure e.g 3. Also if this value is not set or is 0 then the
  469. heartbeat mechanism is not engaged in the system and token rotation is the method
  470. of failure detection
  471. The default is 0 (disabled).
  472. .TP
  473. max_network_delay
  474. [HeartBeating mechanism]
  475. This constant specifies in milliseconds the approximate delay that your network takes
  476. to transport one packet from one machine to another. This value is to be set by system
  477. engineers and please don't change if not sure as this effects the failure detection
  478. mechanism using heartbeat.
  479. The default is 50 milliseconds.
  480. .TP
  481. window_size
  482. This constant specifies the maximum number of messages that may be sent on one
  483. token rotation. If all processors perform equally well, this value could be
  484. large (300), which would introduce higher latency from origination to delivery
  485. for very large rings. To reduce latency in large rings(16+), the defaults are
  486. a safe compromise. If 1 or more slow processor(s) are present among fast
  487. processors, window_size should be no larger than 256000 / netmtu to avoid
  488. overflow of the kernel receive buffers. The user is notified of this by
  489. the display of a retransmit list in the notification logs. There is no loss
  490. of data, but performance is reduced when these errors occur.
  491. The default is 50 messages.
  492. .TP
  493. max_messages
  494. This constant specifies the maximum number of messages that may be sent by one
  495. processor on receipt of the token. The max_messages parameter is limited to
  496. 256000 / netmtu to prevent overflow of the kernel transmit buffers.
  497. The default is 17 messages.
  498. .TP
  499. miss_count_const
  500. This constant defines the maximum number of times on receipt of a token
  501. a message is checked for retransmission before a retransmission occurs. This
  502. parameter is useful to modify for switches that delay multicast packets
  503. compared to unicast packets. The default setting works well for nearly all
  504. modern switches.
  505. The default is 5 messages.
  506. .TP
  507. knet_pmtud_interval
  508. How often the KNET PMTUd runs to look for network MTU changes.
  509. Value in seconds, default: 30
  510. .TP
  511. knet_mtu
  512. Switch between manual and automatic MTU discovery. A value of 0 means
  513. automatic, other values set a manual MTU.
  514. In a setup with multiple interfaces, please specify
  515. the lowest MTU of the selected interfaces.
  516. The default value is 0.
  517. .TP
  518. block_unlisted_ips
  519. Allow UDPU and KNET to drop packets from IP addresses that are not known
  520. (nodes which don't exist in the nodelist) to corosync.
  521. Value is yes or no.
  522. This feature is mainly to protect against the joining of nodes
  523. with outdated configurations after a cluster split.
  524. Another use case is to allow the atomic merge of two independent clusters.
  525. Changing the default value is not recommended, the overhead is tiny and
  526. an existing cluster may fail if corosync is started on an unlisted node
  527. with an old configuration.
  528. The default value is yes.
  529. .TP
  530. cancel_token_hold_on_retransmit
  531. Allows Corosync to hold token by representative when there is too much
  532. retransmit messages. This allows network to process increased load without
  533. overloading it. Used mechanism is same as described for
  534. .B hold
  535. directive.
  536. Some deployments may prefer to never hold token when there is
  537. retransmit messages. If so, option should be set to yes.
  538. The default value is no.
  539. .PP
  540. Within the
  541. .B logging
  542. directive, there are several configuration options which are all optional.
  543. .PP
  544. The following 3 options are valid only for the top level logging directive:
  545. .TP
  546. timestamp
  547. This specifies that a timestamp is placed on all log messages. It can be one
  548. of off (no timestamp), on (second precision timestamp) or
  549. hires (millisecond precision timestamp - only when supported by LibQB).
  550. The default is hires (or on if hires is not supported).
  551. .TP
  552. fileline
  553. This specifies that file and line should be printed.
  554. The default is off.
  555. .TP
  556. function_name
  557. This specifies that the code function name should be printed.
  558. The default is off.
  559. .TP
  560. blackbox
  561. This specifies that blackbox functionality should be enabled.
  562. The default is on.
  563. .PP
  564. The following options are valid both for top level logging directive
  565. and they can be overridden in logger_subsys entries.
  566. .TP
  567. to_stderr
  568. .TP
  569. to_logfile
  570. .TP
  571. to_syslog
  572. These specify the destination of logging output. Any combination of
  573. these options may be specified. Valid options are
  574. .B yes
  575. and
  576. .B no.
  577. The default is syslog and stderr.
  578. Please note, if you are using to_logfile and want to rotate the file, use logrotate(8)
  579. with the option
  580. .B
  581. copytruncate.
  582. eg.
  583. .ne 18
  584. .RS
  585. .nf
  586. .ft CW
  587. /var/log/corosync.log {
  588. missingok
  589. compress
  590. notifempty
  591. daily
  592. rotate 7
  593. copytruncate
  594. }
  595. .ft
  596. .fi
  597. .RE
  598. .TP
  599. logfile
  600. If the
  601. .B to_logfile
  602. directive is set to
  603. .B yes
  604. , this option specifies the pathname of the log file.
  605. No default.
  606. .TP
  607. logfile_priority
  608. This specifies the logfile priority for this particular subsystem. Ignored if debug is on.
  609. Possible values are: alert, crit, debug (same as debug = on), emerg, err, info, notice, warning.
  610. The default is: info.
  611. .TP
  612. syslog_facility
  613. This specifies the syslog facility type that will be used for any messages
  614. sent to syslog. options are daemon, local0, local1, local2, local3, local4,
  615. local5, local6 & local7.
  616. The default is daemon.
  617. .TP
  618. syslog_priority
  619. This specifies the syslog level for this particular subsystem. Ignored if debug is on.
  620. Possible values are: alert, crit, debug (same as debug = on), emerg, err, info, notice, warning.
  621. The default is: info.
  622. .TP
  623. debug
  624. This specifies whether debug output is logged for this particular logger. Also can contain
  625. value trace, what is highest level of debug information.
  626. The default is off.
  627. .PP
  628. Within the
  629. .B logging
  630. directive, logger_subsys directives are optional.
  631. .PP
  632. Within the
  633. .B logger_subsys
  634. sub-directive, all of the above logging configuration options are valid and
  635. can be used to override the default settings.
  636. The subsys entry, described below, is mandatory to identify the subsystem.
  637. .TP
  638. subsys
  639. This specifies the subsystem identity (name) for which logging is specified. This is the
  640. name used by a service in the log_init() call. E.g. 'CPG'. This directive is
  641. required.
  642. .PP
  643. Within the
  644. .B quorum
  645. directive it is possible to specify the quorum configuration options. The following
  646. option is required to activate quorum service:
  647. .TP
  648. provider
  649. This specifies algorithm to use. At the time of writing only corosync_votequorum is supported.
  650. See votequorum(5) for configuration options.
  651. .PP
  652. Within the
  653. .B nodelist
  654. directive it is possible to specify specific information about nodes in cluster. Directive
  655. can contain only
  656. .B node
  657. sub-directive, which specifies every node that should be a member of the membership, and where
  658. non-default options are needed. Every node must have at least ring0_addr field filled.
  659. Every node that should be a member of the membership must be specified.
  660. Possible options are:
  661. .TP
  662. ringX_addr
  663. This specifies IP or network hostname address of the particular node.
  664. X is a link number.
  665. .TP
  666. nodeid
  667. This configuration option is required for each node for Kronosnet mode.
  668. It is a 32 bit value specifying the node identifier delivered to the
  669. cluster membership service. The node identifier value of zero is
  670. reserved and should not be used. If KNET is set, this field must be set.
  671. .TP
  672. name
  673. This option is used mainly with KNET transport to identify local node.
  674. It's also used by client software (pacemaker).
  675. Algorithm for identifying local node is following:
  676. .RS
  677. .IP 1.
  678. Looks up $HOSTNAME in the nodelist
  679. .IP 2.
  680. If this fails strip the domain name from $HOSTNAME and looks up
  681. that in the nodelist
  682. .IP 3.
  683. If this fails look in the nodelist for a fully-qualified name whose
  684. short version matches the short version of $HOSTNAME
  685. .IP 4.
  686. If all this fails then search the interfaces list for an address that
  687. matches a name in the nodelist
  688. .RE
  689. .PP
  690. Within the
  691. .B system
  692. directive it is possible to specify system options.
  693. Possible options are:
  694. .TP
  695. qb_ipc_type
  696. This specifies type of IPC to use. Can be one of native (default), shm and socket.
  697. Native means one of shm or socket, depending on what is supported by OS. On systems
  698. with support for both, SHM is selected. SHM is generally faster, but need to allocate
  699. ring buffer file in /dev/shm.
  700. .TP
  701. sched_rr
  702. Should be set to yes (default) if corosync should try to set round robin realtime
  703. scheduling with maximal priority to itself. When setting of scheduler fails, fallback to set
  704. maximal priority.
  705. .TP
  706. priority
  707. Set priority of corosync process. Valid only when sched_rr is set to no.
  708. Can be ether numeric value with similar meaning as
  709. .BR nice (1)
  710. or
  711. .B max
  712. /
  713. .B min
  714. meaning maximal / minimal priority (so minimal / maximal nice value).
  715. .TP
  716. move_to_root_cgroup
  717. Can be one of
  718. .B yes
  719. (Corosync always moves itself to root cgroup),
  720. .B no
  721. (Corosync never tries to move itself to root cgroup) or
  722. .B auto
  723. (Corosync first checks if sched_rr is enabled, and if
  724. so, it tries to set round robin realtime scheduling with maximal priority to itself.
  725. If setting of priority fails, corosync tries to move itself to root
  726. cgroup and retries setting of priority).
  727. This feature is available only for systems with cgroups v1 with RT
  728. sched enabled (Linux with CONFIG_RT_GROUP_SCHED kernel option) and cgroups v2.
  729. It's worth noting that currently (May 3 2021) cgroup2 doesn’t yet
  730. support control of realtime processes and the cpu controller can only be
  731. enabled when all RT processes are in the root cgroup (applies only for kernel
  732. with CONFIG_RT_GROUP_SCHED enabled). So when move_to_root_cgroup
  733. is disabled, kernel is compiled with CONFIG_RT_GROUP_SCHED and systemd is used,
  734. it may be impossible to make systemd options
  735. like CPUQuota working correctly until corosync is stopped.
  736. Also when moving to root cgroup is enforced and used together with cgroup2 and systemd
  737. it makes impossible (most of the time) for journald to add systemd specific
  738. metadata (most importantly _SYSTEMD_UNIT) properly, because corosync is
  739. moved out of cgroup created by systemd. This means
  740. it is not possible to filter corosync logged messages based on these metadata
  741. (for example using -u or _SYSTEMD_UNIT=UNIT pattern) and also running
  742. systemctl status doesn't display (all) corosync log messages.
  743. The problem is even worse because journald caches pid for some time
  744. (approx. 5 sec) so initial corosync messages have correct metadata.
  745. .TP
  746. allow_knet_handle_fallback
  747. If KNET handle creation fails using privileged operations, allow fallback to
  748. creating KNET handle using unprivileged operations. Defaults to no, meaning
  749. if privileged KNET handle creation fails, corosync will refuse to start.
  750. The KNET handle will always be created using privileged operations if possible,
  751. setting this to yes only allows fallback to unprivileged operations. This fallback
  752. may result in performance issues, but if running in an unprivileged environment,
  753. e.g. as a normal user or in unprivileged container, this may be required.
  754. .TP
  755. state_dir
  756. Existing directory where corosync should chdir into. Corosync stores
  757. important state files and blackboxes there.
  758. The default is the value of the environment variable STATE_DIRECTORY or /var/lib/corosync.
  759. .PP
  760. Within the
  761. .B resources
  762. directive it is possible to specify options for resources.
  763. Possible option is:
  764. .TP
  765. watchdog_device
  766. (Valid only if Corosync was compiled with watchdog support.)
  767. .br
  768. Watchdog device to use, for example /dev/watchdog.
  769. If unset, empty or "off", no watchdog is used.
  770. .IP
  771. In a cluster with properly configured power fencing a watchdog
  772. provides no additional value. On the other hand, slow watchdog
  773. communication may incur multi-second delays in the Corosync main loop,
  774. potentially breaking down membership. IPMI watchdogs are particularly
  775. notorious in this regard: read about kipmid_max_busy_us in IPMI.txt in
  776. the Linux kernel documentation.
  777. .PP
  778. Within the
  779. .B nozzle
  780. directive it is possible to specify options for a libnozzle device. This is a pseudo
  781. ethernet device that routes network traffic through a channel on the corosync KNET network
  782. (NOT cpg or any corosync internal service) to other nodes in the cluster. This allows
  783. applications to take advantage of KNET features such as multipathing, automatic failover,
  784. link switching etc. Note that libnozzle is not a reliable transport, but you can tunnel TCP
  785. through it for reliable communications.
  786. .br
  787. libnozzle also supports optional interface up/down scripts that are kept under a
  788. /etc/corosync/updown.d/ directory. See the KNET documentation for more information.
  789. .br
  790. Only one nozzle device is allowed.
  791. .br
  792. The nozzle stanza takes several options:
  793. .TP
  794. name
  795. The name of the network device to be created. On Linux this may be any name at all, other
  796. platforms have restrictions on the name.
  797. .TP
  798. ipaddr
  799. The IP address (IPv6 or IPv4) of the interface. The bottom part of this address will be replaced
  800. by the local node's nodeid in conjunction with ipprefix. so, eg
  801. ipaddr: 192.168.1.0
  802. ipprefix: 24
  803. will make nodeids 1,2,5 use IP addresses 192.168.1.1, 192.168.1.2 & 192.168.1.5.
  804. If a prefix length of 16 is used then the bottom two bytes will be filled in with nodeid numbers.
  805. IPv6 addresses must end in '::', the nodeid will be added after the two colons to make the
  806. local IP address.
  807. Only one IP address is currently supported in the corosync.conf file. Additional IP addresses
  808. can be added in the ifup script if necessary.
  809. .TP
  810. ipprefix
  811. specifies the IP address prefix for the nozzle device (see above)
  812. .TP
  813. macaddr
  814. Specifies the MAC address prefix for the nozzle device. As for the IP address, the bottom part
  815. of the MAC address will be filled in with the node id. In this case no prefix applies, the bottom
  816. two bytes of the MAC address will always be overwritten with the node id. So specifying
  817. macaddr: 54:54:12:24:12:12 on nodeid 1 will result in it having a MAC address of 54:54:12:24:00:01
  818. .SH "TO ADD A NEW NODE TO THE CLUSTER"
  819. For example to add a node with address 10.24.38.108 with nodeid 3. The node has the name NEW
  820. (in DNS or /etc/hosts) and is not currently running corosync. The current corosync.conf nodelist
  821. looks like this:
  822. .PP
  823. .nf
  824. .RS
  825. nodelist {
  826. node {
  827. nodeid: 1
  828. ring0_addr: 10.24.38.101
  829. name: node1
  830. }
  831. node {
  832. nodeid: 2
  833. ring0_addr: 10.24.38.102
  834. name: node2
  835. }
  836. }
  837. .RE
  838. .fi
  839. .PP
  840. Add a new entry for the node below the existing nodes. Node entries don't have
  841. to be in nodeid order, but it will help keep you sane. So the nodelist now looks like this:
  842. .PP
  843. .nf
  844. .RS
  845. nodelist {
  846. node {
  847. nodeid: 1
  848. ring0_addr: 10.24.38.101
  849. name: node1
  850. }
  851. node {
  852. nodeid: 2
  853. ring0_addr: 10.24.38.102
  854. name: node2
  855. }
  856. node {
  857. nodeid: 3
  858. ring0_addr: 10.24.38.108
  859. name: NEW
  860. }
  861. }
  862. .RE
  863. .fi
  864. .PP
  865. .PP
  866. This file must then be copied onto all three nodes - the existing two nodes, and the new one.
  867. On one of the existing corosync nodes, tell corosync to re-read the updated config file into memory:
  868. .PP
  869. .nf
  870. .RS
  871. corosync-cfgtool -R
  872. .RE
  873. .fi
  874. .PP
  875. This command only needs to be run on one node in the cluster. You may then start corosync on the NEW node
  876. and it should join the cluster. If this doesn't work as expected then check the communications between all
  877. three nodes is working, and check the syslog files on all nodes for more information. It's important to note
  878. that the key bit of information about a node failing to join might be on a different node than you expect.
  879. .SH "TO REMOVE A NODE FROM THE CLUSTER"
  880. This is the reverse procedure to 'Adding a node' above. First you need to shut down the node you will
  881. be removing from the cluster.
  882. .PP
  883. .nf
  884. .RS
  885. corosync-cfgtool -H
  886. .RE
  887. .fi
  888. .PP
  889. Then delete the nodelist stanza from corosync.conf and finally update corosync on the remaining nodes by
  890. running
  891. .PP
  892. .nf
  893. .RS
  894. corosync-cfgtool -R
  895. .RE
  896. .fi
  897. .TP
  898. on one of them.
  899. .SH "ADDRESS RESOLUTION"
  900. corosync resolves ringX_addr names/IP addresses using the getaddrinfo(3) call with respect
  901. of totem.ip_version setting.
  902. getaddrinfo() function uses a sophisticated algorithm to sort node addresses into a preferred
  903. order and corosync always chooses the first address in that list of the required family.
  904. As such it is essential that your DNS or /etc/hosts files are correctly configured so that
  905. all addresses for ringX appear on the same network (or are reachable with minimal hops)
  906. and over the same IP protocol. If this is not the case then some nodes might not be able
  907. to join the cluster. It is possible to override the search order used
  908. by getaddrinfo() using the configuration file /etc/gai.conf(5) if necessary,
  909. but this is not recommended.
  910. If there is any doubt about the order of addresses returned from getaddrinfo() then it might be simpler to use
  911. IP addresses (v4 or v6) in the ringX_addr field.
  912. .SH "FILES"
  913. .TP
  914. /etc/corosync/corosync.conf
  915. The corosync executive configuration file.
  916. .SH "SEE ALSO"
  917. .BR corosync_overview (7),
  918. .BR votequorum (5),
  919. .BR corosync-qdevice (8),
  920. .BR logrotate (8)
  921. .BR getaddrinfo (3)
  922. .BR gai.conf (5)
  923. .PP