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 backends tdb, tdb2, and ldap into 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 is yes for 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 is yes, 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 additional key = value pair. In this parameter also a semicolon could be placed. Need to set e.g somthinspecial = value

(optional, string, no default)

  • extraopt_list β€” This option can be used to define multiple additional key = value pairs. Define the list of element semicolon separated. e.g somethingspecial = 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 the include= 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 πŸ¦‹

http://clusterlabs.org/


πŸ‘‘ 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