RAC问题描述及解决:
[root@db-2 bin]# ./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....T1.inst application ONLINE OFFLINE db-1
ora....T2.inst application ONLINE ONLINE db-2
ora.EXT.db application ONLINE ONLINE db-2
ora....SM1.asm application ONLINE ONLINE db-1
ora....-1.lsnr application ONLINE ONLINE db-1
ora.db-1.gsd application ONLINE ONLINE db-1
ora.db-1.ons application ONLINE ONLINE db-1
ora.db-1.vip application ONLINE ONLINE db-1
ora....SM2.asm application ONLINE ONLINE db-2
ora....-2.lsnr application ONLINE ONLINE db-2
ora.db-2.gsd application ONLINE ONLINE db-2
ora.db-2.ons application ONLINE ONLINE db-2
ora.db-2.vip application ONLINE ONLINE db-2
手工重起db-1上的instance,报错误如下:
[oracle@db-1 udump]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.4.0 - Production on Mon Jun 21 15:09:43 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup
ORA-27102: out of memory
Linux-x86_64 Error: 28: No space left on device
服务器内存为32G
[oracle@db-1 ~]$ free
total used free shared buffers cached
Mem: 32939184 9001480 23937704 0 69192 6087732
-/+ buffers/cache: 2844556 30094628
Swap: 4192924 0 4192924
[oracle@db-1 ~]$
[oracle@db-1 udump]$ more ext1_ora_10492.trc
/opt/oracle/admin/EXT/udump/ext1_ora_10492.trc
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
ORACLE_HOME = /opt/oracle/product/10.2.0/db_1
System name: Linux
Node name: db-1
Release: 2.6.9-89.ELsmp
Version: #1 SMP Mon Apr 20 10:33:05 EDT 2009
Machine: x86_64
Instance name: EXT1
Redo thread mounted by this instance: 0
Oracle process number: 0
Unix process pid: 10492, image: oracle@db-1
Number of resource hash buckets is 15029
skgm warning: ENOSPC creating segment of size 0000000216200000
fix shm parameters in /etc/system or equivalent
[root@db-1 log]# vi /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.shmall = 2097152
kernel.shmmax = 34359738368
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
kernel.core_uses_pid = 1
相关定义:
kernel.shmall 参数是控制共享内存页数 。Linux 共享内存页大小为4KB, 共享内
存段的大小都是共享内存页大小的整数倍。一个共享内存段的最大大小是16G,那么需
要共享内存页数是 16GB/4KB=16777216KB/4KB=4194304 (页),也就是64Bit 系统下
16GB 物理内存,设置 kernel.shmall = 4194304 才符合要求(几乎是原来设置2097152
的两倍)。这时可以将shmmax 参数调整到 16G 了,同时可以修改SGA_MAX_SIZE 和
SGA_TARGET 为 12G(您想设置的SGA 最大大小,当然也可以是2G~14G 等,还要协调PGA
参数及OS 等其他内存使用,不能设置太满,比如16G)。
修改相关内核参数:
kernel.shmall = 2097152 -->kernel.shmall = 8097152
[root@db-1 log]# sysctl -p
.........
kernel.shmall = 8097152
kernel.shmmax = 34359738368
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
kernel.core_uses_pid = 1
[oracle@db-1 ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.4.0 - Production on Mon Jun 21 15:17:29 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 8959033344 bytes
Fixed Size 2098368 bytes
Variable Size 2650803008 bytes
Database Buffers 6291456000 bytes
Redo Buffers 14675968 bytes
Database mounted.
Database opened.
[root@db-2 bin]# ./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....T1.inst application ONLINE ONLINE db-1
ora....T2.inst application ONLINE ONLINE db-2
ora.EXT.db application ONLINE ONLINE db-2
ora....SM1.asm application ONLINE ONLINE db-1
ora....-1.lsnr application ONLINE ONLINE db-1
ora.db-1.gsd application ONLINE ONLINE db-1
ora.db-1.ons application ONLINE ONLINE db-1
ora.db-1.vip application ONLINE ONLINE db-1
ora....SM2.asm application ONLINE ONLINE db-2
ora....-2.lsnr application ONLINE ONLINE db-2
ora.db-2.gsd application ONLINE ONLINE db-2
ora.db-2.ons application ONLINE ONLINE db-2
ora.db-2.vip application ONLINE ONLINE db-2
问题比较奇怪,db-1节点以前这个参数使用的很正常,今天维护重起这机器后就出现这个错误了.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28419/viewspace-665798/ ,如需转载,请注明出处,否则将追究法律责任。