16
Oracle 10g Automatic Storage Management, Part 1: Overview By Jim Czuprynski Synopsis. Oracle 10g's new Automatic Storage Management (ASM) features allow an Oracle DBA to take advantage of a robust, flexible, scalable file storage system that any Oracle database instance can access. This article - the first in this series -- provides a high-level overview of the ASM architecture, and should be helpful to any DBA contemplating the adoption of ASM for storing Oracle database files as part of a high-volume storage solution. With the possible exception of having to rebuild a database server from a "cold metal" starting point, I have to admit that the scenario that holds the most dread for me as an Oracle DBA is to run out of disk space for a production database's datafiles or tempfiles. Though, in most cases this situation can be rectified easily - as long as there is sufficient disk space available, of course! - it always seems that these challenges seem to occur either at the busiest time of my client's business day, or between 02:00 and 03:00 on an early Sunday morning when I am scheduled to be out of town enjoying a long weekend. And I have also encountered my share of unexpected (and unlikely) disk media failures. For example, I once watched five disks in a 42-disk mirrored storage array fail within a three-week period after three years of relatively solid performance. The pattern never repeated itself, but it did teach me the value of a good mirroring strategy! While a storage area network (SAN) and other logical volume manager (LVM) storage solutions like EMC are certainly options for guaranteed storage reliability, the costs of these solutions can be prohibitive for smaller IT organizations. The good news is that Oracle 10g supplies a new set of disk media storage features called Automatic Storage Management (ASM) that are aimed directly at insuring a storage solution for smaller enterprise databases. This series of articles will delve into ASM's rich features and provide examples of how to implement some simple ASM disk configurations for evaluation purposes so that your DBA team can make some decisions about whether ASM is worth pursuing for your organization. I will concentrate this article on a general review of ASM features as well as a brief explanation of the ASM architecture. Automatic Storage Management Features Out-Of-The-Box Functionality. First off, ASM was designed specifically for the storage of Oracle database files. This means that it is ready "out of the box" for use against any Oracle database that it services. Though ASM appears to be the intended replacement for Oracle Cluster File System (OCFS) for the Real Applications Cluster (RAC) environment, that doesn't mean that your database needs to be

Oracle 10g Automatic Storage Management

Embed Size (px)

DESCRIPTION

b

Citation preview

