1OCF_HEARTBEAT_SMB-S(7)        OCF resource agents       OCF_HEARTBEAT_SMB-S(7)
2
3
4

NAME

6       ocf_heartbeat_smb-share - Manages samba shares on the fly
7

SYNOPSIS

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

DESCRIPTION

12       This RA is used to control samba shares on the fly. For adding and
13       removing samba shares no restart of the samba daemon is needed. This is
14       the equivalent of the exportfs RA which is used for nfs shares.
15
16       For this RA to work as expected you need a cloned samba daemon which
17       have to be startet before. After this RA manages config snippets placed
18       in the filesystem and after a fence of that node these snippets will
19       still located there you will have to use a tmpfs mount for this. Also
20       you need a basic smb.conf file in which all global parameters an
21       permanent shares should be placed. Within this smb.conf also you must
22       put a line in the global section like this:
23
24       include = /etc/samba/conf.d/pacemaker-includes.conf
25
26       The filename can be changed by setting the parameter includesfile.
27       Every share created by this RA will create a new file located in:
28
29       /etc/samba/conf.d/
30
31       This directory also can be changed by setting the RA parameter confd.
32

SUPPORTED PARAMETERS

34       share
35           Set the name of a windows share which should be added to Samba
36           example name "myshare" resulting in [myshare].
37
38           (unique, required, string, no default)
39
40       path
41           Set the path to share for cifs clients. example path
42           "/srv/data/myshare".
43
44           (unique, optional, string, no default)
45
46       hosts_allow
47           This parameter is a comma, space, or tab delimited set of hosts
48           which are permitted to access a service.
49
50           (optional, string, no default)
51
52       browseable
53           This controls whether this share is seen in the list of available
54           shares in a net view and in the browse list.
55
56           (optional, string, no default)
57
58       writeable
59           Inverted synonym for read only.
60
61           (optional, string, no default)
62
63       read_only
64           This option can be used to turn the writing backends tdb, tdb2, and
65           ldap into read only mode. This can be useful e.g. in cases where a
66           pre-filled database exists that should not be extended
67           automatically.
68
69           (optional, string, no default)
70
71       guest_ok
72           If this parameter is yes for a service, then no password is
73           required to connect to the service. Privileges will be those of the
74           guest account.
75
76           (optional, string, no default)
77
78       directory_mask
79           This parameter is the octal modes which are used when converting
80           DOS modes to UNIX modes when creating UNIX directories.
81
82           (optional, string, no default)
83
84       create_mask
85           When a file is created, the necessary permissions are calculated
86           according to the mapping from DOS modes to UNIX permissions, and
87           the resulting UNIX mode is then bit-wise ANDed with this parameter.
88           This parameter may be thought of as a bit-wise MASK for the UNIX
89           modes of a file.
90
91           (optional, string, no default)
92
93       printable
94           If this parameter is yes, then clients may open, write to and
95           submit spool files on the directory specified for the service.
96
97           (optional, string, no default)
98
99       valid_users
100           This is a list of users that should be allowed to login to this
101           service. Names starting with @, + and & are interpreted using the
102           same rules as described in the invalid users parameter.
103
104           (optional, string, no default)
105
106       force_user
107           This specifies a UNIX user name that will be assigned as the
108           default user for all users connecting to this service. This is
109           useful for sharing files.
110
111           (optional, string, no default)
112
113       force_group
114           This specifies a UNIX group name that will be assigned as the
115           default primary group for all users connecting to this service.
116           This is useful for sharing files by ensuring that all access to
117           files on service will use the named group for their permissions
118           checking.
119
120           (optional, string, no default)
121
122       extraopt
123           This option can be used to define an additional key = value pair.
124           In this parameter also a semicolon could be placed. Need to set e.g
125           somthinspecial = value
126
127           (optional, string, no default)
128
129       extraopt_list
130           This option can be used to define multiple additional key = value
131           pairs. Define the list of element semicolon separated. e.g
132           somethingspecial = value;one more = value2
133
134           (optional, string, no default)
135
136       outfile
137           Set the path and filename where the snipped should be written.
138           example "/etc/samba/conf.d/myshare.inc".
139
140           (unique, required, string, no default)
141
142       confd
143           Set the path where the includes will be written. This folder have
144           to be a tmpfs mount This defaults to "/etc/samba/conf.d".
145
146           (optional, string, default "/etc/samba/conf.d")
147
148       includesfile
149           Set the path and filename in which the include should be placed.
150           example includesfile "/etc/samba/conf.d/pacemaker-includes.conf".
151           This option manages the include= parameter within this file
152
153           (optional, string, default
154           "/etc/samba/conf.d/pacemaker-includes.conf")
155

SUPPORTED ACTIONS

157       This resource agent supports the following actions (operations):
158
159       start
160           Starts the resource. Suggested minimum timeout: 20s.
161
162       stop
163           Stops the resource. Suggested minimum timeout: 20s.
164
165       status
166           Performs a status check. Suggested minimum timeout: 20s. Suggested
167           interval: 10s.
168
169       monitor
170           Performs a detailed status check. Suggested minimum timeout: 20s.
171           Suggested interval: 10s.
172
173       meta-data
174           Retrieves resource agent metadata (internal use only). Suggested
175           minimum timeout: 5s.
176
177       validate-all
178           Performs a validation of the resource configuration. Suggested
179           minimum timeout: 20s.
180

EXAMPLE CRM SHELL

182       The following is an example configuration for a smb-share resource
183       using the crm(8) shell:
184
185           primitive p_smb-share ocf:heartbeat:smb-share \
186             params \
187               share=string \
188               outfile=string \
189             op monitor depth="0" timeout="20s" interval="10s"
190

EXAMPLE PCS

192       The following is an example configuration for a smb-share resource
193       using pcs(8)
194
195           pcs resource create p_smb-share ocf:heartbeat:smb-share \
196             share=string \
197             outfile=string \
198             op monitor OCF_CHECK_LEVEL="0" timeout="20s" interval="10s"
199

SEE ALSO

201       http://clusterlabs.org/
202

AUTHOR

204       ClusterLabs contributors (see the resource agent source for information
205       about individual authors)
206
207
208
209resource-agents UNKNOWN           10/11/2023            OCF_HEARTBEAT_SMB-S(7)
Impressum