Http://blog168.chinaunix.net/space.php? Uid = 9793706 & Do = Blog & id = 1642178
HP-UX cluster management
Cluster
Computers in a node cluster
Package Resource Group (including: Shared VG volume group, floating IP address, lock disk, app application)
High-availability cluster implementation functions:
Multiple nodes run multiple applications at the same time
Each application uses a shared volume group and executes a program.
Each application uses a floating IP address to provide external services.
When a node fails, the cluster software switches the resource group (IP address and VG) on the node to the machine normally running in the cluster.
Execute the app startup script on the machine that switched to start the service, and use the floating IP address to continue providing the service.
Take the 2-node running DB2 and was applications as an example:
Two midrange computers
Create the same DB2 user and password
Install DB2 and was software in the same directory
Start/stop 4 scripts of DB2/was on two small machines/HA/decentralization
Resource Group 1:
IP1 floating IP Address: used by DB2
Db2vg shared volume group stores database and database instance Directories
DB2 applications
Resource Group 2:
Ip2 floating IP: used by was
Wasvg shared volume group stores the temporary application directory, was overview
Was Application
At ordinary times, two resource groups run on one machine, a runs DB2, and B runs was.
When machine a encounters a problem,
Execute the DB2 stop script under/ha
File System on umount db2vg
Switch db2vg and IP1 to machine B
Mount the file system on db2vg on machine B
Run the DB2 STARTUP script under/ha
B. perform similar operations when a problem occurs.
Run the was stop script in/ha
File System on umount wasvg
Switch wasvg and ip2 to server.
Mount the file system on wasvg on machine
Run the was STARTUP script under/ha
Related commands:
Cmviewconf # view Cluster details, including cluster name, node name, fixed IP address, and node script
Cmviewcl # view the current running status of the Cluster
Cmruncl # Start the Cluster
Cmhaltcl-F # Stop a cluster
Cmrunnode # Start a node
Cmhaltnode # Stop a node
Cmrunpkg-N node PKG # Start A Resource Group on the node
Cmhaltpkg-N node PKG # Stop a Resource Group
Cmmodpkg-e-n node PKG # set to allow-E or-D to disable Resource Group Switching
PKG switching is caused by process failure. After switching from node1 to node2, the PKG running on node2 is set to not allow switching,
After node1 is repaired, run cmmodpkg-e-n node2 PKG on node2 to allow switchover, and then run cmrunpkg on node1.
Command memo:
Swinstall-S/tmp/xxx # Install and upgrade the software
Vgexport
Vgimport
Vgdisplay
Vgdisplay vgn
Vgdisplay-V vgn
Lvdisplay LVN
Lvdisplay-V LVN
Lvextend-L 10g/dev/xxx # Extend LV
Extendfs/dev/xxx # extended FS (umount required, restart to a single user)