linux cluster configuration
DESCRIPTION
Linux Cluster ConfigurationTRANSCRIPT
Configuration of Red Hat fails over Cluster for SAMBA service Requirements:
• 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: #Node1 172.20.129.178 dssnode1.tnsad.com dssnode1 192.168.100.2 dssnode1.cluster1.com dssnode1 #Node2 172.20.130.96 dssnode2.tnsad.com dssnode2 192.168.100.5 dssnode2.cluster1.com dssnode2 #Openfiler 172.20.130.103 dssop.tnsad.com dssop 192.168.100.4 dssop.cluster1.com dssop 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 http://www.techhead.co.uk/how-to-configure-openfiler-v23-iscsi-storage-for-use-with-vmware-esx 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
http://online-trainings.nethttp://onlineappsschool.com
#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
http://online-trainings.nethttp://onlineappsschool.com
#system-config-cluster
http://online-trainings.nethttp://onlineappsschool.com
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
http://online-trainings.nethttp://onlineappsschool.com
http://online-trainings.nethttp://onlineappsschool.com
Select Cluster node tab to add a node to cluster and press tab and enter to get a window to specify node name:
http://online-trainings.nethttp://onlineappsschool.com
Add nodes other nodes in the same way; Add fence to the cluster:
Select “Fence device” tab and press tab and enter to add fencing to cluster:
http://online-trainings.nethttp://onlineappsschool.com
Select “scsi reservation fencing” in drop down list and give a name;
http://online-trainings.nethttp://onlineappsschool.com
Create a failover domain:
Select “failover Domains” tab and press tab and enter to give a name:
http://online-trainings.nethttp://onlineappsschool.com
http://online-trainings.nethttp://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://online-trainings.nethttp://onlineappsschool.com
Set the priority for the nodes to run the services and select restrict failover. Create the resources:
http://online-trainings.nethttp://onlineappsschool.com
http://online-trainings.nethttp://onlineappsschool.com
Create IP resource for virtual IP for cluster service:
http://online-trainings.nethttp://onlineappsschool.com
Create gfs filesystem resource:
http://online-trainings.nethttp://onlineappsschool.com
Create samba resource:
http://online-trainings.nethttp://onlineappsschool.com
Create services for cluster:
http://online-trainings.nethttp://onlineappsschool.com
Select “services” and press tab and enter: Add IP service:
http://online-trainings.nethttp://onlineappsschool.com
Add resource to IP address service:
http://online-trainings.nethttp://onlineappsschool.com
Select “add a shared resource to this service” button and select the ip resource from pop up window:
http://online-trainings.nethttp://onlineappsschool.com
Select “relocate” and set the fail over domain and close: Follow the same steps for gfs and samba:
http://online-trainings.nethttp://onlineappsschool.com
http://online-trainings.nethttp://onlineappsschool.com
http://online-trainings.nethttp://onlineappsschool.com
Finally we have to save the configuration. Select file and click on save button:
Then exit the window and start the services in order shown below:
http://online-trainings.nethttp://onlineappsschool.com
Note: services should be started in the order on all the nodes. Then again open the cluster manager tool:
http://online-trainings.nethttp://onlineappsschool.com
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.nethttp://onlineappsschool.com
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 : “smb.conf.<samba service name>” configure samba smb.conf.<samba service name> is the conf file
http://online-trainings.nethttp://onlineappsschool.com
Note: the below samba parameters for default configuration just to check the cluster service. You can have your custom parameters for security. #cat /etc/samba/smb.conf.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
http://online-trainings.nethttp://onlineappsschool.com