asm磁盘加载小记

来源:互联网 发布:单片机微型打印机 编辑:程序博客网 时间:2024/06/05 07:22

今天在弄数据库的时候asm磁盘组没起来,

启动asm时候提示

SQL> startup

ORA-00099: warning: no parameter filespecified for ASM instance

ORA-01081: cannot start already-runningORACLE - shut it down first

SQL> shutdown immediate

ORA-15100: invalid or missing diskgroupname

 

 

ASM instance shutdown

SQL> startup

ORA-00099: warning: no parameter filespecified for ASM instance

ASM instance started

 

Total System Global Area  284565504 bytes

Fixed Size                  1336036 bytes

Variable Size             258063644 bytes

ASM Cache                  25165824 bytes

ORA-15110: no diskgroups mounted

 

SQL> show parameter asm

 

NAME                                 TYPE        VALUE

------------------------------------ -----------------------------------------

asm_diskgroups                       string

asm_diskstring                       string

asm_power_limit                      integer     1

asm_preferred_read_failure_groups    string

SQL> select path,mount_status fromv$asm_disk order by disk_number;

 

no rows selected

SQL> alter diskgroup all mount;

alter diskgroup all mount

*

ERROR at line 1:

ORA-15110: no diskgroups mounted

使用spfile创建pfile出错了

SQL> create pfile='/home/grid/init.ora'from spfile;

create pfile='/home/grid/init.ora' fromspfile

*

ERROR at line 1:

ORA-01565: error in identifying file'?/dbs/spfile@.ora'

ORA-27037: unable to obtain file status

Linux Error: 2: No such file or directory

Additional information: 3

SQL> alter system set asm_diskgroups=DATAscope=spfile;

alter system set asm_diskgroups=DATAscope=spfile

*

ERROR at line 1:

ORA-32001: write to SPFILE requested but noSPFILE is in use

 

 

将解决过程记录下来

1、  查看磁盘组是否在

[grid@loge0001~]$ /etc/init.d/oracleasm listdisks

VOL1

VOL2

VOL3

VOL4

2、  手动创建init起始文件

[grid@loge0001oradiag_grid]$ cat init.ora

asm_diskstring='/dev/oracleasm/disks/VOL*'

asm_diskgroups='DATA'

asm_power_limit=1

diagnostic_dest='/home/grid'

instance_type='asm'

large_pool_size=12M

remote_login_passwordfile='EXCLUSIVE'

3、  然后根据初始化文件启动asm

SQL> startuppfile='/home/grid/oradiag_grid/init.ora';

ASM instance started

 

Total System Global Area  284565504 bytes

Fixed Size                  1336036 bytes

Variable Size             258063644 bytes

ASM Cache                  25165824 bytes

ASM diskgroups mounted

4、  创建spfile

如果创建时候出错

SQL> create spfile from pfile;

create spfile from pfile

*

ERROR at line 1:

ORA-17502: ksfdcre:4 Failed to create file

+DATA/asm/asmparameterfile/registry.253.843691015

ORA-15177: cannot operate on system aliases

查询:

select name, group_number, alias_directory,system_created from v$asm_alias;

可以发现没有asmparameterfile这个目录,我们可以手动指定目录创建spfile

SQL> create spfile='+DATA' frompfile='/home/grid/oradiag_grid/init.ora';

 

File created.

5、  实验

SQL>shutdown immediate

ASMdiskgroups dismounted

ASMinstance shutdown

SQL>startup

ASMinstance started

 

TotalSystem Global Area  284565504 bytes

FixedSize                  1336036 bytes

VariableSize             258063644 bytes

ASMCache                  25165824 bytes

ASM diskgroups mounted

二启动instance实例

1、  启动报错

SQL>startup

ORACLEinstance started.

 

TotalSystem Global Area  795127808 bytes

FixedSize                  1339456 bytes

VariableSize             608178112 bytes

DatabaseBuffers          180355072 bytes

RedoBuffers                5255168 bytes

ORA-00205: error in identifying control file, check alertlog for more info

查看日志,有报错信息

NOTE:dependency between database vion and diskgroup resource ora.DATA.dg isestablished

ORA-00210:cannot open the specified control file

ORA-00202:control file: '+FRA/vion/controlfile/current.260.844042139'

ORA-17503:ksfdopn:2 Failed to open file +FRA/vion/controlfile/current.260.844042139

ORA-15001:diskgroup "FRA" does not exist or is not mounted

ORA-15001:diskgroup "FRA" does not exist or is not mounted

ORA-205signalled during: ALTER DATABASE  MOUNT...

Thu Sep25 23:10:04 2014

Checker run found 1 new persistent data failures

查询磁盘组信息

SQL>select name,state from v$asm_diskgroup;

 

NAME                           STATE

-----------------------------------------

DATA                           MOUNTED

FRA                            DISMOUNTED

由此可知,磁盘组fra没有mount

2、  手动mount

SQL>alter diskgroup FRA mount;

alterdiskgroup FRA mount

*

ERROR atline 1:

ORA-15000: command disallowed by current instance type

 

[oracle@loge0001trace]$ oerr ora 15000

15000,00000, "command disallowed by current instance type"

//*Cause:  The user has issued a command toa conventional RDBMS instance

//          that is only appropriate for an ASMinstance. Alternatively, the

//          user has issued a command to an ASMinstance that is only

//          appropriate for an RDBMS instance.

//*Action: Connect to the correct instance type and re-issue the command.

//

使用grid用户mount成功

SQL>alter diskgroup FRA mount;

 

Diskgroup altered.

3、  验证

重启实例正常

SQL>shutdown immediate;

ORA-01507:database not mounted

 

 

ORACLEinstance shut down.

SQL>startup

ORACLEinstance started.

 

TotalSystem Global Area  795127808 bytes

FixedSize                  1339456 bytes

VariableSize             608178112 bytes

DatabaseBuffers          180355072 bytes

RedoBuffers                5255168 bytes

Databasemounted.

Database opened.

0 0
原创粉丝点击