corosync.conf.5 38 KB

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