SUSE Linux HA dual-host Setup 1. Preparations 1. server network planning l the host must have at least two NICs available (one Nic is used as the heartbeat Nic ); l connect the two hosts directly with a network cable (note that the location of the master and slave servers must be close), and the other Nic is connected to the switch; l three IP addresses, 2 host addresses and 1 floating IP address, all of which are in the same CIDR block. 2. Install the Operating System. Prepare the root account and password. l. Install the operating system on the server. Preferably, install a new system, you need to have a graphical interface l prepare the root account password 3 connect to the storage l connect the two hosts to the storage, and ensure that the two hosts can correctly identify the hard disk on the storage. L ensure that all application-related resource directories to be switched are stored. 4 prepare the HA software CD and purchase the suselinux enterprise high availability software license and obtain the sleha software, and system installation disk 5 other dual-machine configuration information preparation Server Model: Server Configuration: Operating System and version: storage model: Server application: language of the Installation server: requirements for operating system partition: floating IP Address: Master/Slave information table: HOST 1: Host Name heartbeat IP192.168.200.10 Server IP business type shared disk mount point service start and stop method host 2: host Name heartbeat IP192.168.200.20 Server IP business type shared disk mount point service start and stop method 2. Verify content before operation 1. Stop Application 2. Check whether the document has: 1) dual-machine configuration operation DOCUMENTATION 2) Dual-machine preparation work documentation 3) master-slave machine ILO information 3. Heartbeat line connection 1) connection heartbeat line, record the network adapter location. 4. Connect the primary and standby hosts to the storage. Check whether the WWN Number of the appropriate storage end is found on the host operating system. No consistent: callcenter-1 :~ # Cd/sys/class/fc_host/callcenter-1:/sys/class/fc_host # pwd/sys/class/fc_hostcallcenter-1:/sys/class/fc_host # lshost3 host4callcenter-1: /sys/class/fc_host # more host3/port_name0x500143800631c422callcenter-1:/sys/class/fc_host # more host4/port_name0x500143800631ca1a 3. Operating System Level 1. the hosts file, including the IP addresses configured on the master and slave machines, must be synchronized. The uniform host file/etc/HOSTNAME must also be consistent with the current hostname. Note: you must first connect to the heartbeat line and configure the heartbeat IP address to synchronize and configure the hosts file. 2. modify oracle user information, user ID and group ID Node 1: callcenter-1 :~ # Id oracleuid = 502 (oracle) gid = 511 (oinstall) groups = 512 (dba), 514 (asmdba), 516 (alias), 511 (oinstall) node 2: srv-callcenter-2: ~ # Id oracleuid = 105 (oracle) gid = 108 (oinstall) groups = 109 (dba), 108 (oinstall) Modify information: srv-callcenter-2 :~ # Groupmod-g 511 oinstallsrv-callcenter-2 :~ # Groupmod-g 512 dbasrv-callcenter-2 :~ # Groupadd-g 514 asmdbasrv-callcenter-2 :~ # Groupadd-g 516 opersrv-callcenter-2 :~ # Usermod-u 502-g oinstall-G dba, asmdba, guest oraclesrv-callcenter-2 :~ # Id oracleuid = 502 (oracle) gid = 511 (oinstall) groups = 512 (dba), 514 (asmdba), 516 (alias), 511 (oinstall) srv-callcenter-2 :~ #3. copy all oracle-related files and directories on the host to the same location on the slave machine, for example:/etc/profile. d/oracle. sh,/opt/oracle directory and file, $ ORACLE_BASE/admin sid folder, $ ORACLE_HOME/dbs/spfile [sid]. ora 4. run two scripts/oracle/product/10.2/db_1/root. sh/opt/oracle/oraInventory/orainstRoot. sh 5. The floating IP address is directly used in the monitoring and tns configuration listening; TNS needs to be configured. 6. Modify the file partition table to be a standalone production system. If the oracle partition is automatically mounted, comment out it. 7. oracle-related content excluded from startup items: chkconfig -- l | grep oraoracle 0: off 1: off 2: off 3: off 4: off 5: off 6: offoracle_script.sh 0: off 1: off 2: off 3: off 4: off 5: off 6: off8, multi-path startup and lvm filtering 1) Make sure that the multi-path service is started 2) lvm filter/etc/lvm. conf filter = ["a |/dev/cciss /. * | "," a |/dev/disk/by-id/dm-uuid -. * mpath -. * | "," r |. * | "] 9. Notes related to SP2 version upgrade lvm. conf may change. The solution is to stop the application, shut down the application, unplug the fiber optic cable, and then perform the upgrade at startup. Important production systems are upgraded using CDs. Do not use zypper. 4. Dual-host Layer 1. Install HA Software 2. Configure heartbeat yast2 cluster to configure heartbeat IP and multicast address 3. Configure HA components from the configured dual-host system, use crm configure to enter the command line, use edit to view the configuration information, and then copy the content directly. There are already configuration documents, but it is too troublesome to update so many images in the blog. The detailed configuration steps of command line configuration will be uploaded after I finish the test. 4. Switch the detailed configuration steps of the test and upload it after the test is completed. 5. Detailed configuration steps for common problems and troubleshooting methods, and upload them after I finish the test. Oracle listeners in suse dual-machine systems cannot survive or survive. The solution background is as follows: the original operating system is suse linux 11 SP1. The dual-machine system runs normally, and oracle listeners can start and stop normally; upgrade the operating system to version 11SP2, and upgrade the HA component to the corresponding version of SP2. oracle listeners cannot survive, and some file systems are abnormal. The solution is as follows: 1. the listener and oracle service start time is too long, which is extended. Primitive oralsnr ocf: heartbeat: oralsnr \ params sid = "ebai" \ operations $ id = "oralsnr-operations" \ op monitor interval = "20" timeout = "120" \ op start interval = "0" timeout = "180" 2. How to modify the host name in the/etc/hosts/etc/HOSTNAMEsuse file: /etc/HOSTNAME: restart the server to change the host name under redhat:/etc/sysconfig/network. restart the service network restart to take effect immediately. 3. Boot items: chkconfig -- l | grep oraoracle 0: off 1: off 2: off 3: off 4: off 5: off 6: offorac Le_script.sh 0: off 1: off 2: off 3: off 4: off 5: off 6: off 4. Multi-path startup and lvm filtering 4.1 ensure that the multi-path service starts 4.2 lvm filtering/etc/lvm/vi lvm for startup. conf filter = ["a |/dev/cciss /. * | "," a |/dev/disk/by-id/dm-uuid -. * mpath -. * | "," r |. * | "] 5. Notes related to SP2 version upgrade lvm. conf may change. The solution is to stop the application, shut down the application, unplug the fiber optic cable, and then perform the upgrade at startup. Important production systems are upgraded using CDs. Do not use zypper.