Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

ocf_heartbeat_smb-share - Manages samba shares on the fly

smb-share [start | stop | status | monitor | meta-data | validate-all]

This RA is used to control samba shares on the fly. For adding and removing samba shares no restart of the samba daemon is needed. This is the equivalent of the exportfs RA which is used for nfs shares.

For this RA to work as expected you need a cloned samba daemon which have to be startet before. After this RA manages config snippets placed in the filesystem and after a fence of that node these snippets will still located there you will have to use a tmpfs mount for this. Also you need a basic smb.conf file in which all global parameters an permanent shares should be placed. Within this smb.conf also 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:


This directory also can be changed by setting the RA parameter confd.

Set the name of a windows share which should be added to Samba example name "myshare" resulting in [myshare].

(unique, required, string, no default)


Set the path to share for cifs clients. example path "/srv/data/myshare".

(unique, optional, string, no default)


This parameter is a comma, space, or tab delimited set of hosts which are permitted to access a service.

(optional, string, no default)


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)


Inverted synonym for read only.

(optional, string, no default)


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)


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)


This parameter is the octal modes which are used when converting DOS modes to UNIX modes when creating UNIX directories.

(optional, string, no default)


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)


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)


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)


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)


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)


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)


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)


Set the path and filename where the snipped should be written. example "/etc/samba/conf.d/".

(unique, required, string, no default)


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")


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")

This resource agent supports the following actions (operations):


Starts the resource. Suggested minimum timeout: 20s.


Stops the resource. Suggested minimum timeout: 20s.


Performs a status check. Suggested minimum timeout: 20s. Suggested interval: 10s.


Performs a detailed status check. Suggested minimum timeout: 20s. Suggested interval: 10s.


Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5s.


Performs a validation of the resource configuration. Suggested minimum timeout: 20s.

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" 

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"

ClusterLabs contributors (see the resource agent source for information about individual authors)
04/12/2022 resource-agents 4.10.0

Search for    or go to Top of page |  Section 7 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.