asm盘头状态---内存有一份,盘上有一份:
实例运行时使用cache里的,从v$asm_diskgroup_stat和v$asm_diskstat里查看;
重启时候是重新扫描磁盘,用磁盘里的,v$asm_diskgroup和v$asm_disk视图和asmcmd里都是扫描磁盘头得到;
v$asm_diskgroup and v$asm_diskgroup_stat provides exactly the same information, but the %_stat view operates from cache, while v$asm_diskgroup rescans all disk headers.
官档:
V$ASM_DISK_STAT---不扫盘,从内存cache读取,所以速度比V$ASM_DISK快。
V$ASM_DISK_STAT provides a way to query performance statistics in the same way that V$ASM_DISK does, but without performing discovery of new disks. This results in a less expensive operation. However, since discovery is not performed, the output of this view does not include any data about disks that are new to the system.
V$ASM_DISK---根据ASM_DISKSTRING扫盘,从磁盘头读取。所以执行速度比v$asm_disk_stat慢。因为从磁盘扫。符合ASM_DISKSTRING的参数都可扫出,所以可以扫出没加入磁盘组的盘。
In an Automatic Storage Management instance, V$ASM_DISK displays one row for every disk discovered by the Automatic Storage Management instance, including disks which are not part of any disk group. In a database instance, V$ASM_DISK only displays rows for disks in disk groups in use by the database instance.
dailycheck之前用的是V$ASM_DISK和V$ASM_DISKGROUP,后来因为交换机承受不住,所以改成V$ASM_DISK_STAT和V$ASM_DISKGROUP_STAT。
所以dailycheck里现在不是实际从磁盘读取磁盘头信息。
控制表语句:
#查看header_status应该为candidate或former
set line 360
col name for a30
col path for a30
select group_number,disk_number,mount_status,header_status,mode_status,state,name,path
from v$asm_disk order by 1,2;
重启用盘里的,所以重启前要使用v$asm_disk和v$asm_diskgroup视图查磁盘头来确认。