-- Create ASM metadata backup of DB01_DATA1 on Host:
ASMCMD> md_backup /cs/oracle/grid/asm_md_backup.041115
Please extend diskgroup DB01_DATA1 by using disk from Spare disk group.
Choosen disk for addition: /dev/oracle/asmdat.emc0_4ad8.258063.lun -- chosen from SPARE_DG
-- check if disk is still in SPARE group ( if disk is still in SPARE_GROUP )
select inst_id, name, path from gv$asm_disk where path IN('/dev/oracle/asmdat.emc0_4ad8.258063.lun');
SQL> select inst_id, name, path from gv$asm_disk where path IN('/dev/oracle/asmdat.emc0_4ad8.258063.lun');
INST_ID NAME PATH
---------- ------------------------- -----------------------------------------
4 SPARE_DG_0004 /dev/oracle/asmdat.emc0_4ad8.258063.lun
3 SPARE_DG_0004 /dev/oracle/asmdat.emc0_4ad8.258063.lun
2 SPARE_DG_0004 /dev/oracle/asmdat.emc0_4ad8.258063.lun
5 SPARE_DG_0004 /dev/oracle/asmdat.emc0_4ad8.258063.lun
1 SPARE_DG_0004 /dev/oracle/asmdat.emc0_4ad8.258063.lun
SQL>
-- drop disk from spare group
ALTER DISKGROUP SPARE_DG DROP DISK SPARE_DG_0004;
-- check whether rebalance is complete (keeping on checking until the output is "no rows selected").
set lin 250
select B.NAME as DISKGROUP_NAME, A.OPERATION, A.STATE, A.POWER, A.SOFAR, A.EST_WORK, A.EST_RATE, A.EST_MINUTES
from V$ASM_OPERATION a,v$asm_diskgroup b
where a.GROUP_NUMBER=b.group_number;
-- check free name in DB01_DATA1 group
set pagesize 100
SELECT a.NAME as DISK_NAME
from v$asm_disk a, v$asm_diskgroup b
where a.group_number=b.group_number
and b.name like '%DB01_DATA1%'
order by 1;
-- add disk to DB01_DATA1
ALTER DISKGROUP DB01_DATA1 ADD DISK '/dev/oracle/asmdat.emc0_4ad8.258063.lun' NAME DB01_DATA1_0005;
-- check rebalance (keeping on checking until the output is "no rows selected")
set lin 250
select B.NAME as DISKGROUP_NAME, A.OPERATION, A.STATE, A.POWER, A.SOFAR, A.EST_WORK, A.EST_RATE, A.EST_MINUTES
from V$ASM_OPERATION a,v$asm_diskgroup b
where a.GROUP_NUMBER=b.group_number;
-- Remove the 36GB luns from the DB01_DATA1 DG
-- choose the 36GB disks from the below query :
set lines 200 pages 200
col name format a25
col dg_name format a20
col path format a50
col state format a10
col MOUNT_STATUS format a10
col HEADER_STATUS format a12
select AD.GROUP_NUMBER,ADG.NAME DG_NAME,ADG.STATE,AD.DISK_NUMBER,AD.MOUNT_STATUS,AD.HEADER_STATUS,AD.NAME,AD.OS_MB,AD.PATH
from
v$asm_disk AD,
v$asm_diskgroup ADG
where AD.GROUP_NUMBER=ADG.GROUP_NUMBER (+)
--and ADG.NAME like '%SPARE%'
and ADG.NAME like '%DB01_DATA1%'
order by ADG.NAME,AD.NAME;
GROUP_NUMBER DG_NAME STATE DISK_NUMBER MOUNT_STAT HEADER_STATU NAME OS_MB PATH
------------ -------------------- ---------- ----------- ---------- ------------ ------------------------- ---------- --------------------------------------------------
41 DB01_DATA1 MOUNTED 0 CACHED MEMBER DB01_DATA1_0000 36866 /dev/oracle/asmdat.emc0_10c6.36866.lun
41 DB01_DATA1 MOUNTED 1 CACHED MEMBER DB01_DATA1_0001 258063 /dev/oracle/asmdat.emc0_3278.258063.lun
41 DB01_DATA1 MOUNTED 2 CACHED MEMBER DB01_DATA1_0002 36866 /dev/oracle/asmdat.emc0_2401.36866.lun
41 DB01_DATA1 MOUNTED 3 CACHED MEMBER DB01_DATA1_0003 36866 /dev/oracle/asmdat.emc0_1130.36866.lun
41 DB01_DATA1 MOUNTED 4 CACHED MEMBER DB01_DATA1_0004 36866 /dev/oracle/asmdat.emc0_1126.36866.lun
-- chosen disks to be removed :
/dev/oracle/asmdat.emc0_10c6.36866.lun
/dev/oracle/asmdat.emc0_2401.36866.lun
/dev/oracle/asmdat.emc0_1130.36866.lun
/dev/oracle/asmdat.emc0_1126.36866.lun
ALTER DISKGROUP DB01_DATA1 DROP DISK DB01_DATA1_0000;
ALTER DISKGROUP DB01_DATA1 DROP DISK DB01_DATA1_0002;
ALTER DISKGROUP DB01_DATA1 DROP DISK DB01_DATA1_0003;
ALTER DISKGROUP DB01_DATA1 DROP DISK DB01_DATA1_0004;
-- check rebalance (keeping on checking until the output is "no rows selected")
set lin 250
select B.NAME as DISKGROUP_NAME, A.OPERATION, A.STATE, A.POWER, A.SOFAR, A.EST_WORK, A.EST_RATE, A.EST_MINUTES
from V$ASM_OPERATION a,v$asm_diskgroup b
where a.GROUP_NUMBER=b.group_number;
ASMCMD> md_backup /cs/oracle/grid/asm_md_backup.041115
Please extend diskgroup DB01_DATA1 by using disk from Spare disk group.
Choosen disk for addition: /dev/oracle/asmdat.emc0_4ad8.258063.lun -- chosen from SPARE_DG
-- check if disk is still in SPARE group ( if disk is still in SPARE_GROUP )
select inst_id, name, path from gv$asm_disk where path IN('/dev/oracle/asmdat.emc0_4ad8.258063.lun');
SQL> select inst_id, name, path from gv$asm_disk where path IN('/dev/oracle/asmdat.emc0_4ad8.258063.lun');
INST_ID NAME PATH
---------- ------------------------- -----------------------------------------
4 SPARE_DG_0004 /dev/oracle/asmdat.emc0_4ad8.258063.lun
3 SPARE_DG_0004 /dev/oracle/asmdat.emc0_4ad8.258063.lun
2 SPARE_DG_0004 /dev/oracle/asmdat.emc0_4ad8.258063.lun
5 SPARE_DG_0004 /dev/oracle/asmdat.emc0_4ad8.258063.lun
1 SPARE_DG_0004 /dev/oracle/asmdat.emc0_4ad8.258063.lun
SQL>
-- drop disk from spare group
ALTER DISKGROUP SPARE_DG DROP DISK SPARE_DG_0004;
-- check whether rebalance is complete (keeping on checking until the output is "no rows selected").
set lin 250
select B.NAME as DISKGROUP_NAME, A.OPERATION, A.STATE, A.POWER, A.SOFAR, A.EST_WORK, A.EST_RATE, A.EST_MINUTES
from V$ASM_OPERATION a,v$asm_diskgroup b
where a.GROUP_NUMBER=b.group_number;
-- check free name in DB01_DATA1 group
set pagesize 100
SELECT a.NAME as DISK_NAME
from v$asm_disk a, v$asm_diskgroup b
where a.group_number=b.group_number
and b.name like '%DB01_DATA1%'
order by 1;
-- add disk to DB01_DATA1
ALTER DISKGROUP DB01_DATA1 ADD DISK '/dev/oracle/asmdat.emc0_4ad8.258063.lun' NAME DB01_DATA1_0005;
-- check rebalance (keeping on checking until the output is "no rows selected")
set lin 250
select B.NAME as DISKGROUP_NAME, A.OPERATION, A.STATE, A.POWER, A.SOFAR, A.EST_WORK, A.EST_RATE, A.EST_MINUTES
from V$ASM_OPERATION a,v$asm_diskgroup b
where a.GROUP_NUMBER=b.group_number;
-- Remove the 36GB luns from the DB01_DATA1 DG
-- choose the 36GB disks from the below query :
set lines 200 pages 200
col name format a25
col dg_name format a20
col path format a50
col state format a10
col MOUNT_STATUS format a10
col HEADER_STATUS format a12
select AD.GROUP_NUMBER,ADG.NAME DG_NAME,ADG.STATE,AD.DISK_NUMBER,AD.MOUNT_STATUS,AD.HEADER_STATUS,AD.NAME,AD.OS_MB,AD.PATH
from
v$asm_disk AD,
v$asm_diskgroup ADG
where AD.GROUP_NUMBER=ADG.GROUP_NUMBER (+)
--and ADG.NAME like '%SPARE%'
and ADG.NAME like '%DB01_DATA1%'
order by ADG.NAME,AD.NAME;
GROUP_NUMBER DG_NAME STATE DISK_NUMBER MOUNT_STAT HEADER_STATU NAME OS_MB PATH
------------ -------------------- ---------- ----------- ---------- ------------ ------------------------- ---------- --------------------------------------------------
41 DB01_DATA1 MOUNTED 0 CACHED MEMBER DB01_DATA1_0000 36866 /dev/oracle/asmdat.emc0_10c6.36866.lun
41 DB01_DATA1 MOUNTED 1 CACHED MEMBER DB01_DATA1_0001 258063 /dev/oracle/asmdat.emc0_3278.258063.lun
41 DB01_DATA1 MOUNTED 2 CACHED MEMBER DB01_DATA1_0002 36866 /dev/oracle/asmdat.emc0_2401.36866.lun
41 DB01_DATA1 MOUNTED 3 CACHED MEMBER DB01_DATA1_0003 36866 /dev/oracle/asmdat.emc0_1130.36866.lun
41 DB01_DATA1 MOUNTED 4 CACHED MEMBER DB01_DATA1_0004 36866 /dev/oracle/asmdat.emc0_1126.36866.lun
-- chosen disks to be removed :
/dev/oracle/asmdat.emc0_10c6.36866.lun
/dev/oracle/asmdat.emc0_2401.36866.lun
/dev/oracle/asmdat.emc0_1130.36866.lun
/dev/oracle/asmdat.emc0_1126.36866.lun
ALTER DISKGROUP DB01_DATA1 DROP DISK DB01_DATA1_0000;
ALTER DISKGROUP DB01_DATA1 DROP DISK DB01_DATA1_0002;
ALTER DISKGROUP DB01_DATA1 DROP DISK DB01_DATA1_0003;
ALTER DISKGROUP DB01_DATA1 DROP DISK DB01_DATA1_0004;
-- check rebalance (keeping on checking until the output is "no rows selected")
set lin 250
select B.NAME as DISKGROUP_NAME, A.OPERATION, A.STATE, A.POWER, A.SOFAR, A.EST_WORK, A.EST_RATE, A.EST_MINUTES
from V$ASM_OPERATION a,v$asm_diskgroup b
where a.GROUP_NUMBER=b.group_number;
No comments:
Post a Comment