You are on page 1of 28

Configuration of Red Hat fails over Cluster for SAMBA service


2 red hat nodes
Open Filer for shared storage

All machines should be in private LAN and physical LAN.( should have two NIC cards)
All /etc/hosts file should have the IP’s and hostnames updated like below:
dssnode1 dssnode1
dssnode2 dssnode2


Configure Open filer with minimum two disks and export to private network (one for quorum disk and one for shared storage)
I use this link to configure
Install iscsi initiator on two redhat nodes and follow the below steps on both nodes
#yum install iscsi-initiator-utils
Start iscsi
#service iscsi start
Scan for iscsi disks

#iscsiadm -m discovery -t sendtargets -p <open filer IP>
Restart the iscsi
#service iscsi restart
Check the disks
#fdisk -l
Create quorum disk on primary node
#mkqdisk -c /dev/sdb -l quorum
Create cluster storage disk
#mkfs.gfs -p lock_dlm -t <cluster name>:<cluster storage name> -j 4 /dev/sdb
Note: do not use gfs2 as it has auto mount issues
Create a mount point on nodes to mount the gfs file system
#mkdir /cluvol
Open cluster configuration GUI tool

#system-config-cluster .

Click on “Create New Configuration” button to create a new cluster Give a cluster name and update quorum disk details and fill the program field with Openfiler IP as mentioned above .net http://onlineappsschool.

net http://onlineappsschool. .

Select Cluster node tab to add a node to cluster and press tab and enter to get a window to specify node name: .

Add nodes other nodes in the same http://onlineappsschool. Add fence to the cluster: Select “Fence device” tab and press tab and enter to add fencing to cluster: .

net http://onlineappsschool. .Select “scsi reservation fencing” in drop down list and give a name.

com .Create a failover domain: Select “failover Domains” tab and press tab and enter to give a name: http://onlineappsschool.

net http://onlineappsschool. .

com .Add node to failover domain: Select failover domain and press tab and enter and choose nodes in the “available cluster nodes” drop down list: http://onlineappsschool.

Create the resources: http://onlineappsschool.Set the priority for the nodes to run the services and select restrict .

net http://onlineappsschool. .

Create IP resource for virtual IP for cluster service: .

net .Create gfs filesystem resource: http://online-trainings.

net .Create samba resource: http://online-trainings.

com .net http://onlineappsschool.Create services for cluster: http://online-trainings.

net http://onlineappsschool.Select “services” and press tab and enter: Add IP service: .

Add resource to IP address service: .

net .Select “add a shared resource to this service” button and select the ip resource from pop up window: http://online-trainings.

Select “relocate” and set the fail over domain and close: Follow the same steps for gfs and samba: .net http://onlineappsschool. .

com . http://onlineappsschool.

Select file and click on save button: Then exit the window and start the services in order shown below: http://online-trainings.Finally we have to save the .

Then again open the cluster manager tool: http://onlineappsschool.Note: services should be started in the order on all the .

net .Now we have to save the configuration on all the nodes for that we need to click on “send to cluster” button it will sink the cluster configuration with all the nodes: http://online-trainings.

<samba service name> is the conf file .conf.Then you can open cluster manager tab and see the running services: Finally configure the samba for cluster the config file will be in /etc/samba directory with name : “ http://onlineappsschool.<samba service name>” configure samba smb.conf.

conf. #cat /etc/samba/ http://onlineappsschool.samba interfaces = <cluster virtual ip> local master = no domain master= no password server = none preferred master = no guest ok = yes guest account = root security = SHARE dns proxy = no [cluvol] comment = HA browsable = yes writable = yes public = yes path = /cluvol guest ok = yes create mask = 07777 #smbpasswd -a root restart the cluster samba service in console copy the smb conf file to all nodes Check the failover .Note: the below samba parameters for default configuration just to check the cluster service. You can have your custom parameters for security.