Using Native Windows Files for Oracle ASM

May 2008

Situation
You want to standardize your Oracle installations or want to take advantage of the benefits of ASM but you do not have an adequate number of disks, access to a SAN, or access to another type of uncooked file system to support the installation.

Problem
You don’t want to invest in the additional hardware required to host the ASM disk groups nor do you want to reorganize existing disks that do have adequate disk space for the Oracle development environments.

Solution
Create your ASM Disk Groups on NTFS.  This will allow you to take advantage of ASM features and potentially standardize your installations of development or test database environments.  

Tips
1.  On your ASM Instance set the following init parameters:

SQL> alter system set asm_diskstring='g:\asmdisks\_file*' scope=both;
SQL> alter system set "_asm_allow_only_raw_disks"=false scope=spfile;

2.    Restart the ASM Instance

3.    Create a perl script called CreateASMFiles.pl with the following code:

my $s='0' x 2**20;

open(File1,">g:/asmdisks/_file_disk5") || die "Incorrect Path - $!\n";
open(File2,">g:/asmdisks/_file_disk6") || die "Incorrect Path - $!\n";
open(File3,">g:/asmdisks/_file_disk7") || die "Incorrect Path - $!\n";


for (my $i=1; $i<2048; $i++) {
print File1 $s;
print File2 $s;
print File3 $s;
}

Exit

4.  Now execute the perl script with a perl interpreter.  If you don’t already have one, Oracle provides one and below is an example of its location.  This script will create three files each 2048MB in size.  You can adjust this to fit your requirements.

C:\oracle\product\10.2.0\db_1\perl\5.8.3\bin\MSWin32-X86-multi-thread\perl CreatASMFiles.pl

5.   Now you are ready to bring your devices into the Oracle ASM family.  You may do this via DBCA (Database Configuration Assistant) or via SQL*Plus commands used for administrating ASM (create diskgroup).

You may use a similar approach within Unix by using the dd command to pre-create your disk file devices.

If you need more information, contact Gary Codeluppi at 937-431-1026 x123 or visit the Ross Group Inc web site at www.rossgroupinc.com.
Comments (0)Add Comment
Write comment
 
 
smaller | bigger
 

busy
search | login