When activating and disabling OracleRAC, you must pay attention to the following points: 1. Check the shared device 2. Automatically Start RAC and check the related process 3. manually start RAC 4.
When starting and disabling Oracle RAC, you must pay attention to the following points: 1. Check the shared device 2. Automatically Start RAC and check the related process 3. manually start RAC 4.
Pay attention to the following points when starting and disabling Oracle RAC:
1. Check shared devices
Ii. Automatically Start RAC and check related processes
Iii. manually start RAC
4. Check the crs, ASM, and database logs during startup.
1. Check shared devices
Generally, OCFS2 or raw that stores OCR and Voting Disk are automatically started. If they are not started, RAC cannot be started.
1.1 If ocfs2 is used, check the ocfs2 status
/Etc/init. d/o2cb status
Before mounting, the/etc/init. d/o2cb status is displayed as Checking O2CB heartbeat: Not active.
Before formatting and mounting the file system, verify that O2CB is online on both nodes.
Activity because the file system has not been mounted. After mounting, it becomes active.
Mount-t ocfs2-o datavolume/dev/sdb1/u02/oradata/orcl
1, 2. If raw device is used.
[Root @ raw1 ~] # Cd/dev/raw/
[Root @ raw1 raw] # ls
Raw1 raw2
Or:
[Root @ raw1 init. d] #/etc/init. d/rawdevices status
/Dev/raw/raw1: bound to major 8, minor 17
/Dev/raw/raw2: bound to major 8, minor 18
1.3. Check ASM
/Etc/init. d/oracleasm listdisks
Ii. Automatically Start RAC and check related processes
The crs and other processes are automatically started when RAC is started:
[Root @ rac1 init. d] # ls-l/etc/init. d/init .*
-R-xr-x 1 root 1951 Feb 26 22: 38/etc/init. d/init. crs
-R-xr-x 1 root 4714 Feb 26 22: 38/etc/init. d/init. crsd
-R-xr-x 1 root 35394 Feb 26 22: 38/etc/init. d/init.css d
-R-xr-x 1 root 3190 Feb 26 22: 38/etc/init. d/init. evmd
Check the crs status:
Under normal circumstances, the process is online:
[Root @ raw1 bin] #./crs_stat-t
Name Type Target State Host
------------------------------------------------------------
Ora. raw. db application ONLINE raw1
Ora. raw. raw. cs application ONLINE raw1
Ora... aw1.srv application ONLINE raw1
Ora... aw2.srv application ONLINE raw2
Ora... w1.inst application ONLINE raw1
Ora... w2.inst application ONLINE raw2
Ora... SM1.asm application ONLINE raw1
Ora... W1.lsnr application ONLINE raw1
Ora. raw1.gsd application ONLINE raw1
Ora. raw1.ons application ONLINE raw1
Ora. raw1.vip application ONLINE raw1
Ora... SM2.asm application ONLINE raw2
Ora... W2.lsnr application ONLINE raw2
Ora. raw2.gsd application ONLINE raw2
Ora. raw2.ons application ONLINE raw2
Ora. raw2.vip application ONLINE raw2
If:
[Root @ rac2 bin] #./crs_stat-t
Name Type Target State Host
------------------------------------------------------------
Ora. rac. db application online unknown rac1
Ora... orcl. cs application online unknown rac1
Ora... ac1.srv application OFFLINE
Ora... ac2.srv application OFFLINE
Ora... c1.inst application online unknown rac1
Ora... c2.inst application online unknown rac2
Ora... SM1.asm application ONLINE rac1
Ora... C1.lsnr application online unknown rac1
Ora. rac1.gsd application online unknown rac1
Ora. rac1.ons application ONLINE rac1
Ora. rac1.vip application ONLINE rac1
Ora... SM2.asm application ONLINE rac2
Ora... C2.lsnr application online unknown rac2
Ora. rac2.gsd application online unknown rac2
Ora. rac2.ons application ONLINE rac2
Ora. rac2.vip application ONLINE rac2
Solution:
1. Use crs_stat to view all process information:
[Root @ rac2 bin] #./crs_stat
NAME = ora. rac. db
TYPE = application
TARGET = ONLINE
STATE = ONLINE on rac2
NAME = ora. rac1.LISTENER _ RAC1.lsnr
TYPE = application
TARGET = ONLINE
STATE = UNKNOWN on rac1
NAME = ora. rac1.gsd
TYPE = application
TARGET = ONLINE
STATE = UNKNOWN on rac1
NAME = ora. rac2.LISTENER _ RAC2.lsnr
TYPE = application
TARGET = ONLINE
STATE = UNKNOWN on rac2
......
2. For offline processes, we can start them manually.
[Root @ rac2 bin] #./crs_start ora. rac. orcl. rac1.srv
Attempting to start 'ora. rac. orcl. rac1.srv 'on member 'rac1'
Start of 'ora. rac. orcl. rac1.srv 'on member 'rac1' succeeded .,
3. For the UNKNOWN process, we can stop it first and start it.
[Root @ rac2 bin] #./crs_stop ora. rac2.gsd
Attempting to stop 'ora. rac2.gsd' on member 'rac2'
Stop of 'ora. rac2.gsd' on member 'rac2' succeeded.
[Root @ rac2 bin] #./crs_start ora. rac2.gsd
Attempting to start 'ora. rac2.gsd' on member 'rac2'
Start of 'ora. rac2.gsd' on member 'rac2' succeeded.
4. If the crs_stop process cannot end and the crs_start process cannot start, we have 2 methods to solve the problem:
4.1) The crs_stop-f parameter is used to turn off the services in the crs state of UNKNOWN, and then start all services with crs_start-f (with A-f parameter added. It must be executed on two nodes respectively;
[Oracle @ rac2 ~] $ Crs_start-f ora. ora9i. ora9i2. inst
Attempting to start 'ora. ora9i. ora9i2. inst 'on member 'rac2'
Start of 'ora. ora9i. ora9i2. inst 'on member 'rac2' succeeded.
[Oracle @ rac2 ~] $ Crs_stop-f ora. ora9i. db
Attempting to stop 'ora. ora9i. db' on member 'rac2'
Stop of 'ora. ora9i. db 'on member 'rac2' succeeded.
4.2) convert to the root user using/etc/init. d/init. crs stop first disables crs and then uses/etc/init. d/init. crs start is used to enable crs. After crs is enabled, a series of services of crs are automatically started. Note that this method must be executed on both nodes;
5. You can run the following command to start and close related processes at a time.
[Root @ rac2 bin] #./crs_stop-all
[Root @ rac2 bin] #./crs_start-all
Iii. manually start RAC
Generally, all services are automatically started each time a node is started. If you need to disable or start a node, as shown below:
Stop RAC:
Emctl stop dbconsole
Srvctl stop instance-d raw-I raw1
Srvctl stop instance-d raw-I raw2
Srvctl stop asm-n raw1
Srvctl stop asm-n raw2
Srvctl stop nodeapps-n raw1
Srvctl stop nodeapps-n raw2
Start RAC:
This is exactly the opposite of the above steps:
Srvctl start nodeapps-n raw1
Srvctl start nodeapps-n raw2
Srvctl start asm-n raw1
Srvctl start asm-n raw2
Srvctl start instance-d raw-I raw2
Srvctl start instance-d orcl-I raw1
Emctl start dbconsole
Use SRVCTL to start/stop all instances and Their enabled services.
Srvctl start database-d orcl
Srvctl stop database-d orcl
Note: CRS resources include GSD (Global Serveice Daemon), ONS (Oracle Notification Service), VIP, Database, Instance, and Service. These resources are divided into two categories:
GSD, ONS, VIP, and Listener belong to the Noteapps class.
Database, Instance, and Service belong to the Database-Related Resource class.
4. Check the crs, ASM, and database logs during startup:
Crs log:
[Oracle @ rac1 ~] $ Tail-f/u01/app/oracle/product/10.2.0/crs_1/log/rac1/alertrac1.log
[Oracle @ rac2 ~] $ Tail-f/u01/app/oracle/product/10.2.0/crs_1/log/rac2/alertrac2.log
ASM log:
[Oracle @ rac1 ~] $ Tail-f/u01/app/oracle/admin/+ ASM/bdump/alert _ + ASM1.log
[Oracle @ rac2 ~] $ Tail-f/u01/app/oracle/admin/+ ASM/bdump/alert _ + ASM2.log
Database Log:
[Oracle @ rac1 ~] $ Tail-f/u01/app/oracle/admin/ora9i/bdump/alert_ora9i1.log
[Oracle @ rac2 ~] $ Tail-f/u01/app/oracle/admin/ora9i/bdump/alert_ora9i2.log