Tag Archives: asm

ORA-00600[KGEADE_IS_0]错误解决

0

Posted on by

在RAC ASM文件系统恢复到单机文件系统,open resetlogs 报错:

ORA-00600: internal error code, arguments: [kgeade_is_0], [], [], [], [], [], [], []
ORA-600 signalled during: alter database open resetlogs...
Errors in file /u01/app/oracle/admin/orcl/udump/orcl_ora_10861.trc:
ORA-00313: open failed for members of log group 11 of thread 1
ORA-00312: online log 11 thread 1: '+DATA1/orcl/datafile/redo111'
ORA-17503: ksfdopn:2 Failed to open file +DATA1/orcl/datafile/redo111
ORA-15001: diskgroup "DATA1" does not exist or is not mounted
ORA-15077: could not locate ASM instance serving a required diskgroup
ORA-29701: unable to connect to Cluster Manager
ORA-00312: online log 11 thread 1: '+DATA1/orcl/onlinelog/redo111'
ORA-17503: ksfdopn:2 Failed to open file +DATA1/orcl/onlinelog/redo111
ORA-15001: diskgroup "DATA1" does not exist or is not mounted
ORA-15077: could not locate ASM instance serving a required diskgroup
ORA-29701: unable to connect to Cluster Manager

 

在MOS上查询了一下,是一个bug:

To implement a solution for Bug:7207932, please execute any of the below alternative solutions:

  • Upgrade to 11.1

OR

  • Apply patchset 10.2.0.5 in which Bug:7207932 is fixed.

OR

OR

  • A possible workaround is to recreate the controlfile and specifying new filenames in the controlfile. If this does not work, then apply the patch for Bug:7207932.

 

即通过2种方法来实现:

1.打补丁,或者升级。

        1.shutdown database
        2.unzip  p7207932_10204_Linux-x86-64.zip
        3.cd 7207932
        4.$ORACLE_HOME/OPatch/opatch apply

2.重建控制文件,更新里面的路径。

        1.alter database backup controlfile to trace as '/u01/controlfile.log'
        2.recreate controlfile (更新里面redo的路径)

 

     

 

USE Udev for Oracle ASM

0

Posted on by

   下面说明RHEL5和RHEL6通过UUID来绑udev

 

RHEL5:

1.检查一下要绑那几块盘

ll /dev/sd*

 

2.生成脚本

for i in b c d e ;
do
echo "KERNEL==\"sd*\", BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id -g -u -s %p\", RESULT==\"`scsi_id -g -u -s /block/sd$i`\", NAME=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\"" >> /tmp/99-oracle-asmdevices.rules
done

 

3.检查一下99-oracle-asmdevices.rules

cat /tmp/99-oracle-asmdevices.rules

 

4.copy到udev目录下(rac的话直接copy这个文件到另一个节点上)

cp /tmp/99-oracle-asmdevices.rules /etc/udev/rules.d/99-oracle-asmdevices.rules

 

重启udev

start_udev

 

 

RHEL6:

1.检查一下要绑那几块盘

ll /dev/sd*

 

 

2.生成脚本

for i in b c d e ;
do
echo "KERNEL==\"sd*\", BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id -g -u -d /dev/$name\", RESULT==\"`scsi_id -g -u -d /dev/sd$i`\", NAME=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\"" >> /tmp/99-oracle-asmdevices.rules
done

for i in b c d e ;
do
echo "KERNEL==\"sd*\", BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/\$name\", RESULT==\"`/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/sd$i`\", NAME=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\""      >> /tmp/99-oracle-asmdevices.rules
done

 

3.检查一下99-oracle-asmdevices.rules

cat /tmp/99-oracle-asmdevices.rules

 

4.copy到udev目录下(rac的话直接copy这个文件到另一个节点上)

cp /tmp/99-oracle-asmdevices.rules /etc/udev/rules.d/99-oracle-asmdevices.rules

 

重启udev

start_udev

 

udev管理

1.Test the rules are working as expected.(udevtest)

# #OL5
# udevtest /block/sdb
# udevtest /block/sdc
# udevtest /block/sdd
# udevtest /block/sde

# #OL6
# udevadm test /block/sdb
# udevadm test /block/sdc
# udevadm test /block/sdd
# udevadm test /block/sde

 

2.restart the UDEV service.

# #OL5
# /sbin/udevcontrol reload_rules

# #OL6
# udevadm control --reload-rules

# #OL5 and OL6
# /sbin/start_udev

 

3.udev info

# #OL5
# udevinfo -q all -n /dev/sdb

# #OL6
# udevadm info --query=all --path=/sys/block/sdb
# udevadm info --query=all --name=asm-diska

ASM discovered an insufficient number of disks for diskgroup “DATA” 错误

0

Posted on by

在asmca的时候在一边mount了,另一边没有mount:

