Sie sind auf Seite 1von 8

Changing ASM Rebalance Power of an Ongoing Operation

Alejandro Vargas
Principal Support Consultant
Oracle Advanced Support Services

INDEX
Check the Mapping of The ASM disks to remove...............................................................................................................2
Removing ASM Disks from DATA diskgroup for IO test.....................................................................................................3
Drop ASM disks..............................................................................................................................................................3
Check the rate of rebalance............................................................................................................................................4
Change the Rebalance Power........................................................................................................................................4
Check the Progress of the Rebalance Operation............................................................................................................5
Check the rbal Processes Spawned at the OS...............................................................................................................6
Check status once removal finish...................................................................................................................................6
Removing the Devices from ASM.......................................................................................................................................7
Check the Physical devices before removing them from ASM........................................................................................7
Remove the disks from ASM...........................................................................................................................................8

Page 1 of 8
7/2/2008
Changing ASM Rebalance Power of an Ongoing Operation

Check the Mapping of The ASM disks to remove

To check the mapping of your ASM disks on Linux you can use this script:

---------- start here ------------


#!/bin/ksh
for i in `/etc/init.d/oracleasm listdisks`
do
v_asmdisk=`/etc/init.d/oracleasm querydisk $i | awk '{print $2}'`
v_minor=`/etc/init.d/oracleasm querydisk $i | awk -F[ '{print $2}'| awk -F] '{print $1}' |
awk '{print $1}'`
v_major=`/etc/init.d/oracleasm querydisk $i | awk -F[ '{print $2}'| awk -F] '{print $1}' |
awk '{print $2}'`
v_device=`ls -la /dev | grep $v_minor | grep $v_major | awk '{print $10}'`
echo "ASM disk $v_asmdisk based on /dev/$v_device [$v_minor $v_major]"
done
---------- finish here ------------

ASM disk "VOL15" based on /dev/sda1 [94, 173]


ASM disk "VOL16" based on /dev/sdb1 [94, 177]
ASM disk "VOL17" based on /dev/sdc1 [94, 181]
ASM disk "VOL18" based on /dev/sdd1 [94, 185]

Page 2 of 8
7/2/2008
Changing ASM Rebalance Power of an Ongoing Operation

Removing ASM Disks from DATA diskgroup for IO test

Drop ASM disks


Once you have checked which are the ASM disks you need to remove you can remove them using the ‘Alter
Diskgroup’ Command

SQL> ALTER DISKGROUP DataDG drop disk VOL18, VOL17, VOL16, VOL15;

Diskgroup altered.

Once the ASM disks are dropped the data on them is rebalanced over to the remaining disks, until this operation is
completed you should not touch the underlying physical devices.

Page 3 of 8
7/2/2008
Changing ASM Rebalance Power of an Ongoing Operation

Check the rate of rebalance.


SQL> select sysdate, GROUP_NUMBER, OPERATION,
STATE, POWER, ACTUAL, SOFAR, EST_WORK,
EST_RATE, EST_MINUTES
from v$asm_operation;

SYSDATE GROUP_NUMBER OPERA STAT POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES
-------------- ------------ ----- ---- ---------- ---------- ---------- ---------- ---------- -----------
02/07/08 16:32 2 REBAL RUN 1 1 2364 15437 300 43

SQL> /

SYSDATE GROUP_NUMBER OPERA STAT POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES
-------------- ------------ ----- ---- ---------- ---------- ---------- ---------- ---------- -----------
02/07/08 16:38 2 REBAL RUN 1 1 3910 20912 287 59

Change the Rebalance Power


Having noticed that performance was bad, the total amount of space of these disks was 12 GB so the rebalance
should have finished quickly, instead the estimated minutes increased, so I have decided to change the rebalance
power to 6. With 6 processes the rebalance did finish much faster.

SQL> alter diskgroup MOE_DATA rebalance power 6;

Diskgroup altered.

Page 4 of 8
7/2/2008
Changing ASM Rebalance Power of an Ongoing Operation

Check the Progress of the Rebalance Operation


SQL> select sysdate, GROUP_NUMBER, OPERATION,
STATE, POWER, ACTUAL, SOFAR, EST_WORK,
EST_RATE, EST_MINUTES
from v$asm_operation;

SYSDATE GROUP_NUMBER OPERA STAT POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES
-------------- ------------ ----- ---- ---------- ---------- ---------- ---------- ---------- -----------
02/07/08 16:44 2 REBAL RUN 6 6 4584 24524 974 20

SQL> /

