corosync.conf.5 32 KB

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