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