OCF_HEARTBEAT_CTDB(7)
π ocf_heartbeat_CTDB β the manual page, but make it a group chat π
okay bestie, so this is the ocf_heartbeat_CTDB(7) page, section 7 of the manual, and it's literally all about the CTDB Resource Agent. grab a strawberry drink π and let's get into it.
β¨ NAME β¨
ocf_heartbeat_CTDB β the CTDB Resource Agent. that's it, that's the name, she's iconic π
πΈ SYNOPSIS πΈ
CTDB [start | stop | monitor | meta-data | validate-all]
those are the moves. only those. no cap.
π¦ DESCRIPTION π¦
so this resource agent manages CTDB, which means you can use Clustered Samba in a Linux-HA/Pacemaker cluster. yes, that's a whole thing and yes you can do it π
here's the tea: you need a shared filesystem (like OCFS2 or GFS2) and that's where the CTDB lock lives. so like, no shared fs, no lock, no vibe. π«Ά
then you create /etc/ctdb/nodes containing a list of the private IP addresses of every node in the cluster, and after that you configure this RA as a clone. that's the whole ritual, honestly.
also super important: this agent expects the samba and windbind resources to be managed outside of CTDB's control, as a separate set of resources controlled by the cluster manager. the optional support for letting CTDB manage those daemons is going to be deprecated. so like, don't get attached to it π
for more info (and honestly there's a lot), peep http://linux-ha.org/wiki/CTDB_(resource_agent) β she's got lore π
β SUPPORTED PARAMETERS β
π ctdb_recovery_lock
the location of a shared lock file or helper binary, common across all nodes. see the CTDB documentation for the details, bestie, this one's got depth.
(unique, required, string, no default) β yes you HAVE to set it, no default, mandatory era π₯
π ctdb_manages_samba
should CTDB manage starting/stopping the Samba service for you? heads up, this will be deprecated in future, in favor of configuring a separate Samba resource.
(optional, boolean, default no)
π ctdb_manages_winbind
same deal but for Winbind β should CTDB be the one starting/stopping it? this will also be deprecated in future, in favor of configuring a separate Winbind resource.
(optional, boolean, default no)
π ctdb_service_smb
name of the smb init script. only necessary if CTDB is managing Samba directly. will usually be auto-detected for you, so like, chill π
(optional, string, no default)
π ctdb_service_nmb
name of the nmb init script. only necessary if CTDB is managing Samba directly. will usually be auto-detected.
(optional, string, no default)
π ctdb_service_winbind
name of the winbind init script. only necessary if CTDB is managing Winbind directly. will usually be auto-detected.
(optional, string, no default)
π ctdb_samba_skip_share_check
okay so if you have like, a LOT of shares, it might not be feasible to check that all of them are available during every single monitoring interval. in that case this check can be disabled. sometimes skipping is self care πΈ
(optional, boolean, default yes)
π ctdb_monitor_free_memory
if the amount of free memory drops below this value, the node becomes unhealthy and ctdb plus all managed services get shut down. π once that happens the administrator has to find the reason for the OOM situation, rectify it, and restart ctdb with service ctdb start. with CTDB 4.4.0 and later this parameter is ignored β so it's giving legacy.
(optional, integer, default 100)
π ctdb_start_as_disabled
when set to yes, the CTDB node will start in DISABLED mode and won't host any public IP addresses. lowkey a mood.
(optional, boolean, default no)
π ctdb_config_dir
the directory containing the various CTDB configuration files. the nodes and notify.sh scripts are expected to be in this directory.
(optional, string, default "/etc/ctdb")
π ctdb_binary
full path to the CTDB binary.
(optional, string, default "/usr/bin/ctdb")
π ctdbd_binary
full path to the CTDB cluster daemon binary.
(optional, string, default "/usr/sbin/ctdbd")
π ctdb_socket
full path to the domain socket that ctdbd will create β local clients attach to it and communicate with the ctdb daemon through it. with CTDB 4.9.0 and later the socket path is hardcoded at build time, so this parameter is ignored. rip to this option πͺ¦
(unique, optional, string, default "/run/ctdb/ctdbd.socket")
π ctdb_dbdir
the directory to put the local CTDB database files in. persistent database files go in ctdb_dbdir/persistent.
(unique, optional, string, default "/var/run")
π ctdb_logfile
full path to the log file. want syslog instead? use the value "syslog". options, we love to see them β¨
(optional, string, default "/var/log/ctdb/log.ctdb")
π ctdb_rundir
full path to the ctdb runtime directory, used for storage of socket lock state.
(optional, string, default "/run/ctdb")
π ctdb_timeout
indicates that ctdb should wait up to TIMEOUT seconds for a response to most commands sent to the CTDB daemon.
(unique, optional, integer, default 10)
π ctdb_debuglevel
what debug level to run at (0-10). higher means more verbose. more words, more chaos π
(optional, integer, default 2)
π ctdb_max_open_files
maximum number of open files (for ulimit -n).
(optional, integer, no default)
π smb_conf
path to the default samba config file. only necessary if CTDB is managing Samba.
(optional, string, default "/etc/samba/smb.conf")
π smb_private_dir
the directory for smbd to use for storing files like smbpasswd and secrets.tdb. old versions of CTBD (prior to 1.0.50) required this to be on shared storage. this parameter should not be set for current versions of CTDB, and only remains in the RA for backwards compatibility. so like, don't touch it unless you're on some vintage situation π
(unique, optional, string, no default)
π smb_passdb_backend
which backend to use for storing user and possibly group information. only necessary if CTDB is managing Samba.
(optional, string, default "tdbsam")
π smb_idmap_backend
which backend to use for SID/uid/gid mapping. only necessary if CTDB is managing Samba.
(optional, string, default "tdb2")
π smb_fileid_algorithm
which fileid:algorithm to use with vfs_fileid. the correct value depends on which clustered filesystem is in use β e.g. for OCFS2, this should be set to "fsid". only necessary if CTDB is managing Samba.
(optional, string, no default)
π₯ SUPPORTED ACTIONS π₯
this resource agent supports the following actions (operations), bestie, take notes:
startβ starts the resource. suggested minimum timeout:90s.stopβ stops the resource. suggested minimum timeout:100s.monitorβ performs a detailed status check. suggested minimum timeout:20s. suggested interval:10s.meta-dataβ retrieves resource agent metadata (internal use only). suggested minimum timeout:5s.validate-allβ performs a validation of the resource configuration. suggested minimum timeout:30s.
π§ EXAMPLE CRM SHELL π§
here's an example config for a CTDB resource using the crm(8) shell. copy it, it's cute:
primitive p_CTDB ocf:heartbeat:CTDB \
params \
ctdb_recovery_lock=string \
op monitor timeout="20s" interval="10s" depth="0"
π EXAMPLE PCS π
and here's the same vibe but with pcs(8):
pcs resource create p_CTDB ocf:heartbeat:CTDB \
ctdb_recovery_lock=string \
op monitor timeout="20s" interval="10s" OCF_CHECK_LEVEL="0"
π SEE ALSO π
http://clusterlabs.org/ β go explore, she's got range π
π AUTHOR π
ClusterLabs contributors (see the resource agent source for information about individual authors). love them, they ate π
ngl that's the whole page β every param, every default, every deprecation warning, nothing skipped. slay π β¨
peace out bestie π«Ά this was the ocf_heartbeat_CTDB(7) page, part of the resource-agents docs, version UNKNOWN, dated 10/01/2026. go configure your cluster, you're the main character now π
π¦ where this page comes from
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms