corosync.conf.5 37 KB

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