oracle 11g 新特性 磁盘组检查

    oracle 11g开始,asm提供了命令对磁盘组进行检查,可以检查磁盘组内的以下内容:

alter diskgroup diskgroupname check;

1.Verify the consistency of the disk

2.Cross-check all the file extent maps and allocation tables for consistency

3.Check whether the alias metadata directory and file directory are linked correctly

4.Check that ASM metadata directories do not have unreachable allocated blocks

以下实验为:asm磁盘头丢失,用check检查后,可以有日志看到磁盘头信息不能正确读取

[grid@rac2 raw]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.1.0 Production on Thu Aug 2 09:24:05 2007

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> select name,path from v$asm_disk;

TESTDG_0000
/dev/raw/raw1

破坏/dev/raw/raw1磁盘头信息

[grid@rac1 ~]$ dd if=/dev/zero f=/dev/raw/raw1 bs=4096 count=1
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 0.017539 seconds, 234 kB/s
[grid@rac1 ~]$

[grid@rac1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.1.0 Production on Fri Jul 23 10:48:16 2010

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> alter diskgroup testdg check;
Diskgroup altered.

这时查看asm日志,提示不能读取/dev/raw/raw1对应的disk name TESTDG_0000 信息

Fri Jul 23 10:45:05 2010
SQL> alter diskgroup testdg check
ERROR: Could not read the header of disk TESTDG_0000 (0).
NOTE: starting check of diskgroup TESTDG
kfdp_checkDsk(): 18
SUCCESS: check of diskgroup TESTDG found no errors
SUCCESS: alter diskgroup testdg check
(END)

修复磁盘头信息后,可以正确读取

[grid@rac1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.1.0 Production on Fri Jul 23 10:48:16 2010

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> alter diskgroup testdg check;

Diskgroup altered.

Fri Jul 23 10:48:29 2010
SQL> alter diskgroup testdg check
NOTE: starting check of diskgroup TESTDG
kfdp_checkDsk(): 19
SUCCESS: check of diskgroup TESTDG found no errors
SUCCESS: alter diskgroup testdg check

 

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7199859/viewspace-668853/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7199859/viewspace-668853/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值