Legal | Privacy
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

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

Before starting this tutorial, you should have:

1.

Completed the Installing Oracle Database 10g on Windows Using Real Application Clusters (RAC) and Automated Storage Management (ASM) tutorial

OR

Completed the Installing Oracle Database 10g on Linux tutorial

 

2.

Downloaded and unzipped asm.zip into your working directory (/home/oracle/wkdir)

 

Back to Topic List

Viewing Disk Groups

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.

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 ends with +ASM1.

Place the cursor over this icon to see the image

 

5.

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

Place the cursor over this icon to see the image

 

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.

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

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.

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 the graph changes after refreshing.

Place the cursor over this icon to see the image

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.

Place the cursor over this icon to see the image

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

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. Press [Alt] + [Tab] to access a terminal session, and enter the following commands:

cd /home/oracle/wkdir

./pop_t1.sh

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 page, and click Add Disks.

Place the cursor over this icon to see the image

 

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.

Place the cursor over this icon to see the image

 

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

Place the cursor over this icon to see the image

 

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.

Place the cursor over this icon to see the image

Click Reload again.

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.

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.

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

Back to Topic List

 

 

 

 

E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy