linux cluster configuration

28
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.net http://onlineappsschool.com

Upload: abdo2008

Post on 05-Feb-2016

53 views

Category:

Documents


4 download

DESCRIPTION

Linux Cluster Configuration

TRANSCRIPT

Page 1: Linux Cluster Configuration

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

Page 2: Linux Cluster Configuration

#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

Page 3: Linux Cluster Configuration

#system-config-cluster

http://online-trainings.nethttp://onlineappsschool.com

Page 4: Linux Cluster Configuration

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

Page 5: Linux Cluster Configuration

http://online-trainings.nethttp://onlineappsschool.com

Page 6: Linux Cluster Configuration

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

Page 7: Linux Cluster Configuration

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

Page 8: Linux Cluster Configuration

Select “scsi reservation fencing” in drop down list and give a name;

http://online-trainings.nethttp://onlineappsschool.com

Page 9: Linux Cluster Configuration

Create a failover domain:

Select “failover Domains” tab and press tab and enter to give a name:

http://online-trainings.nethttp://onlineappsschool.com

Page 10: Linux Cluster Configuration

http://online-trainings.nethttp://onlineappsschool.com

Page 11: Linux Cluster Configuration

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

Page 12: Linux Cluster Configuration

Set the priority for the nodes to run the services and select restrict failover. Create the resources:

http://online-trainings.nethttp://onlineappsschool.com

Page 13: Linux Cluster Configuration

http://online-trainings.nethttp://onlineappsschool.com

Page 14: Linux Cluster Configuration

Create IP resource for virtual IP for cluster service:

http://online-trainings.nethttp://onlineappsschool.com

Page 15: Linux Cluster Configuration

Create gfs filesystem resource:

http://online-trainings.nethttp://onlineappsschool.com

Page 16: Linux Cluster Configuration

Create samba resource:

http://online-trainings.nethttp://onlineappsschool.com

Page 17: Linux Cluster Configuration

Create services for cluster:

http://online-trainings.nethttp://onlineappsschool.com

Page 18: Linux Cluster Configuration

Select “services” and press tab and enter: Add IP service:

http://online-trainings.nethttp://onlineappsschool.com

Page 19: Linux Cluster Configuration

Add resource to IP address service:

http://online-trainings.nethttp://onlineappsschool.com

Page 20: Linux Cluster Configuration

Select “add a shared resource to this service” button and select the ip resource from pop up window:

http://online-trainings.nethttp://onlineappsschool.com

Page 21: Linux Cluster Configuration

Select “relocate” and set the fail over domain and close: Follow the same steps for gfs and samba:

http://online-trainings.nethttp://onlineappsschool.com

Page 22: Linux Cluster Configuration

http://online-trainings.nethttp://onlineappsschool.com

Page 23: Linux Cluster Configuration

http://online-trainings.nethttp://onlineappsschool.com

Page 24: Linux Cluster Configuration

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

Page 25: Linux Cluster Configuration

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

Page 26: Linux Cluster Configuration

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

Page 27: Linux Cluster Configuration

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

Page 28: Linux Cluster Configuration

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