In this chapter you will learn how to use the disk rebalancing that Automatic Storage Management (ASM) does when disk volumes are added or removed to or from disk groups.
This tutorial covers the following topics:
![]() |
Overview | |
![]() |
Scenario | |
![]() |
Viewing Disk Groups | |
![]() |
||
![]() |
Adding a Disk | |
![]() |
Summary |
Place the cursor over this icon to load and view all
the screenshots for this tutorial. (Caution: Because this action loads all screenshots
simultaneously, response time may be slow depending on your Internet connection.)
Note: Alternatively, you can place the cursor over each individual icon in the following steps to load and view only the screenshot associated with that step.
A major part of the database performance equation is disk striping. This often requires many disks in production, and usually entails a lot of administration on the part of the DBA or the system administrator. Making disks available and then unavailable are common activities associated with that administration, and thus, having the Oracle instance react favorably to those changes is a desirable goal. In this scenario, a disk is taken away, and later made available to Oracle again, showing how ASM reacts by redistributing the data to take advantage of a disk's presence or accommodate its absence. This is done while the Oracle database, including the data that is being redistributed, is online and available for use as normal.
To view the existing Disk Groups in an ASM instance, perform the following steps:
1. |
Start the Oracle Enterprise Manager Database Control utility (Desktop icon). Enter sys for the username and oracle for the password. Select SYSDBA in the Connect As drop-down list, then click Login.
|
2. |
Once on the Database Home page, click the ASM link in the General section.
|
3. |
Once on the ASM Home page, click the DATA disk group bar graph.
|
4. |
On the Disk Group: DATA page, you can view various disk group information.
|
5. |
You can scroll down the page if need be to look at all ASM disks currently part of the DATA disk group.
|
To remove a disk from a disk group in an ASM instance, perform the following steps:
1. |
On the Disk Group page, used in the last step of the previous topic, in the Member Disks region, select the disk ASMDISK2, and then click Remove.
|
2. |
Click Yes to confirm.
|
3. |
When returned to the Disk Group page, you should see a successful update message. If you scroll to the Member Disks section, you should be able to see the status of your dropped disk to be DROPPING. This operation may take a certain time because ASM rebalances the data amongst the remaining disks.
|
4. |
Back to the General section of the Disk Group page, click the Pending Operations link.
|
5. |
This takes you to the Pending Operations page where you can see that the rebalance operation is going on. Select the Real Time: 30 Second Refresh option from the Refresh drop down list and wait until you no longer see any on going operation. Then, click the Disk Group: DATA breadcrumb.
|
6. |
Once back to the Disk Group page, scroll down to the Member Disks section and make sure you no longer see your dropped disk.
|
To add a disk to an ASM disk group, perform the following steps:
1. |
Before actually adding the disk back to the disk group, generate some test data for later use. Open a terminal window. Change to the wkdir directory and start SQL*Plus. Connect as a SYSDBA user. At the SQL prompt run the pop_t1.sql script.
$ sqlplus "/ as sysdba" SQL> @pop_t1
|
2. |
Note the "Elapsed" timing value for the query at the end. You will compare this with later query timings. Keep this window open and reconnect to SQL*Plus as user SYS, and make sure you set echo and timing on.
|
3. |
Return to the Enterprise Manager Console, and click Add in the Member Disks region of the Disk Group page..
|
4. |
On the Add Disks page, select the disk that was removed previously, whose Header Status is set to FORMER. Once done, click OK. This triggers a rebalance operation right after the disk has been added to the disk group.
|
5. |
Once the disk is successfully added to the disk group, click the Pending Operations link in the General section of the Disk Group page.
|
6. |
On the Pending Operations page, select the Real Time: 30 Second Refresh value from the Refresh drop down list.
|
7. |
Return to the terminal window and execute the following query from your SQL*Plus session:
Repeat this step many times while the rebalance operation is in process. You should not see any noticeable difference in the execution time.
|
6. |
In the Enterprise Manager window, wait until the rebalance operation is completed. Once done, click the Disk Group: DATA breadcrumb.
|
7. |
Back to the Disk Group page, you should now see your disk added, and that the rebalance operation did spread out evenly the data.
|
In this tutorial, you've learned how to:
![]() |
View a Disk Group | |
![]() |
Remove and Add a Disk Group |