4
0

corosync.conf.5 29 KB

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