Environment Introduction:
A total of two disk groups: CRS and Data;crs use normal redundancy; Data uses external redundancy.
Add a new ASM disk procedure (slightly)
1. Pre-migration
Sql> Select Group_number, Failgroup, Name,path from V$asm_disk order by 1group_number Failgroup NA ME PATH-------------------------------------------------------------------------------------- --------------------------0/DEV/ASM/CRS02 0/dev/asm/crs01 0 /DEV/ASM/DATA02 0 /DEV/ASM/DATA03 0/DEV/ASM/DATA01 0 /dev/asm/crs03 0 /dev/asm/data04 1 crs_0002 Crs_0002/dev /asm/crs3 1 CRs_0001 crs_0001/dev/asm/crs2 1 crs_0000 crs_0 000/dev/asm/crs1 2 data_0002 data_0002/dev/asm /DATA3 2 data_0003 data_0003/dev/asm/data4 2 data_0001 Data_0001/dev/asm/data2 2 data_0000 data_0000 /dev/asm/data114 rows selected. Sql>
2. Migrating CRS Disk Groups
#向CRS磁盘组添加新的磁盘
Sql> alter DiskGroup CRS add failgroup crs_0000 disk '/dev/asm/crs01 ' failgroup crs_0001 '/DEV/ASM/CRS02 ' failgroup CRS _0002 '/dev/asm/crs03 ';
#查看磁盘reblance进度, and wait for the synchronization to end
Sql> select * from Gv$asm_operation; inst_id group_number OPERA STAT POWER ACTUAL sofar est_work est_rate est_minutes error_ CODE----------------------------------------------------------------------------------------------------------- ----------------------------- 1 2 rebal RUN 25187 54618 12250 2 2 2 rebal WAIT 11sql> select * from Gv$asm_operation;no rows selected
#删除老的磁盘
sql> alter diskgroup CRS drop disk crs_0000,crs_0001,crs_0002 rebalance power 1024;
#查看磁盘reblance进度, and wait for the synchronization to end
Sql> select * from Gv$asm_operation;
3. Migrating Data Disk Groups
#向DATA磁盘组添加新的磁盘
Sql> alter DiskGroup DATA add disk '/dev/asm/data01 ', '/dev/asm/data02 ', '/dev/asm/data03 ', '/dev/asm/data04 ' Rebalance power 1024;
#查看磁盘reblance进度, and wait for the synchronization to end. Reblance end When query result is empty
Sql> SELECT * from Gv$asm_operation;no rows selected
#删除老的磁盘
sql> alter diskgroup DATA drop disk data_0000,data_0001,data_0002,data_0003 rebalance power 1024;
#查看磁盘reblance进度, and wait for the synchronization to end
Sql> select * from Gv$asm_operation;
4. After the migration is over
sql> Select Group_number, Failgroup, Name,path from V$asm_disk Order by 1; Group_number failgroup NAME PATH------------------------------------------ ----------------------------------------------------------------------1 crs_0002 crs_00 05/dev/asm/crs03 1 crs_0001 crs_0004/dev/asm /CRS02 1 crs_0000 crs_0003/dev/asm/crs01 2 data_0005 DATA_0005/DEV/ASM/DATA02 2 data_0004 data_0004 /DEV/ASM/DATA01 2 data_0007 Data_0007/dev/asm/data04 2 data_0006 data_0006/dev/asm/data037 rows selected. Sql>
RAC database migrates ASM disk groups to other storage