---
name: "cluster.conf"
section: "5"
platform: "linux"
package: "cman"
version: "3.1.8-1.2+b1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/cluster.conf"
---

# cluster.conf(5)

configuration file for cman and related daemons

## NAME

cluster.conf - configuration file for cman and related daemons

## SYNOPSIS

**/etc/cluster/cluster.conf**

## DESCRIPTION

When [**cman\_tool**(8)](/cman_tool/8.md) starts the [**corosync**(8)](/corosync/8.md) daemon, the cluster.conf data is read into the corosync in-memory database (confdb).  The configuration is used by corosync, cman and other related cluster daemons and programs.  When cman configures corosync with cluster.conf, the [**corosync.conf**(5)](/corosync.conf/5.md) file is not used.

A basic cluster configuration is described below. Configuration options for other daemons/programs are described in their own man pages. [**ccs\_tool**(8)](/ccs_tool/8.md) can be used to do some basic cluster.conf editing.

The cluster.rng schema is used to validate cluster.conf.  Unrecognized items will produce a warning during cluster startup, and invalid xml structure will cause the cluster startup to fail.  See [**ccs\_config\_validate**(8)](/ccs_config_validate/8.md) and [**ccs\_config\_dump**(8)](/ccs_config_dump/8.md).

### Cluster

The top level **cluster** section contains all other sections and has two required attributes:

- **name**

  The name of the cluster can be up to 15 characters long (16 including terminating null).  It is important that this name be unique among clusters on the same network.

- **config\_version**

  The config\_version specifies the revision level of the file and should be increased each time the file is updated.

```
<cluster name="alpha" config_version="1">
</cluster>
```

### Cluster Nodes

The set of nodes that make up the cluster are defined in the **clusternodes** section which contains multiple **clusternode** sections.  A clusternode has two required attributes:

- **name**

  The node name should correspond to the hostname on the network interface to be used for cluster communication.

- **nodeid**

  The node id must be greater than zero and unique.

```
<cluster name="alpha" config_version="1">
        <clusternodes>
        <clusternode name="node-01" nodeid="1">
        </clusternode>
        <clusternode name="node-02" nodeid="2">
        </clusternode>
        <clusternode name="node-03" nodeid="3">
        </clusternode>
        </clusternodes>
</cluster>
```

### Logging

Cluster daemons use a common **logging** section to configure their loggging behavior.

```
<cluster name="alpha" config_version="1">
        <logging/>
</cluster>
```

Global settings apply to all:

```
<logging debug="on"/>
```

Per-daemon **logging\_daemon** subsections override the global settings. Daemon names that can be configured include: corosync, qdiskd, groupd, fenced, dlm\_controld, gfs\_controld, rgmanager.

```
<logging>
        <logging_daemon name="qdiskd" debug="on"/>
        <logging_daemon name="fenced" debug="on"/>
</logging>
```

Corosync daemon settings apply to all corosync subsystems by default, but subsystems can also be configured individually.  These include CLM, CPG, MAIN, SERV, CMAN, TOTEM, QUORUM, CONFDB, CKPT, EVT.

```
<logging>
        <logging_daemon name="corosync" subsys="QUORUM" debug="on"/>
        <logging_daemon name="corosync" subsys="CONFDB" debug="on"/>
</logging>
```

The attributes available at global, daemon and subsystem levels are:

- **to\_syslog**

  enable/disable messages to syslog (yes/no), default "yes"

- **to\_logfile**

  enable/disable messages to log file (yes/no), default "yes"

- **syslog\_facility**

  facility used for syslog messages, default "daemon"

- **syslog\_priority**

  messages at this level and up will be sent to syslog, default "info"

- **logfile\_priority**

  messages at this level and up will be written to log file, default "info"

- **logfile**

  the log file name, default /var/log/cluster/\<daemon\>.log

- **debug="on"**

  a shortcut for logfile\_priority="debug"

## EXAMPLE

An explicit configuration for the default settings would be:

```
<logging to_syslog="yes" to_logfile="yes" syslog_facility="daemon"
         syslog_priority="info" logfile_priority="info">
    <logging_daemon name="qdiskd"
             logfile="/var/log/cluster/qdiskd.log"/>
    <logging_daemon name="fenced"
             logfile="/var/log/cluster/fenced.log"/>
    <logging_daemon name="dlm_controld"
             logfile="/var/log/cluster/dlm_controld.log"/>
    <logging_daemon name="gfs_controld"
             logfile="/var/log/cluster/gfs_controld.log"/>
    <logging_daemon name="rgmanager"
             logfile="/var/log/cluster/rgmanager.log"/>
    <logging_daemon name="corosync"
             logfile="/var/log/cluster/corosync.log"/>
</logging>
```

To include debug messages (and above) from all daemons in their default log files, either of the following which are equivalent:

```
<logging debug="on"/>
<logging logfile_priority="debug"/>
```

To exclude all log messages from syslog:

```
<logging to_syslog="no"/>
```

To disable logging to all log files:

```
<logging to_file="no"/>
```

To include debug messages (and above) from all daemons in syslog:

```
<logging syslog_priority="debug"/>
```

To limit syslog messages to error (and above), keeping info (and above) in log files (this logfile\_priority setting is the default so could be omitted):

```
<logging syslog_priority="error" logfile_priority="info"/>
```

## FILES

- */etc/cluster/cluster.conf*

  standard location of cluster configuration file

- */usr/share/cluster/cluster.rng*

  standard location of cluster.conf schema

## SEE ALSO

[**ccs\_tool**(8)](/ccs_tool/8.md), [**ccs\_config\_dump**(8)](/ccs_config_dump/8.md), [**ccs\_config\_validate**(8)](/ccs_config_validate/8.md), [**cman\_tool**(8)](/cman_tool/8.md), [**cman**(5)](/cman/5.md), [**qdisk**(5)](/qdisk/5.md), [**fenced**(8)](/fenced/8.md), [**fence\_node**(8)](/fence_node/8.md), [**dlm\_controld**(8)](/dlm_controld/8.md), [**gfs\_controld**(8)](/gfs_controld/8.md), [**rgmanager**(8)](/rgmanager/8.md)
