corosync.conf.5 36 KB

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