ASM磁盘组剔盘、加盘实施过程(2)

查询asm磁盘组中的asm磁盘信息:

SQL> select disk_number, state, name, total_mb, free_mb from v$asm_disk where group_number = 2; DISK_NUMBER STATE NAME TOTAL_MB FREE_MB ----------- ------------------------ ------------------------------------------------------------------------------------------ ---------- ---------- 6 NORMAL RECOVERYDG_0006 512000 177536 7 NORMAL RECOVERYDG_0007 512000 177514 8 NORMAL RECOVERYDG_0008 512000 177503 9 NORMAL RECOVERYDG_0009 512000 177520 10 NORMAL RECOVERYDG_0010 512000 177520 11 NORMAL RECOVERYDG_0011 512000 177521 0 NORMAL RECOVERYDG_0000 512000 177501 7 rows selected.

删除计划剔除的磁盘:

sqlplus / as sysasm SQL> alter diskgroup RECOVERYDG drop disk RECOVERYDG_0006; 2.等待同步完成

等待同步完成

select * from v$asm_operation;
select disk_number, state, name, total_mb, free_mb from v$asm_disk where group_number = 2;

16:31:05 SQL> select disk_number, state, name, total_mb, free_mb from v$asm_disk where group_number = 2; DISK_NUMBER STATE NAME TOTAL_MB FREE_MB ----------- -------- ------------------------------ ---------- ---------- 6 DROPPING RECOVERYDG_0006 512000 180387 7 NORMAL RECOVERYDG_0007 512000 176893 8 NORMAL RECOVERYDG_0008 512000 176879 9 NORMAL RECOVERYDG_0009 512000 176899 10 NORMAL RECOVERYDG_0010 512000 176897 11 NORMAL RECOVERYDG_0011 512000 176896 0 NORMAL RECOVERYDG_0000 512000 176874 16:56:44 SQL> / DISK_NUMBER STATE NAME TOTAL_MB FREE_MB ----------- -------- ------------------------------ ---------- ---------- 7 NORMAL RECOVERYDG_0007 512000 120678 8 NORMAL RECOVERYDG_0008 512000 120684 9 NORMAL RECOVERYDG_0009 512000 120689 10 NORMAL RECOVERYDG_0010 512000 120681 11 NORMAL RECOVERYDG_0011 512000 120691 0 NORMAL RECOVERYDG_0000 512000 120690 6 rows selected.

alert.log也会有对应的日志记录:

Thu Apr 13 16:57:02 2017 NOTE: disk 6 (RECOVERYDG_0006) in group 2 (RECOVERYDG) is offline for reads NOTE: disk 6 (RECOVERYDG_0006) in group 2 (RECOVERYDG) is offline for writes SUCCESS: disk RECOVERYDG_0006 (6.2744176951) dropped from diskgroup RECOVERYDG 3.将磁盘加入到DATADG磁盘组

将/dev/rhdisk38 加入到 DATADG:

alter diskgroup DATADG add disk '/dev/rhdisk38' rebalance power 7;

查看rebalance情况:
select disk_number, state, name, total_mb, free_mb from v$asm_disk where group_number = 1;

16:59:56 SQL> select disk_number, state, name, total_mb, free_mb from v$asm_disk where group_number = 1; DISK_NUMBER STATE NAME TOTAL_MB FREE_MB ----------- -------- ------------------------------ ---------- ---------- 7 NORMAL DATADG_0007 512000 1021 8 NORMAL DATADG_0008 512000 1016 9 NORMAL DATADG_0009 512000 1024 11 NORMAL DATADG_0011 512000 1019 12 NORMAL DATADG_0012 512000 1020 20 NORMAL DATADG_0020 512000 1025 21 NORMAL DATADG_0021 512000 1020 22 NORMAL DATADG_0022 512000 1020 23 NORMAL DATADG_0023 512000 1018 24 NORMAL DATADG_0024 512000 1017 25 NORMAL DATADG_0025 512000 1029 DISK_NUMBER STATE NAME TOTAL_MB FREE_MB ----------- -------- ------------------------------ ---------- ---------- 26 NORMAL DATADG_0026 512000 1021 27 NORMAL DATADG_0027 512000 1028 28 NORMAL DATADG_0028 512000 1018 29 NORMAL DATADG_0029 512000 1021 4 NORMAL DATADG_0004 512000 510647 0 NORMAL DATADG_0000 512000 1011 1 NORMAL DATADG_0001 512000 1356 2 NORMAL DATADG_0002 512000 1354 3 NORMAL DATADG_0003 512000 1355 20 rows selected.

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/35b6b180883851426c85abdab2b70796.html