Legal | Privacy
Creating and Managing ASM Disk Groups

Creating and 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:

Creating an ASM Database
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 done across whatever disks are allocated to it. When a disk is removed, rebalancing is automatically done, 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 onto 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 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 then 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.

Download and unzip asm.zip into your working directory (i.e./home/oracle/wkdir).

 

Back to Topic List

Creating an ASM Database

To create a database for ASM, perform the following steps:

1.

Open a terminal window and execute the following command:

dbca

 

2.

At the Welcome window, click Next.

Place the cursor over this icon to see the image

 

3.

At the Operations window, make sure Create a Database is selected and click Next.

Place the cursor over this icon to see the image

 

4.

At the Database Templates window, select General Purpose and click Next.

Place the cursor over this icon to see the image

 

5.

At the Database Identification window, enter asm.oracle.com for the Global Database Name and asm for the SID and click Next.

Place the cursor over this icon to see the image

 

6.

At the Management Options window, accept the defaults and click Next.

Place the cursor over this icon to see the image

 

7.

At the Database Credentials window, enter a Password and Confirm Password and click Next.

Place the cursor over this icon to see the image

 

8.

At the Storage Options window, select Automatic Storage Management (ASM) and click Next.

Place the cursor over this icon to see the image

 

9.

At the Create ASM Instance window, click ASM Parameters.

Place the cursor over this icon to see the image

 

10.

Enter /u02/asmdisks/* (or the path where your disks are located) in the asm_diskstring value field and click Close.

Place the cursor over this icon to see the image

 

11.

Enter a SYS Password and Confirm SYS Password and click Next.

Place the cursor over this icon to see the image

 

12.

Click OK to create and start the ASM instance.

Place the cursor over this icon to see the image

 

13.

Now you will create your ASM Disk Group. At the ASM Disk Group window, click Create New.

Place the cursor over this icon to see the image

 

14.

Enter DGROUP1 in the Disk Group Name field. A list od Member Disks should appear. Check the checkbox next to Disk Path to select all the disks. If a list of Member Disks does not appear,

Place the cursor over this icon to see the image

 

15.

Select the Disk Group you just created and click Next.

Place the cursor over this icon to see the image

 

16.

Make sure Use Oracle-Managed Files is selected and +DGROUP1 is entered in the Database Area and click Next.

Place the cursor over this icon to see the image

 

17.

Deselect Specify Flash Recovery Area and click Next.

Place the cursor over this icon to see the image

 

18.

Accept the defaults. Click Next.

Place the cursor over this icon to see the image

 

19.

Accept the defaults. Click Next.

Place the cursor over this icon to see the image

 

20.

Accept the defaults. Click Next.

Place the cursor over this icon to see the image

 

21.

Click Finish.

Place the cursor over this icon to see the image

 

22.

Click OK.

Place the cursor over this icon to see the image

 

23.

The progress window appears. The database is being created.

Place the cursor over this icon to see the image

 

24.

The ASM database was created successfully. Note the Enterprise Manager URL. Click Exit.

Place the cursor over this icon to see the image

 

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 the URL http://<your hostname>:5501/em/ and enter sys/<password> as SYSDBA. Then click Login.

Place the cursor over this icon to see the image

 

2.

At the Licensing window, scroll down to the bottom and click I Agree.

Place the cursor over this icon to see the image

 

3.

Click the instance name that ends with +ASM1.

Place the cursor over this icon to see the image

 

4.

See the pie chart on the right. Click the piece of the pie belonging to ASM DGROUP1 Disk Group.

Place the cursor over this icon to see the image

 

5.

Login to the ASM instance using userid sys/<password> as SYSDBA. You need to login to the ASM instance because you've selected a disk group, and disk groups are managed in the ASM instance.

Place the cursor over this icon to see the image

 

6.

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 DGROUP1_0002 and then click Delete.

Place the cursor over this icon to see the image

 

2.

Confirm the delete. Click Yes.

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

Place the cursor over this icon to see the image

After the graph changes settle (this may take several minutes) click the General link in the upper left of the page to go back to the general disk group information page.

Place the cursor over this icon to see the image

 

 

5.

Note that the DGROUP1_0002 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 3 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. Alt-tab to a terminal session and type the commands below:

cd /home/oracle/wkdir

./pop_t1.sh

 

2.

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

Place the cursor over this icon to see the image

Keep this window open, sitting at that directory.

 

3.

Go back 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 "/u02/asmdisks/disk4". (Note that it is the only disk with a "Header Status" of "FORMER". In the "ASM Disk Name" column, enter DGROUP1_0002. Leave the other column values as the default.

Do not click on the OK button yet.

Place the cursor over this icon to see the image

 

5.

Alt-tab back to the terminal window, and run the command below. As soon as you press <enter> to start this script.

./poll_timing.sh

Place the cursor over this icon to see the image

 

6.

Immediately alt-tab back to the Enterprise Manager page and click on the OK button.

Place the cursor over this icon to see the image

 

7.

Switch back to the Enterprise Manager window. Click the browser's Reload button, observing the change in the bar graph for the "Used" column, for each disk, especially noting 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

 

8.

Alt-tab back to the terminal window, and 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:

Create an ASM Database
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