|Red Hat Cluster Suite: Configuring and Managing a Cluster|
|Prev||Chapter 6. Network File Sharing Services||Next|
This section describes the fields within the smb.conf.sharename file which are most relevant to the correct operation of highly available Samba services. It is beyond the scope of this document to completely describe all of the fields within a Samba configuration file. There have been no additional field names added in support of clustering, and the file format follows the normal Samba conventions.
The following is an example smb.conf.sharename file which is automatically generated by the Cluster Configuration Tool. The example shows a share named mktg. The name of the file is /etc/samba/smb.conf.mktg.
# Template samba service configuration file - please modify # to specify subdirectories and client access permissions. # Remember to copy this file over to *ALL* other cluster # members. # # From a cluster perspective, the key fields are: # lock directory - must be unique per samba service. # bind interfaces only - must be present set to yes. # interfaces - must be set to service floating IP address. # path - must be the service mountpoint or subdirectory thereof. # Refer to the cluster documentation for details. [global] workgroup = RHCLUSTER pid directory = /var/run/samba/mktg lock directory = /var/cache/samba/mktg log file = /var/log/samba/%m.log encrypt passwords = yes bind interfaces only = yes interfaces = 192.168.26.11 [mktg] comment = High Availability Samba Service browsable = yes writable = no public = yes path = /share
The following are descriptions of the most relevant fields, from a clustering perspective, in the /etc/samba/smb.conf.sharename file. In this example, the file is named /etc/samba/smb.conf.mktg in accordance with the share name that was specified (mktg) while running the Cluster Configuration Tool. Only the cluster-specific fields are described below. The remaining fields follow standard Samba syntax.
These parameters pertain to all shares which are specified in the smb.conf.sharename file. It is possible to designate more than one share within this file, provided that the directories described within it are within the service's file system mounts.
Dictates the name of the directory in which the Samba daemons (smbd and nmbd) will place their locking files. This must be set to /var/cache/samba/sharename, where sharename varies based on the parameter specified in the Cluster Configuration Tool. Specification of a lock directory is required to allow a separate per-service instance of smbd and nmbd.
Dictates the name of the directory in which the Samba daemons (smbd and nmbd) will place their processor ID (pid) files. This must be set to /var/run/samba/sharename/, where sharename varies based on the parameter specified in the Cluster Configuration Tool tool. Specification of a pid directory is required to allow a separate per-service instance of smbd and nmbd.
This parameter must be set to yes to allow each smbd and nmbd pair to bind to the floating IP address associated with this clustered Samba service.
Specifies the IP address associated with the Samba service. If a netmask is specified within the service, this field appears like the following example: interfaces = 10.0.0.10/255.255.254.0
These parameters pertain to a specific Samba share.
By default, the share access permissions are conservatively set as non-writable. Tune this parameter according to your site-specific preferences.
Defaults to the first file system mount point specified within the service configuration. This should be adjusted to match the specific directory or subdirectory intended to be available as a share to clients.