SYSDATE GROUP_NUMBER OPERA STAT POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES
-------------- ------------ ----- ---- ---------- ---------- ---------- ---------- ---------- -----------
02/07/08 16:57 2 REBAL RUN 6 6 17942 35812 1175 15

SQL> /

SYSDATE GROUP_NUMBER OPERA STAT POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES
-------------- ------------ ----- ---- ---------- ---------- ---------- ---------- ---------- -----------
02/07/08 17:06 2 REBAL RUN 6 6 27084 38004 960 11

SQL> /

SYSDATE GROUP_NUMBER OPERA STAT POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES
-------------- ------------ ----- ---- ---------- ---------- ---------- ---------- ---------- -----------
02/07/08 17:09 2 REBAL RUN 6 6 29619 38650 962 9

SQL> /

SYSDATE GROUP_NUMBER OPERA STAT POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES
-------------- ------------ ----- ---- ---------- ---------- ---------- ---------- ---------- -----------
02/07/08 17:13 2 REBAL RUN 6 6 33519 39601 934 6

Page 5 of 8
7/2/2008
Changing ASM Rebalance Power of an Ongoing Operation

Check the rbal Processes Spawned at the OS


avargas-il:~ # ps -efa | grep asm_arb
oracle 5642 1 0 16:38 ? 00:00:00 asm_arb0_+ASM
oracle 5644 1 0 16:38 ? 00:00:00 asm_arb1_+ASM
oracle 5646 1 0 16:38 ? 00:00:00 asm_arb2_+ASM
oracle 5648 1 0 16:38 ? 00:00:00 asm_arb3_+ASM
oracle 5650 1 0 16:38 ? 00:00:00 asm_arb4_+ASM
oracle 5652 1 0 16:38 ? 00:00:00 asm_arb5_+ASM

Check status once removal finish


SQL> select NAME,PATH,MOUNT_STATUS,STATE from v$asm_disk
where path in ('ORCL:VOL18','ORCL:VOL17','ORCL:VOL16','ORCL:VOL15');

NAME PATH MOUNT_S STATE


---------- -------------------- ------- --------
ORCL:VOL15 CLOSED NORMAL
ORCL:VOL18 CLOSED NORMAL
ORCL:VOL17 CLOSED NORMAL
ORCL:VOL16 CLOSED NORMAL

Page 6 of 8
7/2/2008
Changing ASM Rebalance Power of an Ongoing Operation

Removing the Devices from ASM

avargas-il > su -
Password:

avargas-il:~ # /etc/init.d/oracleasm querydisk VOL15


Disk "VOL15" is a valid ASM disk on device [94, 173]
avargas-il:~ # /etc/init.d/oracleasm querydisk VOL16
Disk "VOL16" is a valid ASM disk on device [94, 177]
avargas-il:~ # /etc/init.d/oracleasm querydisk VOL17
Disk "VOL17" is a valid ASM disk on device [94, 181]
avargas-il:~ # /etc/init.d/oracleasm querydisk VOL18
Disk "VOL18" is a valid ASM disk on device [94, 185]

Check the Physical devices before removing them from ASM


avargas-il:~ # ls -l /dev/| grep 94, | grep 173
brw-rw---- 1 root disk 94, 273 Jun 12 2007 dsda1
avargas-il:~ # ls -l /dev/| grep 94, | grep 177
brw-rw---- 1 root disk 94, 277 Jun 12 2007 dsdb1
avargas-il:~ # ls -l /dev/| grep 94, | grep 181
brw-rw---- 1 root disk 94, 281 Jun 12 2007 dsdc1
avargas-il:~ # ls -l /dev/| grep 94, | grep 185
brw-rw---- 1 root disk 94, 285 Jun 12 2007 dsde1

Page 7 of 8
7/2/2008
Changing ASM Rebalance Power of an Ongoing Operation

Remove the disks from ASM


avargas-il:~ # /etc/init.d/oracleasm deletedisk VOL15
Removing ASM disk "VOL15": done
avargas-il:~ # /etc/init.d/oracleasm deletedisk VOL16
Removing ASM disk "VOL16": done
avargas-il:~ # /etc/init.d/oracleasm deletedisk VOL17
Removing ASM disk "VOL17": done
avargas-il:~ # /etc/init.d/oracleasm deletedisk VOL18
Removing ASM disk "VOL18": done
avargas-il:~ # /etc/init.d/oracleasm scandisks
Scanning system for ASM disks: done

End of Report

Page 8 of 8
7/2/2008