Sunday, March 15, 2009

How to install Redhat cluster

How to install Redhat cluster

1. yum groupinstall -y “Cluster Storage” “Clustering”

2. yum install -y iscsi-initiator-utils isns-utils

3. chkconfig iscsi on
chkconfig iscsid on

4. The two “rhel-cluster-nodeX” systems have two NICs, one for production and one for HighAvailability check.

5. Add hostnames of both hosts to /etc/hosts file on all nodes.

6. #lsscsi should show the shared storage device, if not rescan the devices.
echo "- - -" > /sys/class/scsi_host/host0/scan

7. Suppose the device is /dev/sdb
#pvcreate /dev/sdb
#vgcreate vg1 /dev/sdb
lvcreate -l 10239 -n lv0 vg1

8. Create the GFS file system with dlm lock for max 8 hosts
# gfs_mkfs -p lock_dlm -t rhel-cluster:storage1 -j 8 /dev/vg1/lv0

9. To administer Red Hat Clusters with Conga, run luci and ricci as follows :
service luci start
service ricci start

10. On both systems, initialize the luci server using the luci_admin init command.
service luci stop
luci_admin init
This command create the ‘admin’ user and his password, for doing so follow on screen instruction, and check for an output as the following :
The admin password has been successfully set.
Generating SSL certificates…
The luci server has been successfully initialized
You must restart the luci server for changes to take effect, run the following to do it :

11. # service luci restart

12. Now start following cluster services

# service rgmanager start
# service cman start

13. Edit the fstab file as below.
/dev/vg1/lv0 /data gfs defaults,acl 0 0

14. Point your web browser to https://rhel-cluster-node1:8084 to access luci

15. As administrator of luci, select the cluster tab.
Click Create a New Cluster.
At the Cluster Name text box, enter cluster name “rhel-cluster.
Add the node name and password for each cluster node.
Click Submit. Clicking Submit causes the following actions:

a. Cluster software packages to be downloaded onto each cluster node.
b. Cluster software to be installed onto each cluster node.
c. Cluster configuration file to be created and propagated to each node in the cluster.
d. Starting the cluster.
A progress page shows the progress of those actions for each node in the cluster.
When the process of creating a new cluster is complete, a page is displayed providing a
configuration interface for the newly created cluster.

16. Managing your newly created cluster you can ad resources.
Add a resource, choose IP Address and use

17. Create a service named “cluster”, add the resource “IP Address” you had created before,
check “Automatically start this service”
check “Run exclusive”
choose “Recovery policy” as “Relocate”
Save the service.

18. If the service created give no errors, enable it, and try to start it on one cluster node.

19. The Cluster configuration file would be /etc/cluster/cluster.conf

No comments:

Post a Comment