Oracle 10g Automatic Storage Management, Part 1: OverviewBy Jim CzuprynsiSynopsis! Oracle 10g's new Automatic Storage Management (ASM) features allow an Oracle DBA to take advantage of a robust fle!ible scalable file storage s"stem t#at an" Oracle database instance can access$ %#is article & t#e first in t#is series && 'rovides a #ig#&level overview of t#e ASM arc#itecture and s#ould be #el'ful to an" DBA contem'lating t#eado'tion of ASM for storing Oracle database files as 'art of a #ig#&volume storage solution$With the possible exception of having to rebuild a database server from a "cold metal" starting point, I have to admit that the scenario that holds the most dread for me as an Oracle DBA is to run out of disk space for a production database's datafiles or tempfiles !hough, in most cases this situation can be rectified easil" # as long as there is sufficient disk space available, of course$ # it al%a"s seems that these challenges seem to occur eitherat the busiest time of m" client's business da", or bet%een &'(&& and &)(&& on an earl" *unda" morning %hen I am scheduled to be out of to%n en+o"ing a long %eekend And I have also encountered m" share of unexpected ,and unlikel"- disk media failures .or example, I once %atched five disks in a /'#disk mirrored storage arra" fail %ithin a three#%eek period after three "ears of relativel" solid performance !he pattern never repeated itself, but it did teach me the value of a good mirroring strateg"$While a storage area net%ork ,*A0- and other logical volume manager ,123- storage solutions like 435 are certainl" options for guaranteed storage reliabilit", the costs of these solutions can be prohibitive for smaller I! organi6ations !he good ne%s is that Oracle 7&g supplies a ne% set of disk media storage features called Automatic Storage Management (ASM) that are aimed directl" at insuring a storage solution for smaller enterprise databases !his series of articles %ill delve into A*3's rich features and provide examples of ho% to implement some simple A*3 disk configurations for evaluation purposes so that "ourDBA team can make some decisions about %hether A*3 is %orth pursuing for "our organi6ation I %ill concentrate this article on a general revie% of A*3 features as %ell as a brief explanation of the A*3 architectureAutomatic Storage Management "eaturesOut#O$#%&e#Bo' "unctionality! .irst off, A*3 %as designed s'ecificall" for t#e storage of Oracle database files !his means that it is read" "out of the box" for use against an" Oracledatabase that it services !hough A*3 appears to be the intended replacement for Oracle 5luster .ile *"stem ,O5.*- for the 8eal Applications 5luster ,8A5- environment, that doesn't mean that "our database needs to be deplo"ed under 8A5 to take advantage of A*3's m"riad features9 A*3 can be deplo"ed on a single 'rocessor (SM() server +ust as easil" as it can be deplo"ed on a multiple#node 8A5 cluster$ 3oreover, it is simple to configure using the graphic interface provided b" the Database 5onfiguration Assistant ,DB5A-, an existing Oracle tool that +ust about ever" Oracle DBA has used Oracle 7&g also provides the standard 4nterprise 3anager ,43- interface for managing an A*3 instance once it has been created"le'i(le Storage Con$iguration! *ince A*3 is in essence its o%n file management s"stem, this means that I can add more '#"sical storage c#ange storage configurations or remove e!traneous storage %ithout having to shut do%n m" Oracle database to change out ph"sical hard%are !his is a big advantage over traditional hard%are configurations, and is certainl" featured in storage#area net%orks ,*A0s- :sing A*3 also means that I can turn over the ma+orit" of m" space management tasks to the A*3 instance and let it monitor the gro%th of m" database's tablespaces In addition, A*3 maintains pre#existing Oracle database functionalit", so regular Oracle databases can continue to operate as usual 0e% database files can be created as A*3 files managed b" the A*3 instance, existing database files can be migrated to A*3 as time and opportunit" permit, and other database files can continue to exist as "traditional" database files %ithout A*3 file management"ault %olerance! I also expect an" file management s"stem to insure that once I %rite database information to disk, it %ill never be lost # unless, of course, I tell the database to delete that data One %a" that DBAs usuall" guarantee against the inevitable failure of disk hard%are is through mirroring drives via redundant arra"s of inexpensive disks ,aka 8AID- and stri'ing ,%riting portions of disk files to different disks so that if one disk is lost the information is recoverable from another disk in the set- !his guards against the inevitable failure of disk hard%are, since even %ith extremel" high estimated mean time bet%een failures ,3!B.-, a disk drive %ill almost certainl" fail eventuall"3ost operating s"stems provide controls to set up and monitor disk storage to take advantage of these redundanc" features 1ike an" good file management s"stem, A*3 provides fault tolerance b" allo%ing me to %rite duplicate or triplicate copies of an" database files' contents And if m" current server and disk storage s"stem alread" support fault tolerance, so much the better$ A*3 can also take advantage of e!isting vendor&su''lied fault tolerance mec#anisms for increased guarantees to safe data storage*ince A*3 handles the mirroring of data, there is no need to purchase a third#part" 1ogical 2olume 3anager ,123- 3irroring is applied on a file&b"&file basis, rather than on a 'er&volume basis, so the same disk group ma" contain a combination of files protected b" mirroring ,or perhaps not even mirrored at all, if mirroring is not re;uired for some files- A*3 also supports Oracle 8eal Application 5lusters ,8A5- so there is no need for a separate5luster 123 or a 5luster .ile *"stem)*O +oa, Balancing! A*3 is responsible for providing e;ual distribution of )*O loads across all available disk storage resources, so there is a measurable performance improvement .or example, A*3 %ill split a datafile into its component extents and then spread those extents evenl" across all defined disks that A*3 is managing9 those extents are then tracked via an indexing techni;ue A*3 also automaticall" manages data via selection of desired reliabilit" and performance characteristics instead of manuall" manipulating data file storage characteristics, and therefore it tends to reduce ,or even eliminate- manual tuning and retuning of I1E startup mount9A*3 instance started!otal *"stem Alobal Area7&&LL)'PL b"tes.ixed *i6e ONOL/N b"tes2ariable *i6ePPNOML/N b"tesDatabase Buffers& b"tes8edo Buffers& b"tesA*3 diskgroups mountedS&utting /own an Active ASM )nstance! !o shut do%n this A*3 instance, I once again set the O-AC+0BS)/ environment variable and then simpl" issue the S4.%/O>2 )MM0/)A%09 command(KE export O8A514G*IDFHA*3KE s;lplus "s"s as s"sdba"*>1E 5onnected*>1E shutdo%n immediate9A*3 diskgroups dismountedA*3 instance shutdo%n*>1E)mplications o$ S&utting /own an Active ASM )nstance! 0o%, a %arning( When an A*3 instance is shut do%n, it is important to be a%are of the implications for an" regular Oracle database instance that is using A*3 files stored on that A*3 instance !he A*3 files %ill not be accessible to those regular Oracle databases until the A*3 instance is restarted/emonstrating ASM in a Sample /ata(ase0o% that I have explained ho% to create, start, and stop an A*3 instance, I %ill next demonstrate ho% to add a tablespace to an existing Oracle database instance that uses the A*3 instance's disk group instead of the database instance's disk storage to store the ne% tablespace's datafileCreating an ASM#Manage, %a(lespace! What I reall" like about A*3 is its simplicit" I no longer need to be concerned if the tablespace's datafile %ill fit on the drive or spindle I have targeted for storage9 I simpl" inform A*3 that it is responsible for storing the datafile and ho% large the datafile is, and A*3 handles the rest All I needed to do to create a ne% tablespace, %BSBASM1, %as to issue the follo%ing C-0A%0 %AB+0SPAC0 command from a *>1I@lus session running against the database instance(*>1E 584A!4 !AB14*@A54 tbsGasm7 DA!A.I14 'HDA8O:@7' *IQ4 )'39!ablespace created0ote that I did not have to specif" the exact location of the datafile, since A*3 determined from the si6e of the tablespace exactl" ho% it should be striped across the disks in the A*3 disk group 3oreover, since A*3 uses Oracle 3anaged .iles ,O3.- for naming the datafile, A*3 automaticall" named the datafile using the appropriate O3. standard ,I %ill delve into A*3 file naming conventions in greater detail in the next article in this series-4ven more interesting, I did not have to do an"thing special to inform the database instancethat it needed to start up the appropriate 8ebalancing ,8BA1- and A*3 Bridge ,A*3- processes As soon as this ne% tablespace %as created, the database instance detected thatA*3 storage %as in use, and it automaticall" started these t%o background processes, as this snippet from the database's alert log clearl" sho%s(

