在ASM中,如果数据字典数据有不一致的地方,可能会引一系列问题:
1. datafile resize时无法从asm diskgroup分配空间
diskgroup中的disk的free space显示是假的,实际上可能并不均衡,所以无法分配空间
2,在diskgroup上做rebalance操作时,可能会导致asm instance中断.
所以,有必要定期检查metadata是否有不一致的地方.
check_diskgroup_clause
The check_diskgroup_clause
lets you verify the internal consistency of Automatic Storage Management disk group metadata. The disk group must be mounted. Automatic Storage Management displays summary errors and writes the details of the detected errors in the alert log.
The CHECK
keyword performs the following operations:
Checks the consistency of the disk.
Cross checks all the file extent maps and allocation tables for consistently.
Checks that the alias metadata directory and file directory are linked correctly.
Checks that the alias directory tree is linked correctly.
Checks that ASM metadata directories do not have unreachable allocated blocks.
REPAIR | NOREPAIR This clause lets you instruct Automatic Storage Management whether or not to attempt to repair any errors found during the consistency check. The default is NOREPAIR
. The NOREPAIR
setting is useful if you want to be alerted to any inconsistencies but do not want Automatic Storage Management to take any automatic action to resolve them.
Deprecated Clauses In earlier releases, you could specify CHECK
for ALL
, DISK
, DISKS
IN
FAILGROUP
, or FILE
. Those clauses have been deprecated as they are no longer needed. If you specify them, then their behavior is the same as in earlier releases and a message is added to the alert log. However, Oracle recommends that you do not introduce these clauses into your new code, as they are scheduled for desupport. The deprecated clauses are these:
ALL
checks all disks and files in the disk group.DISK
checks one or more specified disks in the disk group.DISKS
IN
FAILGROUP
checks all disks in a specified failure group.FILE
checks one or more specified files in the disk group. You must use one of the reference forms of the filename. Refer to ASM_filename for information on the reference forms of Automatic Storage Management filenames.
实例:
SQL> alter diskgroup NL02 check norepair;
一般先norepair,check出来有问题再repair
在check时,通过asm instance的alert log及*rbal*.trc可查看相关信息.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/94384/viewspace-1028855/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/94384/viewspace-1028855/