Appendix A: Automatic Storage Management

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.

Topics

This tutorial covers the following topics:

Viewing Disk Groups

Removing a Disk

Adding a Disk

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.

Overview

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

Viewing Disk Groups

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.

Place the cursor over this icon to see the image

 

2.

Click the crs Cluster link.

Place the cursor over this icon to see the image

 

3.

Click Targets.

Place the cursor over this icon to see the image

 

4.

Click the instance name that starts with +ASM1.

Place the cursor over this icon to see the image

 

5.

Click the Administration tab.

Place the cursor over this icon to see the image

 

6.

Click the link for the MY_DG2 disk group.

Place the cursor over this icon to see the image

 

7.

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

Place the cursor over this icon to see the image

 

Back to Topic List

Removing a Disk

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 MY_DG2_0000, and then click Remove.

Place the cursor over this icon to see the image

 

2.

Click Yes to confirm.

Place the cursor over this icon to see the image 
      

 

3.

When returned to the Disk Group page, click the Performance tab.

Place the cursor over this icon to see the image

 

4.

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

Place the cursor over this icon to see the image

 

5.

After the Disk Group I/O Response Time graph returns to 0 ms (this make take a few minutes), click the General tab in the upper left corner of the page to return to the Disk Group home page.

Place the cursor over this icon to see the image

 

 

6.

Note that the MY_DG2_0000 disk no longer appears in the list. Also notice that the data has been redistributed among the remaining disks.

If the MY_DG2_0000 disk is still listed, it should have a "State" of "DROPPING." Refresh the page until only three disks appear in the list.

Place the cursor over this icon to see the image

 

Back to Topic List

Adding a 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.


$ cd /home/oracle/wkdir

$ sqlplus "/ as sysdba"

SQL> @pop_t1.sql

Place the cursor over this icon to see the image

 

2.

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

Place the cursor over this icon to see the image

Keep this window open.

 

3.

Return to the Enterprise Manager Console, and click Add in the Member Disks region of the Disk Group page..

Place the cursor over this icon to see the image

 

4.

On the Add Disks page, select the disk that was removed previously, whose path is "/dev/raw/raw15." (Note that it is the only disk with a "Header Status" of "FORMER." In the "ASM Disk Name" column, enter MY_DG2_0004. Leave the other column values as the default.

Do not click the OK button yet.

Place the cursor over this icon to see the image

 

5.

Return to the terminal window. Start SQL*Plus. Connect as a SYSDBA user. At the SQL prompt run the poll_timing.sql script.


sqlplus "/ as sysdba"

@poll_timing.sql

After you press [Enter] to start execution of the script, immediately return to the Enterprise Manager page and click the OK button.

Place the cursor over this icon to see the image

 

6.

In 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.

Place the cursor over this icon to see the image

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

 

Place the cursor over this icon to see the image

 

7.

Return to the terminal window. Scroll through the script output, which shows timings for a query being run repeatedly while the data was being rebalanced across the disks in ASM. Note the different elapsed times for each run. Compare the final elapsed query time which the timing value obtained in step 2. You see that the load on the disks is distributed equally and while the query time decreases and then stabalizes

Place the cursor over this icon to see the image

 

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