数据库版本
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Automatic Storage Management option
磁盘组目前模式为NORMAL 模式,存在2块磁盘,故障组名称为aa,bb;
DG_NAME DG_STATE TYPE DSK_NO DSK_NAME PATH MOUNT_S FAILGROUP STATE
--------------- ---------- ------ ---------- ---------- ------------------------------------------------------------ ------- -------------------- --------
DG1 MOUNTED NORMAL 0 DG1_0000 /dev/oracleasm/disks/DISK01 CACHED AA NORMAL
DG1 MOUNTED NORMAL 1 DG1_0001 /dev/oracleasm/disks/DISK02 CACHED BB NORMAL
为磁盘组添加2 块磁盘,每个故障组添加1块磁盘;
SQL> ALTER DISKGROUP dg1 ADD
FAILGROUP aa disk '/dev/oracleasm/disks/DISK03'
FAILGROUP bb disk '/dev/oracleasm/disks/DISK04' ; 2 3
Diskgroup altered.
SQL> select dg.name dg_name, dg.state dg_state, dg.type, d.disk_number dsk_no,d.name dsk_name, d.path, d.mount_status, d.FAILGROUP, d.state
from v$asm_diskgroup dg, v$asm_disk d
where dg.group_number=d.group_number
order by dg_name, dsk_no; 2 3 4
DG_NAME DG_STATE TYPE DSK_NO DSK_NAME PATH MOUNT_S FAILGROUP STATE
--------------- ---------- ------ ---------- ---------- ------------------------------------------------------------ ------- -------------------- --------
DG1 MOUNTED NORMAL 0 DG1_0000 /dev/oracleasm/disks/DISK01 CACHED AA NORMAL
DG1 MOUNTED NORMAL 1 DG1_0001 /dev/oracleasm/disks/DISK02 CACHED BB NORMAL
DG1 MOUNTED NORMAL 2 DG1_0002 /dev/oracleasm/disks/DISK03 CACHED AA NORMAL
DG1 MOUNTED NORMAL 3 DG1_0003 /dev/oracleasm/disks/DISK04 CACHED BB NORMAL
为每个故障组添加2块磁盘
ALTER DISKGROUP dg1 ADD
FAILGROUP aa disk '/dev/oracleasm/disks/DISK03' ,'/dev/oracleasm/disks/DISK04'
FAILGROUP bb disk '/dev/oracleasm/disks/DISK05' ,'/dev/oracleasm/disks/DISK06';
SQL> @a
DG_NAME DG_STATE TYPE DSK_NO DSK_NAME PATH MOUNT_S FAILGROUP STATE
--------------- ---------- ------ ---------- ---------- ------------------------------------------------------------ ------- -------------------- --------
DG1 MOUNTED NORMAL 0 DG1_0000 /dev/oracleasm/disks/DISK01 CACHED AA NORMAL
DG1 MOUNTED NORMAL 1 DG1_0001 /dev/oracleasm/disks/DISK02 CACHED BB NORMAL
DISK_NUMBER NAME PATH HEADER_STATUS OS_MB TOTAL_MB FREE_MB
----------- ---------- ------------------------------ -------------------- ---------- ---------- ----------
0 /dev/oracleasm/disks/DISK06 FORMER 2046 0 0
1 /dev/oracleasm/disks/DISK05 FORMER 2046 0 0
2 /dev/oracleasm/disks/DISK04 FORMER 2046 0 0
3 /dev/oracleasm/disks/DISK03 FORMER 2046 0 0
1 DG1_0001 /dev/oracleasm/disks/DISK02 MEMBER 2046 2046 1252
0 DG1_0000 /dev/oracleasm/disks/DISK01 MEMBER 2046 2046 1252
6 rows selected.
SQL>
SQL>
SQL>
SQL> ALTER DISKGROUP dg1 ADD
FAILGROUP aa disk '/dev/oracleasm/disks/DISK03' ,'/dev/oracleasm/disks/DISK04'
FAILGROUP bb disk '/dev/oracleasm/disks/DISK05' ,'/dev/oracleasm/disks/DISK06'; 2 3
Diskgroup altered.
SQL> @a
DG_NAME DG_STATE TYPE DSK_NO DSK_NAME PATH MOUNT_S FAILGROUP STATE
--------------- ---------- ------ ---------- ---------- ------------------------------------------------------------ ------- -------------------- --------
DG1 MOUNTED NORMAL 0 DG1_0000 /dev/oracleasm/disks/DISK01 CACHED AA NORMAL
DG1 MOUNTED NORMAL 1 DG1_0001 /dev/oracleasm/disks/DISK02 CACHED BB NORMAL
DG1 MOUNTED NORMAL 2 DG1_0002 /dev/oracleasm/disks/DISK03 CACHED AA NORMAL
DG1 MOUNTED NORMAL 3 DG1_0003 /dev/oracleasm/disks/DISK04 CACHED AA NORMAL
DG1 MOUNTED NORMAL 4 DG1_0004 /dev/oracleasm/disks/DISK05 CACHED BB NORMAL
DG1 MOUNTED NORMAL 5 DG1_0005 /dev/oracleasm/disks/DISK06 CACHED BB NORMAL
6 rows selected.
DISK_NUMBER NAME PATH HEADER_STATUS OS_MB TOTAL_MB FREE_MB
----------- ---------- ------------------------------ -------------------- ---------- ---------- ----------
1 DG1_0001 /dev/oracleasm/disks/DISK02 MEMBER 2046 2046 1551
0 DG1_0000 /dev/oracleasm/disks/DISK01 MEMBER 2046 2046 1550
5 DG1_0005 /dev/oracleasm/disks/DISK06 MEMBER 2046 2046 1894
4 DG1_0004 /dev/oracleasm/disks/DISK05 MEMBER 2046 2046 1895
3 DG1_0003 /dev/oracleasm/disks/DISK04 MEMBER 2046 2046 1895
2 DG1_0002 /dev/oracleasm/disks/DISK03 MEMBER 2046 2046 1895
6 rows selected.
SQL>