OCF_HEARTBEAT_SMB-S(7)
π ocf_heartbeat_smb-share β it's giving cluster samba management β¨
okay bestie, welcome to the OCF_HEARTBEAT_SMB-S(7) page, the manual for the ocf_heartbeat_smb-share resource agent. yes she's in section 7. yes she's iconic. let's get into it π
β¨ NAME β¨
ocf_heartbeat_smb-share β literally just here to manage samba shares on the fly, no cap π¦
πΈ SYNOPSIS πΈ
smb-share [start | stop | status | monitor | meta-data | validate-all]
π DESCRIPTION π
So this RA is the one who controls samba shares on the fly. The way that adding and removing samba shares needs no restart of the samba daemon? Obsessed. It's the equivalent of the exportfs RA which handles nfs shares. periodt.
For this RA to work as expected you need a cloned samba daemon which has to be started before, fr fr. After this RA manages config snippets placed in the filesystem, and after a fence of that node those snippets will still be sitting right there, you will have to use a tmpfs mount for this. Also you need a basic smb.conf file where all global parameters and permanent shares should live. And within that smb.conf you must put a line in the global section like this:
include = /etc/samba/conf.d/pacemaker-includes.conf
The filename can be changed by setting the parameter includesfile. Every share created by this RA will create a new file located in:
/etc/samba/conf.d/
This directory also can be changed by setting the RA parameter confd. π«Ά
π SUPPORTED PARAMETERS π
shareβ Set the name of a windows share which should be added to Samba. Example name"myshare"resulting in[myshare].
(unique, required, string, no default)
pathβ Set the path to share for cifs clients. Example path"/srv/data/myshare".
(unique, optional, string, no default)
hosts_allowβ This parameter is a comma, space, or tab delimited set of hosts which are permitted to access a service.
(optional, string, no default)
browseableβ This controls whether this share is seen in the list of available shares in a net view and in the browse list.
(optional, string, no default)
writeableβ Inverted synonym for read only.
(optional, string, no default)
read_onlyβ This option can be used to turn the writing backendstdb,tdb2, andldapinto read only mode. This can be useful e.g. in cases where a pre-filled database exists that should not be extended automatically.
(optional, string, no default)
guest_okβ If this parameter isyesfor a service, then no password is required to connect to the service. Privileges will be those of the guest account.
(optional, string, no default)
directory_maskβ This parameter is the octal modes which are used when converting DOS modes to UNIX modes when creating UNIX directories.
(optional, string, no default)
create_maskβ When a file is created, the necessary permissions are calculated according to the mapping from DOS modes to UNIX permissions, and the resulting UNIX mode is then bit-wise ANDed with this parameter. This parameter may be thought of as a bit-wise MASK for the UNIX modes of a file.
(optional, string, no default)
printableβ If this parameter isyes, then clients may open, write to and submit spool files on the directory specified for the service.
(optional, string, no default)
valid_usersβ This is a list of users that should be allowed to login to this service. Names starting with@,+and&are interpreted using the same rules as described in the invalid users parameter.
(optional, string, no default)
force_userβ This specifies a UNIX user name that will be assigned as the default user for all users connecting to this service. This is useful for sharing files.
(optional, string, no default)
force_groupβ This specifies a UNIX group name that will be assigned as the default primary group for all users connecting to this service. This is useful for sharing files by ensuring that all access to files on service will use the named group for their permissions checking.
(optional, string, no default)
extraoptβ This option can be used to define an additionalkey = valuepair. In this parameter also a semicolon could be placed. Need to set e.gsomthinspecial = value
(optional, string, no default)
extraopt_listβ This option can be used to define multiple additionalkey = valuepairs. Define the list of element semicolon separated. e.gsomethingspecial = value;one more = value2
(optional, string, no default)
outfileβ Set the path and filename where the snipped should be written. Example"/etc/samba/conf.d/myshare.inc".
(unique, required, string, no default)
confdβ Set the path where the includes will be written. This folder have to be a tmpfs mount. This defaults to"/etc/samba/conf.d".
(optional, string, default "/etc/samba/conf.d")
includesfileβ Set the path and filename in which the include should be placed. Example includesfile"/etc/samba/conf.d/pacemaker-includes.conf". This option manages theinclude=parameter within this file
(optional, string, default "/etc/samba/conf.d/pacemaker-includes.conf")
π SUPPORTED ACTIONS π
This resource agent supports the following actions (operations), bestie:
startβ Starts the resource. Suggested minimum timeout:20s.stopβ Stops the resource. Suggested minimum timeout:20s.statusβ Performs a status check. Suggested minimum timeout:20s. Suggested interval:10s.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:20s.
π EXAMPLE CRM SHELL π
The following is an example configuration for a smb-share resource using the crm(8) shell:
primitive p_smb-share ocf:heartbeat:smb-share \
params \
share=string \
outfile=string \
op monitor depth="0" timeout="20s" interval="10s"
β EXAMPLE PCS β
The following is an example configuration for a smb-share resource using pcs(8)
pcs resource create p_smb-share ocf:heartbeat:smb-share \
share=string \
outfile=string \
op monitor OCF_CHECK_LEVEL="0" timeout="20s" interval="10s"
π¦ SEE ALSO π¦
π AUTHOR π
ClusterLabs contributors (see the resource agent source for information about individual authors)
okay that's the whole thing, you ate it, go configure some samba shares π this page is from resource-agents, version UNKNOWN, dated 04/08/2026, and it lives under the name OCF_HEARTBEAT_SMB-S(7). slay, bye bestie πβ¨
π¦ where this page comes from
- fedora 43: resource-agents 4.18.0-1.fc43 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- fedora 44: resource-agents 4.18.0-1.fc44 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms