Managing ASM Disk Groups
Managing ASM Disk Groups
This tutorial illustrates the disk rebalancing that Automatic
Storage Management (ASM) does when disk volumes are added or removed to or from
disk groups.
Approximately 1 hour
This tutorial covers the following topics:
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.
This example illustrates how Automatic Storage Management
manages the data stored on the disks available to it at the time. Striping is
performed on the allocated disks. When a disk is removed, rebalancing
is automatically performed, and the data is redistributed evenly across the remaining
disks. When a disk is added, a proportional subset of data is evenly reallocated
from the legacy disks to the newly added one.
Back to Topic List
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.
Back to Topic List
Before starting this tutorial, you should have:
Back to Topic List
To view the existing Disk Groups in an ASM instance,
perform the following steps:
| 1. |
Start Oracle Enterprise Manager (Desktop icon) by entering this URL,
and enter sys/<password> as SYSDBA. Click Login.

|
| 2. |
Click the crs Cluster link.
|
| 3. |
Click Targets.

|
| 4. |
Click the instance name that ends with +ASM1.

|
| 5. |
In the bar chart on the right, click the bar belonging to the MY_DG2
disk group.

|
| 6. |
Log in to the ASM instance by using userid sys/<password> as
SYSDBA. You need to log in to the ASM instance because you have selected
a disk group, and disk groups are managed in the ASM instance.

|
| 7. |
View the disks in the disk group. Note that the data is evenly spread
across the four disks.

|
Back to Topic List
To remove a disk from a disk group in an ASM instance,
perform the following steps:
| 1. |
On the page from the last step of the previous topic (the disk listing
for the disk group), select the disk MY_DG2_0003, and then click
Delete.

|
| 2. |
Click Yes to confirm.
|
| 3. |
Click the Performance tab.

|
| 4. |
Set the Refresh rate (see the top right of the page) to 15 seconds
and observe the graph changes after refreshing.

After the graph changes settle (this may take several minutes), click
the General link to the upper left of the page to return to the
general disk group information page.
|
| 5. |
Note that the MY_DG2_0003 disk no longer appears in the list. If it is
still there, it should have a "State" of "DROPPING."
Refresh the page until it is removed from the list.

Note that each of the three disks now has a greater percentage used. That
is because the data from the dropped disk has been rebalanced onto the
remaining three disks.
|
Back to Topic List
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.
Press [Alt] + [Tab] to access a terminal session, and enter the following commands:
cd /home/oracle/wkdir
./pop_t1.sh

|
| 2. |
Note the "Elapsed" timing value for the query at the end. You
will compare this with later query timings.

Keep this window open.
|
| 3. |
Return to the Enterprise Manager page, and click Add Disks.

|
| 4. |
On the left, select the disk that was removed previously, whose path
is "/dev/raw/raw25." (Note that it is the only disk with
a "Header Status" of "FORMER." In the "ASM
Disk Name" column, enter MY_DG2_0003. Leave the other column
values as the default.
Do not click the OK button yet.

|
| 5. |
Press [Alt] + [Tab] and return to the terminal window, and then run the command below. After you press [Enter] to start this script, immediately return to the Enterprise Manager page and click the OK button.
./poll_timing.sh

|
| 6. |
Return to the Enterprise Manager window. Click the browser's Reload
button. Observe the change in the bar graph for the "Used"
column, for each disk. Specifically note the growth in the value for the
disk just added.

Click Reload again.

Click Reload again. (Repeat until the graph stops changing.)

|
| 7. |
Press [Alt] + [Tab] and return to the terminal window. Scroll through the timings that were output for the same query being run while the data was being rebalanced.
Note the change in times for each run. Press [Ctrl] + [C] to cancel the
script when done.

|
Back to Topic List
In this tutorial, you've learned how to:
 |
View a Disk Group |
 |
Remove and Add a Disk Group |
Back to Topic List
 |
To learn more about
Oracle Database 10g, refer to additional OBEs on the OTN
Web site. |
 |
To ask a question about this OBE tutorial,
post a query on the OBE
Discussion Forum. |
Back to Topic List
|