Configure serviceguard for pre-Installation of RAC

Source: Internet
Author: User

1. Modify the/etc/lvmrc file as the root user

To make a shared VG, you must first disable its automatic active setting.
You must ensure that these VG are activated when SG is started.
Back up the/etc/lvmrc File
# Cp/etc/lvmrc/etc/lvmrc_orig
Modify the/etc/lvmrc File
From:
Auto_vg_activate = 1
To:
Auto_vg_activate = 0

Add the custom_vg_activation module to the/etc/lvmrc file,
This parameter is set for a non-shared VG. (Or not) custom_vg_activation ()
{
# E.g./sbin/vgchange-a Y-S
# Parallel_vg_sync "/dev/vg00/dev/vg01"
# Parallel_vg_sync "/dev/vg02/dev/vg03"
/Sbin/vgchange-A y vg00
/Sbin/vgchange-A y vg01
/Sbin/vgchange-A y vg02
/Sbin/vgchange-A y vg03
Return 0
}

2. Create a shared logical volume group

On the master node:
# Initialize PV
Pvcreate-F/dev/rdsk/c0t12d0
# Add a directory for vg in the/dev directory
Mkdir/dev/vg_ops
# The major number must be 64, and the minor number is a hexadecimal number of 2, which is uniquely identified.
Mknod/dev/vg_ops/group C 64 0 0x060000

# Create VG
Vgcreate/dev/vg_ops/dev/DSK/c0t12d0

# Activate VG
Vgchange-A y vg_ops

# Create an LV
Lvcreate-N p901_control_01.ctl-l 110/dev/vg_ops
Lvcreate-N p901_control_02.ctl-l 110/dev/vg_ops
Lvcreate-N p901_control_03.ctl-l 110/dev/vg_ops
Lvcreate-N p901_system_01.dbf-L 400/dev/vg_ops
Lvcreate-N p901_log1_01.log-L 120/dev/vg_ops
Lvcreate-N p901_log1_02.log-L 120/dev/vg_ops
Lvcreate-N p901_log1_03.log-L 120/dev/vg_ops
Lvcreate-N p901_log2_01.log-L 120/dev/vg_ops
Lvcreate-N p901_log2_02.log-L 120/dev/vg_ops
Lvcreate-N p901_log2_03.log-L 120/dev/vg_ops
Lvcreate-N p90?spfile1.dbf-L 5/dev/vg_ops
Lvcreate-N p901_users_01.dbf-L 120/dev/vg_ops
Lvcreate-N p901_temp_01.dbf-L 100/dev/vg_ops
Lvcreate-N p901_undotbs_01.dbf-l 312/dev/vg_ops
Lvcreate-N p901_undotbs_02.dbf-l 312/dev/vg_ops
Lvcreate-N p901_example_01.dbf-L 160/dev/vg_ops
Lvcreate-N p901_cwmlite_01.dbf-L 100/dev/vg_ops
Lvcreate-N p901_indx_01.dbf-l 70/dev/vg_ops
Lvcreate-N p901_tools_01.dbf-l 20/dev/vg_ops
Lvcreate-N p901_drsys_01.dbf-L 90/dev/vg_ops

# Deactivate VG
Vgchange-a n vg_ops

# Create an LV Map File
Vgexport-v-s-p-M/tmp/vg_ops.map/dev/vg_ops

# Copy the map file to another node
RCP/tmp/vg_ops.map ow.hp2:/tmp/vg_ops.mapon the other nodes:
Mkdir/dev/vg_ops
Mknod/dev/vg_ops/group C 64 0 0x060000

# Create VG and LV on other nodes
Vgimport-v-S-M/tmp/vg_ops.map/dev/vg_ops

# Configure the permissions and owner of the corresponding VG and LV on all nodes
# Chown ORACLE: DBA/dev/vg_ops/R *
# Remsh nodehp2 chown ORACLE: DBA/dev/vg_ops/R *
# Chmod 777/dev/vg_ops
# Remsh nodehp2 chmod 777/dev/vg_ops
# Chmod 660/dev/vg_ops/R *
# Remsh nodehp2 chmod 660/dev/vg_ops/R *

Note: When creating VG, pay attention to the uniqueness of minor number. The following commands are commonly used:

# Find/dev-name group-exec LS-l {};
CrW ------- 1 root sys 64 0x060000 May 6/dev/vg_ops/group
In this example, "vg_ops" is "0x060000", so "0x060000" cannot be used to create other VG, valid minor numbers ranges from 0x010000 to 0xff0000 ".

 

 

3. Installation of cluster software serviceguard

Installed by the supplier. Oracle 10gr2 RAC requires that the serviceguard extension for RAC version must be a.11.16.00 or later, and also include a.11.16.00.

 

4. Plan the Cluster Environment

1) configure the cluster:

Use cmquerycl to create a cluster configuration file

The cmquerycl command must be executed on the master node.
# Cmquerycl-v-C/etc/cmcluster/cmclconf. ascii-N nodehp1-N nodehp2

2) modify the cluster configuration file

Cluster_name # example nodehp
First_cluster_lock #/dev/vg_ops
First_cluster_pv #/dev/DSK/c0t12d0
Ops_volume_group #/dev/vg_ops
Dlm_enabled # No
Gms_enabled # No
First_cluster_lock, first_cluster_pv = cluster lock volume group and disk as voting purposes. The voting VG and the disk must be accessible to all nodes (shared VG can be used ). If a node is dumped, the VG processing is required.
Ops_volume_group = all shared VG
Dlm_enabled and gms_enabled = No (no after 8.1.7)

3) use the cmcheckconf command to verify the cluster configuration file
# Cmcheckconf-v-C/etc/cmcluster/cmclconf. ASCII

4) use vgchange to activate the lock volume group
# Vgchange-A y vg_ops

5) Use cmapplyconf to copy the cluster configuration file to all nodes.
# Cmapplyconf-v-C/etc/cmcluster/cmclconf. ASCII

6) Use vgchange to deactivate the lock volume group
# Vgchange-a n vg_ops

 

 

5. Basic cluster management

1) Start the cluster:
# Cmruncl

2) use vgchange to set up shared VG on the master node
# Vgchange-s y-c y vg_ops

3) Use vgchange to activate the shared VG on each node.
# Vgchange-A s vg_ops
# Remsh nodehp2/usr/sbin/vgchange-A s vg_ops

4) use cmhaltcl to close the cluster or use cmhaltnode to remove nodes from the cluster.
# Cmhaltnode

5) Use cmrunnode to add nodes to the Cluster
# Cmrunnode

6) You can use cmhaltpkg, cmrunpkg, and cmmodpkg to manage the PKG of a cluster. You can also use it to restore a cluster node. For more information, see the online manual.

 

 

6. log files for Cluster
/Var/adm/syslog. log contains the system information of HP serviceguard extension for RAC

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.