You are on page 1of 29

How to create ASM diskgroups on Windows

Software Used:
Sl. No.

Component

Product Used

Software for ASM creation

Oracle Grid Infrastructure 11.2.0.4 for Windows


64-bit (from Oracle patch 13390677)

Operating System

Windows Server 2008R2 Enterprise Editon x64

Test Environment Provision

Oracle VM Virtualbox 5.0.0 r101573

Purpose of document:
The purpose of this document is to enable an administrator to provide for Oracle ASM marked storage on a Windows
Server system using only Oracle software and its local disks. Normally, Oracle ASM (Automatic Storage
Management) should be configured on clustered storage systems, eg. SAN; however many times, ASM is needed
without the availability of a SAN. This method can be used in such cases.
This document was created in response to a client requirement for Oracle Maximum Availability Architecture plan on
Windows Server2008R2 using 11gR2 a plan involving a 2-node RAC primary database and a single node physical
standby configured via Oracle Dataguard principles.
As primary RAC will be in ASM, hence a similar storage configuration is needed at standby end.
Process Outline:
The following steps are involved in this process.
(A) New storage media setup on machine
(B) Formatting the storage
(C) Stamping disks for ASM
(D) Installing and Configuring Grid Infrastructure
(E) Creating Additional ASM diskgroups.
(F) Status Check

Tata Consultancy Services Ltd.

Author: Sarat Das

(A) New storage media setup on machine


In case of a physical machine, the storage will already be present and the administrators have to be notified to format
the disk and create partitions accordingly. Here, since we are testing in a virtual environment; we'll add extra disks.
1) Add new hard disk storage to the existing VM.

2) Select Create New Disk to add more disks.

Tata Consultancy Services Ltd.

Author: Sarat Das

3) From the popup menu, select a disk of the same type as the existing virtual disk files. Here VMDK
is chosen as the VM originally has a VMDK disk.

4) Choose a hard disk of Fixed Size because expansion of the Oracle ASM managed virtual media
may not cause actual expansion of disk file; hence we already allocate the full space
to the virtual hard disk.

Tata Consultancy Services Ltd.

Author: Sarat Das

5) Enter path for VMDK file and required size and click on Create to create the Virtual Disk.

6) After Required Disk Addition, we now have a machine with 3 local disks (Not independent/persistent)

Disk 0 Default
(40 GB)
Disk 1 For Local + ASM Storage (15 GB)
Disk 2 For Grid Infrastructure OCR and Voting (5 GB)

Tata Consultancy Services Ltd.

Author: Sarat Das

(B) Formatting the storage


We now have 3 disks attached to the PC. One disk, which contains the OS, will be left undisturbed.
Although, via the option Shrink Volume from the in-built Disk Management Tool of Windows (diskmgmt.msc), we
can even use that; but it is best not to.
Here, we shall format the disks to create one disk with solely RAW format and another disk
to have NTFS formatting + RAW content.
ASM can be set up over RAW media, but if someone also needs part of a disk for additional local storage; some
filesystem formatting on the remainder of the disk space will be needed. This is why the following activity is done
making one of the target disks have RAW area as well as a filesystem (NTFS) area.
The command line diskpart utility and the GUI based (and simpler) Disk Management Utility present in the
Windows Server 2008R2 OS are used in the formatting activity.
1) Using diskpart to format a disk for the OCR+Voting Disk.
In 11gR2, the Oracle Cluster Registry and the Voting Disk data are stored in ASM diskgroup by default.
We'll format the 5GB hard disk to be a full RAW device for this purpose.
(a) Open the diskpart Utility from the command line
(b) Enter command list disk to show the physical disks attached.
(c) Enter select disk <N> to select the disk to be formatted/partitioned. [ Disk 2 in this case ]
(d) Enter create partition primary to create a primary RAW partition on the disk.
(e) Use command list volume to see the volumes in the disks [ Disk 2 of 5GB will be fully RAW]
(f) Exit diskpart tool
Refer to the screenshot below for the operations done to create the RAW area.

Tata Consultancy Services Ltd.

Author: Sarat Das

2) Formatting the 2nd Disk using GUI from diskmgmt.msc


The 2nd disk will be partitioned using the Disk Management Tool. Enter diskmgmt.msc in the Run box.
(i) At first launch, it will ask to initialize the remaining disk (Disk 1). Accept MBR.

Once intialised, the state of the disks on the system will be visible. The 15 GB disk will be RAW, while the disk in use
by the OS binaries will be shown as Active Primary partition.

Tata Consultancy Services Ltd.

Author: Sarat Das

(ii) Right-click on Disk 1 and choose New Simple Volume to create new volume.

(iii) Set a volume size at desired value (here 3GB or 3072 MB)

Tata Consultancy Services Ltd.

Author: Sarat Das

(iv) Now, assign a drive letter to the partition

(v) Select file system on the partition as NTFS (default for Windows 2008R2)

Tata Consultancy Services Ltd.

Author: Sarat Das

(vi) Confirm for disk creation

(vii) This is the state after creating the partition.

Tata Consultancy Services Ltd.

Author: Sarat Das

(viii) Now begin creating partitions from the remaining area on Disk1

