Installation guide

[global]
guest ok = yes
clustering = yes
netbios name = csmb-server
[csmb]
comment = Clustered Samba
public = yes
path = /mnt/gfs2/share
writeable = yes
ea support = yes
This example exports a share with name csmb located at /mnt/g fs2/share. This is different from
the GFS2 shared filesystem at /mnt/ctdb/. ctd b. l o ck that we specified as the
C T D B_R EC O VER Y _LO C K parameter in the CTDB configuration file at /etc/sysco nfi g /ctd b.
In this example, we will create the share directory in /mnt/gfs2 when we mount it for the first time.
The cl usteri ng = yes entry instructs Samba to use CTDB. The netbi o s name = csmb-
server entry explicitly sets all the nodes to have a common NetBIOS name. The ea suppo rt
parameter is required if you plan to use extended attributes.
The smb. co nf configuration file must be identical on all of the cluster nodes.
Samba also offers registry-based configuration using the net conf command to automatically keep
configuration in sync between cluster members without having to manually copy configuration files
among the cluster nodes. For information on the net conf command, refer to the net(8) man page.
11.6. St art ing CT DB and Samba Services
After starting up the cluster, you must mount the GFS2 file systems that you created, as described in
Section 11.3, “ GFS2 Configuration . The permissions on the Samba share directory and user
accounts on the cluster nodes should be set up for client access.
Execute the following command on all of the nodes to start up the ctd bd daemon. Since this
example configured CTDB with C T D B_MANAG ES_SAMBA= yes, CTDB will also start up the Samba
service on all nodes and export all configured Samba shares.
[root@ clusmb-01 ~]# servi ce ctd b start
It can take a couple of minutes for CTDB to start Samba, export the shares, and stabilize. Executing
ctd b status shows the status of CTDB, as in the following example:
[root@ clusmb-01 ~]# ctdb status
Number of nodes:3
pnn:0 192.168.1.151 OK (THIS NODE)
pnn:1 192.168.1.152 OK
pnn:2 192.168.1.153 OK
Generation:1410259202
Size:3
hash:0 lmaster:0
hash:1 lmaster:1
hash:2 lmaster:2
Recovery mode:NORMAL (0)
Recovery master:0
Red Hat Ent erprise Linux 6 Clust er Administ rat ion
166