默认repair_time
SQL> select group_number,name,value from v$asm_attribute where name like '%disk_repair_time%';
GROUP_NUMBER NAME VALUE
------------ -------------------- --------------------
1 disk_repair_time 3.6h
3 disk_repair_time 3.6h
2 disk_repair_time 3.6h
将ocr中的磁盘offline
SQL> alter diskgroup ocr offline disk ocr_0000;
查看磁盘状态
SQL> select path,header_status,mount_status from v$asm_disk where group_number=1;
PATH HEADER_STATU MOUNT_S
------------ ----------------------- --------------
UNKNOWN MISSING
/dev/raw/raw2 MEMBER CACHED
/dev/raw/raw3 MEMBER CACHED
查看drop所剩时间
SQL> select path,name,repair_timer from v$asm_disk where group_number=1;
PATH NAME REPAIR_TIMER
------------------------------ ------------------------------ ------------
OCR_0000 12775
/dev/raw/raw2 OCR_0001 0
/dev/raw/raw3 OCR_0002 0
调大drop时间
SQL> alter diskgroup ocr offline disk OCR_0000 drop after 5h;
Diskgroup altered.
SQL> select path,name,repair_timer from v$asm_disk where group_number=1;
PATH NAME REPAIR_TIMER
------------------------------ ------------------------------ ------------
OCR_0000 17629
/dev/raw/raw2 OCR_0001 0
/dev/raw/raw3 OCR_0002 0
修改所有磁盘组repair_time
SQL> ALTER DISKGROUP DATA SET ATTRIBUTE 'disk_repair_time'= '36h';
offline时磁盘故障处理
因超时盘被自动drop掉了
set line 200
col name for a30
col path for a50
col FAILGROUP for a10
select GROUP_NUMBER,name,path,FAILGROUP from v$asm_disk;
GROUP_NUMBER NAME PATH FAILGROUP
------------ ------------------------------ -------------------------------------------------- ----------
0 /dev/disk/a11T --DATAFG1
0 /dev/disk/a900G --FA1
2 _DROPPED_0002_DATA DATAFG1
2 _DROPPED_0001_DATA DATAFG1
2 _DROPPED_0000_DATA DATAFG1
1 _DROPPED_0000_ARCH FA1
0 /dev/disk/a110G --OCR_0003
0 /dev/disk/a21T --DATAFG1
0 /dev/disk/a31T --DATAFG1
2 DATA_0003 /dev/disk/b11T DATAFG2
2 DATA_0005 /dev/disk/b31T DATAFG2
2 DATA_0004 /dev/disk/b21T DATAFG2
1 ARCH_0002 /dev/disk/b900G ARCH_0002
3 OCR_0002 /dev/disk/b210G OCR_0002
3 OCR_0001 /dev/disk/b110G OCR_0001
查看磁盘组状态
SQL> select NAME,STATE,TYPE,OFFLINE_DISKS from v$asm_diskgroup;
NAME STATE TYPE OFFLINE_DISKS
------------------------------ ---------------------- ------------ -------------
ARCH MOUNTED NORMAL 1
DATA MOUNTED NORMAL 3
OCR MOUNTED NORMAL 0
将删除的盘加入磁盘组(force)
alter diskgroup DATA add failgroup DATAFG1 disk '/dev/disk/a11T' force rebalance power 8;
alter diskgroup DATA add failgroup DATAFG1 disk '/dev/disk/a21T' force rebalance power 8;
alter diskgroup DATA add failgroup DATAFG1 disk '/dev/disk/a31T' force rebalance power 8;
alter diskgroup ARCH add failgroup FA1 disk '/dev/disk/a900G' force rebalance power 8;
SQL> select GROUP_NUMBER,name,path,FAILGROUP from v$asm_disk order by 2;
GROUP_NUMBER NAME PATH FAILGROUP
------------ ------------------------------ -------------------------------------------------- ----------
1 ARCH_0001 /dev/disk/a900G FA1
1 ARCH_0002 /dev/disk/b900G ARCH_0002
2 DATA_0003 /dev/disk/b11T DATAFG2
2 DATA_0004 /dev/disk/b21T DATAFG2
2 DATA_0005 /dev/disk/b31T DATAFG2
2 DATA_0006 /dev/disk/a11T DATAFG1
2 DATA_0007 /dev/disk/a21T DATAFG1
2 DATA_0008 /dev/disk/a31T DATAFG1
3 OCR_0000 /dev/disk/a110G OCR_0000
3 OCR_0001 /dev/disk/b110G OCR_0001
3 OCR_0002 /dev/disk/b210G OCR_0002
1 _DROPPED_0000_ARCH FA1
2 _DROPPED_0000_DATA DATAFG1
2 _DROPPED_0001_DATA DATAFG1
2 _DROPPED_0002_DATA DATAFG1