[grid@rac1 ~]$ asmcmd lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  NORMAL  N         512   4096  1048576      4094     3988                0            1994              0             N  ARCH/
MOUNTED  EXTERN  N         512   4096  1048576      6141     4106                0            4106              0             N  DATA/
MOUNTED  EXTERN  N         512   4096  1048576      2047     1651                0            1651              0             Y  OCR/
[grid@rac1 ~]$ 
[grid@rac2 ~]$ asmcmd lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  1048576      2047     1651                0            1651              0             Y  OCR/

 

手动mount:

SQL> alter diskgroup data mount
  2  ;
alter diskgroup data mount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15017: diskgroup "DATA" cannot be mounted
ORA-15063: ASM discovered an insufficient number of disks for diskgroup "DATA"

 

经检查,是由于在裸设备绑udev的时候,盘混了。导致asm起不来。

 

下面是正确的绑udev配置:use udev for Oracle ASM

 

 

 

 

How to start up the ASM instance when the spfile is misconstrued or lost

1

Posted on by

在11g中,asm的spfile都存放在asm磁盘组中,所以当ASM的spfile被消失了或删除了,需要自己手动写个pfile 临时把磁盘组mount,然后create spfile到原来的磁盘组上。

错误:

- Start the ASM instance fail with error

SQL> startup;
ORA-00099: warning: no parameter file specified for ASM instance
ORA-00304: requested INSTANCE_NUMBER is busy

- Start up the CRS services fail with error

# crsctl start crs
CRS-4640: Oracle High Availability Services is already active
CRS-4000: Command Start failed, or completed with errors

- Checked the gpnp profile and found that found that it referred  
to an spfile which did not exist in the ASM (or shared storage) 

 

处理过程:

1.查看asm的spfile的位置
[grid@oradbca1 ~]$ cat /u01/app/11.2/grid/gpnp/profiles/peer/profile.xml

 

2.Create a new ASM pfile

 

+ASM1.asm_diskgroups='DATA'#Manual Mount
+ASM2.asm_diskgroups='DATA'#Manual Mount
*.asm_diskstring='/dev/asm-disk*'
*.asm_power_limit=1
*.diagnostic_dest='/u01/app/oracle'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'

 

3. Start up the ASM instance

$ sqlplus / as sysasm

sql> startup pfile=<the full pathname of ora_+ASM1.ora>

 

4.Check if the ASM diskgroups are mounted properly or not

sql> select name , state from v$asm_diskgroup

 

5.Create the spfile

sql> create spfile='+DATA/../spfileasm.ora' from pfile='<the full path name of ora_+ASM1.ora>

 

6.We need to stop and startup the CRS to make sure that the ASM and the CRS stack startup automatically without any issues

 

 

11.2.0.3 asm报ORA-04031

0

Posted on by

数据库11.2.0.3 在ASM instances后台会报 ORA-04031这样的错

ERROR at line 1:
ORA-04031: unable to allocate 256 bytes of shared memory ("shared
pool","unknown object","PCursor","kglob")
 
原因是:
1) ASM instance was running out of shared pool free memory.
2) The shared pool free memory was close to 0 MB on the affected ASM instances:
 

+ASM1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SQL> select bytes/1024/1024 MB
2 from v$sgastat
3 where pool = 'shared pool' and name = 'free memory';

 

 

 

MB 
17.8854446 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

+ASM2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SQL> select bytes/1024/1024 MB
2 from v$sgastat
3 where pool = 'shared pool' and name = 'free memory';

 

MB 
22.6575012 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

+ASM3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SQL> select bytes/1024/1024 MB
2 from v$sgastat
3 where pool = 'shared pool' and name = 'free memory';

 

select bytes/1024/1024 MB
*

 

ERROR at line 1:
ORA-04031: unable to allocate 256 bytes of shared memory ("shared
pool","unknown object","PCursor","kglob")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 


 

原因:

In 11.2.0.3, the "PROCESSES" parameter will be default to "available CPU cores * 80 + 40" (in the ASM spfile). As the default value for "MEMORY_TARGET" is based on "PROCESSES", it can be insufficient if there is a large number of CPU cores or large number of diskgroups which could cause issues (i.e. Grid Infrastructure stack fails to stop with ORA-04031 etc) per Bug:13605735 & Bug:12885278, it is recommended to increase the value of MEMORY_MAX_TARGET & MEMORY_TARGET before upgrading/installing to 11.2.0.3 (does not apply to 10g ASM)

 

解决:


Log in to ASM:

SQL> show parameter memory_target

If the value is smaller than 1536m, issue the following:

SQL> alter system set memory_max_target=4096m scope=spfile;
SQL> alter system set memory_target=1536m scope=spfile;


The number 1536m has proven to be sufficient for most environment, the change will not be effective until next restart.