ATTENTION: Before dropping a disk group you must move all files from this disk group (database files, asm files, cluster files).
1. Check if all objects were moved from diskgroup
[grid@rac1 ~]$ sqlplus / as sysasm
SQL> SELECT D.NAME,C.INSTANCE_NAME,C.DB_NAME,C.STATUS
FROM GV$ASM_DISKGROUP D , GV$ASM_CLIENT C
WHERE D.GROUP_NUMBER=C.GROUP_NUMBER
AND D.NAME = 'VOTE_TMP'; 2 3 4
no rows selected
SQL> SELECT D.NAME,C.NAME,C.voting_file
FROM V$ASM_DISKGROUP D , V$ASM_DISK C
WHERE D.GROUP_NUMBER=C.GROUP_NUMBER
AND D.NAME = 'VOTE_TMP'; 2 3 4
NAME NAME V
------------------------------ ------------------------------ -
VOTE_TMP DISK6 Y
VOTE_TMP DISK7 Y
VOTE_TMP DISK8 Y
2. Dismount diskgroup from all asm instances except one
SQL> alter diskgroup vote_tmp dismount;
Diskgroup altered.
3. Connect on instance with asm diskgroup mounted and drop diskgroup
SQL> drop diskgroup vote_tmp including contents;
Diskgroup dropped.
4. Check disks are with header_status = former for disks of dropped diskgroup
SQL> select disk_number, header_status, mode_status, state, path from v$asm_disk;
DISK_NUMBER HEADER_STATU MODE_ST STATE
----------- ------------ ------- --------
PATH
--------------------------------------------------------------------------------
0 FORMER ONLINE NORMAL
ORCL:DISK6
1 FORMER ONLINE NORMAL
ORCL:DISK7
2 FORMER ONLINE NORMAL
ORCL:DISK8
DISK_NUMBER HEADER_STATU MODE_ST STATE
----------- ------------ ------- --------
PATH
--------------------------------------------------------------------------------
0 MEMBER ONLINE NORMAL
ORCL:DISK1
0 MEMBER ONLINE NORMAL
ORCL:DISK2
1 MEMBER ONLINE NORMAL
ORCL:DISK3
DISK_NUMBER HEADER_STATU MODE_ST STATE
----------- ------------ ------- --------
PATH
--------------------------------------------------------------------------------
2 MEMBER ONLINE NORMAL
ORCL:DISK4
0 MEMBER ONLINE NORMAL
ORCL:DISK5
8 rows selected.
5. Create new diskgroup using former disks (better with asmca or OEM)
CREATE DISKGROUP CDATA NORMAL REDUNDANCY FAILGROUP DISK8 DISK 'ORCL:DISK8' NAME DISK8 SIZE 1023 M FAILGROUP DISK7 DISK 'ORCL:DISK7' NAME DISK7 SIZE 1023 M FAILGROUP DISK6 DISK 'ORCL:DISK6' NAME DISK6 SIZE 1023 M ATTRIBUTE 'compatible.asm' = '11.2'
1. Check if all objects were moved from diskgroup
[grid@rac1 ~]$ sqlplus / as sysasm
SQL> SELECT D.NAME,C.INSTANCE_NAME,C.DB_NAME,C.STATUS
FROM GV$ASM_DISKGROUP D , GV$ASM_CLIENT C
WHERE D.GROUP_NUMBER=C.GROUP_NUMBER
AND D.NAME = 'VOTE_TMP'; 2 3 4
no rows selected
SQL> SELECT D.NAME,C.NAME,C.voting_file
FROM V$ASM_DISKGROUP D , V$ASM_DISK C
WHERE D.GROUP_NUMBER=C.GROUP_NUMBER
AND D.NAME = 'VOTE_TMP'; 2 3 4
NAME NAME V
------------------------------ ------------------------------ -
VOTE_TMP DISK6 Y
VOTE_TMP DISK7 Y
VOTE_TMP DISK8 Y
2. Dismount diskgroup from all asm instances except one
SQL> alter diskgroup vote_tmp dismount;
Diskgroup altered.
3. Connect on instance with asm diskgroup mounted and drop diskgroup
SQL> drop diskgroup vote_tmp including contents;
Diskgroup dropped.
4. Check disks are with header_status = former for disks of dropped diskgroup
SQL> select disk_number, header_status, mode_status, state, path from v$asm_disk;
DISK_NUMBER HEADER_STATU MODE_ST STATE
----------- ------------ ------- --------
PATH
--------------------------------------------------------------------------------
0 FORMER ONLINE NORMAL
ORCL:DISK6
1 FORMER ONLINE NORMAL
ORCL:DISK7
2 FORMER ONLINE NORMAL
ORCL:DISK8
DISK_NUMBER HEADER_STATU MODE_ST STATE
----------- ------------ ------- --------
PATH
--------------------------------------------------------------------------------
0 MEMBER ONLINE NORMAL
ORCL:DISK1
0 MEMBER ONLINE NORMAL
ORCL:DISK2
1 MEMBER ONLINE NORMAL
ORCL:DISK3
DISK_NUMBER HEADER_STATU MODE_ST STATE
----------- ------------ ------- --------
PATH
--------------------------------------------------------------------------------
2 MEMBER ONLINE NORMAL
ORCL:DISK4
0 MEMBER ONLINE NORMAL
ORCL:DISK5
8 rows selected.
5. Create new diskgroup using former disks (better with asmca or OEM)
CREATE DISKGROUP CDATA NORMAL REDUNDANCY FAILGROUP DISK8 DISK 'ORCL:DISK8' NAME DISK8 SIZE 1023 M FAILGROUP DISK7 DISK 'ORCL:DISK7' NAME DISK7 SIZE 1023 M FAILGROUP DISK6 DISK 'ORCL:DISK6' NAME DISK6 SIZE 1023 M ATTRIBUTE 'compatible.asm' = '11.2'
No comments:
Post a Comment