(ix) Choose 6 GB out of the 12 GB remaining for RAW partition 1

Tata Consultancy Services Ltd.

10

Author: Sarat Das

(x) For this partition, do not assign a drive letter.

(xi) Also, do not format the partition; hence making it raw.

Tata Consultancy Services Ltd.

11

Author: Sarat Das

(xii) Confirm on creation of partition.

(xiii) Repeat raw partition creation on remaining space of Disk 1. The final layout looks like this

(xiv) Exit the Disk Management Utility.

Tata Consultancy Services Ltd.

12

Author: Sarat Das

(C) Stamping Disks for ASM


1) Unzip the grid installation software to get the grid folder. Run the asmtoolg utility
within the sub-folder asmtool of the extracted folder grid.
2) Select Add or Change Label and proceed.

3) From the list of Select the Disks to be stamped, choose Device\HardDisk2\Partition1


Notice that the status is shown Candidate Device. Label the disk as OCRVOTE.
Confirm by clicking Next.

This sets the disk up for OCR diskgroup creation, to be done during Grid Infrastruture install+config.
The stamping for other ASM disks will be created later.

Tata Consultancy Services Ltd.

13

Author: Sarat Das

(D) Installing and Configuring Grid Infrastructure


1) Run the file setup.exe from the extracted folder grid of the Oracle installation media.

2) Choose Skip Software Updates and proceed.

Tata Consultancy Services Ltd.

14

Author: Sarat Das

3) Select Configure Oracle Grid Infrastructure for a Standalone Server

From Oracle 11gR2 onwards, ASM configuration tools are a part of Grid Infrastructure whereas the ASM
configuration tools were a part of Database software in 10g and 11gR1. As this machine is going to have
Oracle's Automatic Storage Management (ASM), Grid Infrastructure installation and configuration is being done.

Tata Consultancy Services Ltd.

15

Author: Sarat Das

4) Select the disk stamped for OCRVOTE to create the OCRVOTE ASM diskgroup.

Select the disk stamped for OCRVOTE to create the OCRVOTE ASM diskgroup. Redundancy is selected as
External so that hardware mirroring/striping is used to maintain replicas, keeping less load on Oracle software
processes.

Tata Consultancy Services Ltd.

16

Author: Sarat Das

5) Enter password for SYS and ASMSNMP users. The password entered here is sys123

Tata Consultancy Services Ltd.

17

Author: Sarat Das

6) Specify ORACLE_BASE and GRID_HOME locations.


Oracle Base C:\app\Administrator
Grid Home C:\app\Administrator\product\11.2.0\grid
Locations entered are compliant with Oracle's prescribed Optimal Flexible Architecture (OFA)

Tata Consultancy Services Ltd.

18

Author: Sarat Das

7) The prerequisite checks have succeeded.

Observe prescribed and detected settings if need be and then click on Next to proceed.

Tata Consultancy Services Ltd.

19

Author: Sarat Das

8) The final confirmation screen is seen. Save the response file and then begin installation.

Tata Consultancy Services Ltd.

20

Author: Sarat Das

9) View the progress of installation and configuration.

10) The success screen is shown on completion.

Tata Consultancy Services Ltd.

21

Author: Sarat Das

(E) Creation of additional ASM Disks


After the grid infrastructure installation and configuration for a standalone server is done, we can now create
additional ASM diskgroups for use by future databases.
1) Launch the ASM configuration assistant from the Start Menu. It may be present already in
the Recently Used list, and can normally be accessed in the shortcut folder for
the newly installed Grid Home. It can be invoked from the command line by asmca.

Tata Consultancy Services Ltd.

22

Author: Sarat Das

2) See that there is only one ASM diskgroup. Click on Create to add further ASM diskgroups.

3) ASM diskgroup creation requires disk stamping. Click on Stamp Disks.

Tata Consultancy Services Ltd.

23

Author: Sarat Das

4) The familiar window from asmtoolg opens up. Select Add or change label.

5) Select the required disk(s) and set desired label.

Here, we are creating the stamping for the disks to appear in the DATA diskgroup.
Hence, stamp them with DATA.

Tata Consultancy Services Ltd.

24

Author: Sarat Das

6) Confirm on the ASM link name, size and Device and click Next to approve.

7) Confirm by clicking on Finish

Tata Consultancy Services Ltd.

25

Author: Sarat Das

8) Repeat these steps to stamp the remaining rawdevice for the FRA diskgroup.

9) Now the two stamped disks are seen.

Tata Consultancy Services Ltd.

26

Author: Sarat Das

10) Create diskgroup DATA by selecting the appropriately stamped disk.

Tata Consultancy Services Ltd.

27

Author: Sarat Das

11) Similarly, create the diskgroup FRA (for fast recovery area).

12) Now there are three ASM diskgroups (OCRVOTE, DATA, FRA) . We can now exit.

Tata Consultancy Services Ltd.

28

Author: Sarat Das

(F) Status Check


The status of the grid infrastructure services can be checked on the host by using the grid infrastructure
software commands.
1) asmtool -list to check Disk status

2) crs_stat -t to check services generated and maintained by Oracle Clusterware.

Tata Consultancy Services Ltd.

29

Author: Sarat Das

You might also like