Chapter 7: Online configuration of service groups (graphical) Chapter 8: offline Service Group Configuration

Source: Internet
Author: User
Tags failover

Chapter 7, view http://hi.baidu.com/nitar/blog/item/b1a0b828e1f5f2f299250aa9.html

Chapter 8: offline Service Group ConfigurationObjectives:
Offline configuration process: new cluster
Offline configuration process: cluster already exists
Use the designed configuration Worksheet
Use offline configuration tools to add a Service Group
Solve common configuration errors
Test Service Group Offline configuration process: new cluster-No Service Running
Stop VCs
Stop VCs on all systems and make sure there is no possibility that another System Manager is modifying the cluster configuration when you modify the main. cf file.
Edit the configuration file
You must select a system to modify the main. cf file. You can select any system, but you must first start VCs on this system
Verify the Configuration File Syntax
Run the hacf command to verify the syntax of the Main. CF and types. Cf files in the/etc/vrtsvcs/CONF/config directory after you modify them. If the configuration file has an error, VCs cannot be started.
Note: The hacf command only recognizes syntax errors and does not check configuration errors.
Start VCs on the system with the modified configuration file
Start VCs with the modified main. cf file for the first time and verify the VCs
Verify that VCs is running
Verify that the VCs has been started before starting VCs on other systems
Start Other System
After running VCs on the first system, start the VCs on all systems. If you cannot bring VCs to the running state on all systems, View "solving common offline configuration problems" Configuration File example:
Include "types. Cf"
Cluster VCs (
Username = {admin = xxxxxxxxxxxxxx}
Clusteraddress = "192.168.27.51"
Administrators = {admin}
Counterinterval = 5
) System S1 (
)
System S2 (
) Group websg (
Systemlist = {S1 = 1, S2 = 2}
Autostartlist = {S1}
) Diskgroup webdg (
Critical = 0
Diskgroup = webdg
) IP webip (
Critical = 0
Device = qfe1
Address = "10.10.21.200"
) Mount webmount (
Critical = 0
Mountpoint = "/Web"
Blockdevice = "/dev/DSK/webdg/webvol"
Fstype = vxfs
) Nic webnic (
Critical = 0
Device = qfe1
) Process webprocess (
Critical = 0
Pathname = "/bin/KSh"
Arguments = "/sbin/tomcat") Volume webvol (
Critical = 0
Volume = webvol
Diskgroup = webdg
) Webprocess requires webip
Webprocess requires webmount
Webmount requires webvol
Webvol requires webdg
Webip requires webnic Offline configuration process: Cluster (Part 1) already exists)
1. Disable Configuration
# Haconf-dump-makero
2. Enter the configuration directory.
# Cd/etc/vrtsvcs/CONF/config
3. Create a working directory
# Mkdir stage
4. Copy the main. CF and types. Cf files.
# Cp main. Cf types. Cf stage
5. Go to the working directory
# Cd stage
6. Edit main. Cf.
# Vi main. cf
7. Verify the Configuration File Syntax
# Hacf-verify Cluster (Part 2) already exists: restart VCs
Note: If you modify an existing service group, first freeze the service group to prevent failover between groups. This simple fixed resource configuration-the Service Group will not switch between systems
1. Stop VCs and leave the service running
# Hastop-all-Force
2. Copy the test main. cf file.
# Cp main. Cf ../Main. cf
3. Start VCs on this system
# Hastart
4. Verify that had is running
# Hastartus-sum
5. Start VCs on other systems
# Hastart-stale A complete configuration file
Note: you cannot include comment lines in the main. cf file. What you see is that the resource relationship is displayed through VCs, and any rows with a // are removed when VCs is started. Offline Configuration tool: edit the configuration file
As a good habit, copy the main. CF and types. Cf files to the staging directory before they are modified. This ensures that you prevent more than one system administrator from simultaneously modifying the configuration file.
You can use any text editor to modify the main. cf or types. cf file. Generally, the VI editor is used on UNIX platforms. Configure and test using the VCs Simulator
You can use the VCs simulator to create and modify a copy of the VCs configuration file and load it to the directory specified by the simulator. You can also test new or modified configurations and put the test configuration file in the/etc/vrtsvcs/CONF/config directory. The simulator ensures that your configuration file does not contain syntax errors and is easily introduced when you manually edit the file. When you complete the configuration, you can copy the file to the standard configuration directory and restart VCs to build the configuration in the memory of the cluster system. Solve common configuration errors
If you do not follow the recommended offline configuration process below, two common problems will occur:
1. When you start VCs because the main. cf file has syntax errors, all the systems enter a waiting state.
2. You start the cluster from the wrong system, and an old configuration is still in the memory. Solution to 1st problems:
If all the systems are in the stale_admin_wait or admin_wait status
1. Run hacf-verify dir to verify the line with incorrect syntax
2. Check the syntax in the main. cf file.
3. Verify the configuration
4. Force the system to execute a local build (hasys-force sys_name)
5. Wait for all systems to execute remote automatic setup and verification system running Solution to 2nd problems:
1. if enabled, disable the configuration.
2. Stop VCs and keep applications running on all systems
3. Copy the main. Cf. Previous file to overwrite the main. cf file.
4. Verify the configuration
5. Use the hastart command to start VCs on this system
6. Run the hastatus command to verify that VCs is running.
7. Start VCs stale on all other systems and ensure they are waiting to establish their configuration files from the first system Test Service Group
Bring the service online. If the switch is successful, test the switch. If the switch fails, rectify the fault. If the switch is successful, set the appropriate critical attribute to test the Failover. If the switch fails, check the log lock failure before testing the switch. from: http://hi.baidu.com/nitar/blog/item/b3a03c081062e4286b60fbaa.html

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.