This section provides steps that you should take to configure your Samba resources.
- Plan your Samba configuration. This includes the following:
º NetBIOS name(s) to be used
º The interfaces that will be protected and allowed access to the shares
º The file systems to be used for the Samba shares and thus protected
º The location of the lock and log directory (or directories)
Consideration should be given to the number of configuration files to be used and the type of configuration (Active/Standby vs. Active/Active). For example, if you have four Samba shares to protect, you could list all four shares in one configuration file, with the disadvantage that a failure of any one file system will cause the failover of the entire Samba hierarchy, including all four file shares. Alternatively, you could create four separate configuration files, each protecting one file share, which requires that four NetBIOS names be defined and managed.
- Setup your Samba configuration file(s) based on the plan made in step 1. This includes the required directives in the [global] section as well as those for the file and print shares to be used. See Configuring the LifeKeeper for Linux Samba Recovery Kit for a discussion of the global and share directives required for LifeKeeper Samba hierarchies.
- Create protected IP addresses under LifeKeeper, which will be used for client connections to the Samba server via the NetBIOS name. The protected IP address(es) should match the value(s) placed in the interface directive in the configuration file. (Refer to the LifeKeeper for Linux IP Recovery Kit Administration Guide for details on setting up IP resources.) Test the protected IP addresses by pinging them from all clients and other cluster servers. A protected IP resource for the local host (127.0.0.1) is not required.
- Start the Samba daemons and test client connections.
a. The commands to start the daemons are as follows:
s/nmbd –D –s ConfigurationFile
b. Use the Samba utility smbclient to test connections to the smbd daemon as follows. This should be done for each address defined in the interfaces directive.
smbclient –L netbios_name –U% -I Protected_IP_Address
c. Use nmblookup to test connection to the nmbd daemon process. This should be done for each broadcast address. Use the associated broadcast address for each address defined in the interfaces directive. (The broadcast address can be obtained by running ip addr show).
nmblookup –B broadcast_address netbios_name
- Stop the Samba daemons started in the previous step. This is accomplished via the kill command. Find the running daemon processes via the ps command and issue a kill pid which will cause them to exit.
- Create protected file system(s) under LifeKeeper that will host the Samba file and print shares as defined in the above steps. (Refer to Creating a file system resource hierarchy in the LifeKeeper for Linux Technical Documentation for information on creating a File System resource hierarchy.) This step may be skipped since File System resources will be created automatically when creating a Print Services resource or Samba resource. Replicated (SIOS DataKeeper) file system resources must be created before creating the Samba resource.
- Create directories on the protected file systems for the shares should one file system be used for multiple Samba shares.
- Create protected Print Services hierarchies under LifeKeeper, which will be used for client printing should any printer shares be defined in the configuration file.
- Create the Samba resource hierarchy in LifeKeeper and extend it to at least one backup server (see the LifeKeeper Configuration Tasks section below). The extend script will copy the Samba configuration file from the template server to the same location on the target server.
- On the primary server, test client connections to the shares that are protected by the Samba hierarchy which is in service. For instance, map the shared directory from a Windows client and ensure that it can access files on the share. Repeat the test for all servers in the cluster. You should also test your Samba resource by performing a manual switchover to a backup server. (See Testing Your Resource Hierarchy.)
- Automatic startup must be disabled at the time of system boot because Samba daemon protected by LifeKeeper is controlled by LifeKeeper.
Post your comment on this topic.