Categotry Archives: ASM

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.