*un Dec 77 7N()M(&& '&&M584A!4 !AB14*@A54 tbsGasm7 DA!A.I14 'HDA8O:@7' *IQ4 )'3*un Dec 77 7N()M(&) '&&M*tarting background process A*3BA*3B started %ith pidF'7, O* idFOOL*tarting background process 8BA18BA1 started %ith pidF'', O* idF)M'/*un Dec 77 7N()M(&P '&&M*:554**( diskgroup DA8O:@7 %as mounted5ompleted( 584A!4 !AB14*@A54 tbsGasm7 DA!A.I14 'HDA8O:@7' *IQ

Migrating an 0'isting %a(lespace to ASM#Manage, Storage! Another great thing about A*3( I did not have to recreate an existing tablespace %hen I %anted to migrate it to A*3 storage Instead, I used 8ecover" 3anager ,83A0- to create an image co'" of the tablespace's datafile, and then I simpl" migrated that datafile to A*3 !o demonstrate, I created a ne% tablespace in the database instance I then issued the appropriate 83A0 commands to take the tablespace offline, create the image cop" of the tablespace, transfer the tablespace to A*3, and then bring the tablespace back online *ee +isting =!; for the *>1 statements and 83A0 commands that I used to complete this taskSetting .p 0nterprise Manager 50M6 $or ASM )nstance ManagementOracle 7&g 4nterprise 3anager ,43- does provide a simple and elegant %a" to manage A*3storage9 ho%ever, I needed to reconfigure m" database instance's 43 configuration to take advantage of these tools via the 4nterprise 3anager 5onfiguration Assistant ,435A- Once I had created the A*3 instance and had then created at least one A*3#managed file in m" database instance, I removed the original 43 configuration for the database instance and then replaced it %ith a ne% 43 configuration that full" supports A*3 A sample set of 435A commands are sho%n in +isting =!