Automatic Storage Management

Overview & Best Practices
-Nitin Vengurlekar RAC/ASM Development

Automatic Storage Management
A new feature introduced in Oracle Database 10g Ÿ Provides a vertical integration of the file system and volume manager for Oracle database files Ÿ Spreads database files across all available storage for optimal performance and resource utilization Ÿ Enables simple and non-intrusive resource allocation and provides automatic rebalancing Ÿ Works in single-instance and RAC databases

ASM Installation Best Practices
Ÿ Install ASM in a separate ORACLE_HOME than the database ORACLE_HOME
– –

Provides higher availability and manageability allows independent upgrades of the database and ASM. de-installation of database software can be performed without impacting the ASM instance

2 .1 and 10.ASM upgrade – 10.2 binaries and startup ASM Ÿ There’s no catalog or data dictionary to be upgraded.1 to 10. All data is on raw disk Ÿ No internal structure change between 10. simply install the 10.2.2 Ÿ To upgrade ASM from 10.1 -> 10.

each clustered node will have an ASM instance – ASM instances use the interconnect to synchronize metadata .ASM Instance Ÿ Only one ASM instance per node – manages storage for all databases instances on the node Ÿ In RAC environments.

'FLASH'.Sample init.'DATA_SOX‘ #RAC parameters +ASM1.instance_number=2 cluster_database=true # trace files background_dump_dest=/opt/oracle/product/server32/10gr1/admin/+ASM/bdump core_dump_dest=/opt/oracle/product/server32/10gr1/admin/+ASM/cdump user_dump_dest=/opt/oracle/product/server32/10gr1/admin/+ASM/udump .ora parameters instance_type=asm #SGA sizing large_pool_size=20M shared_pool_size=80M processes=55 #Storage asm_diskstring='ORCL:*' asm_diskgroups='DATA'.instance_number=1 +ASM2.

ora parameter Ÿ Use default values – Only processes parameter may need modification Ÿ Processes parameter setting is dependent on the number of databases that connect to ASM processes= 25 + 15n. where n = # databases connected to ASM .Setting init.

ASM administration Ÿ Disks Ÿ Diskgroups Ÿ Files 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 .

Diskgroup Best Practices .

Diskgroup Best Practices Ÿ Create two diskgroups. One for database area and another for flash recovery area – Note. no need to separate data from indexes A That’s old school a Ÿ Create diskgroups using large number of similar type disks – – same size characteristics same performance characteristics .

Diskgroup Best Practices Ÿ The size of the Flash Recovery Area Diskgroup will depend on what is stored and how much is retained The FRA size should be driven by recovery time objectives Ÿ .

make the change in a single rebalance operation. perform all required mount operations in a single mount command If adding or removing multiple disks.Diskgroup Best Practices Ÿ To minimize search overhead. – Ÿ This coalesces rebalance operations and reduces overhead .

Diskgroup Best Practices Ÿ Use ASM External Redundancy when using high end storage arrays Use ASM Redundancy for low-end (modular) or JBOD storage array systems Use failure groups with ASM Redundancy. . – Ÿ Ÿ determine what failure components your are protecting yourself from.

. mode_status from v$asm_disk Ÿ This includes all mounted and dismounted diskgroups. state. Ÿ To view FREE_MB for diskgroup query the ASM instance and not the database instance. type from v$asm_diskgroup Ÿ Select name. header_status. Ÿ Select name.V$ view for v$asm_diskgroup Ÿ To see what diskgroups are discovered by ASM.

Disk Best Practices .

Disk Best Practices Ÿ Make sure disks span multiple backend disk adapters Ÿ Implement multiple access paths to the storage array using two or more HBAs or initiators Ÿ Deploy multi-pathing software over these multiple HBAs to provide IO load-balancing and failover capabilities. .

make sure LUN stripe size is as close to 1mb as possible Use OS disk labels when possible. – – – Ÿ Prevents accidental user overwrites of disks Easier management of disks Make sure the disk (partition) starts at 1Mb a boundary. . to insure proper I/O alignment.Disk Best Practices Ÿ If using hardware RAID.

you can use block devices For example.2.Disk Best Practices Ÿ Ÿ With 10. use /dev/sda1 instead of /dev/raw/raw .

1. Ÿ . header_status. mode_status from v$asm_disk. substr(path.V$ views for disks Ÿ Use v$asm_disk for information “discovered” ASM disks Select name.21) path.

e.g. uname –a Use asm_diskstring=‘ORCL:*’. Do not use the /dev/oracleasm/disks/* directly Ÿ Ÿ .ASMLib Best Practices Ÿ Ÿ Use ASMLib on Linux Use the correct ASMLin version based on the OS kernel.

I/O Stack Best Practices Ÿ Most I/O inconsistencies and “weirdness” is to due incompatiblity between – HBA->Switch/Port->Fibre adapter firmware Ÿ Ÿ Check and update the firmware. Use AWR & iostat baselines to measure performance of database. .

17 .Some certification info Ÿ We do not certify multipathing tools Ÿ ASM support in Serviceguard began with 11.17 of Serviceguard.23 and SG 11. . Ÿ ASM with Symantec-Veritas Volume Manager still in the works. There is a certification for HPUX 11.PA RISC.

Database-ASM Best Practices .

Database-ASM Best Practices Ÿ Use Oracle Management Files (OMF) – – – – Easier Oracle file management Reduces user file management errors Enforcement of OFA standards Automatic deletion of ASM files when database files are dropped Ÿ To use OMF set : – db_recovery_file_dest='+FLASH’ db_create_file_dest=‘+DATA’ .

Database-ASM Best Practices Ÿ Create CRS dependency between database instance and ASM instance – – – Ensures ASM instance starts up before starting database Allows ASM instance to cleanly shutdown database instance srvctl modify instance -d crm -i crm1 -s asm1 Ÿ Recommended to use 10g Automatic Memory Management .

Database-ASM Best Practices Ÿ The following recommendations for database SGA sizing can be used to calculate the SGA_TARGET value – – large_pool Processes = Add additional 600k = Add 16 .

Then determine the redundancy type that is used (or will be used). (Every 33Gb of space . For diskgroups using High redundancy: needs 1Mb of extra shared pool) + 6M.group#.Database-ASM Best Practices Ÿ To support ASM. and calculate the shared_pool. Ÿ select sum(bytes)/(1024*1024*1024) from v$tempfile where status='ONLINE'. using the aggregated value as input. For diskgroups using external redundancy = (Every 100Gb of space needs 1Mb of extra shared pool) + 2M For diskgroups using Normal redundancy: (Every 50Gb of space needs 1Mb of extra shared pool) + 4M.group#=b. Ÿ select sum(bytes)/(1024*1024*1024) from v$logfile a. Ÿ select sum(bytes)/(1024*1024*1024) from v$datafile. v$log b where a. the following database parameters must be updated: Shared_pool – Aggregate the values from the following queries to obtain current database storage sizes that is either already on ASM or will be stored in ASM.

Transportable Tablespaces work and are supported w/ ASM !! Ÿ Yes! Database Cloning works and is supported w/ ASM. Ÿ DataPump dumpsets can be created in diskgroups .Database-ASM Best Practices Ÿ RMAN is the Recommended method for backup/recovery of database – RMAN is completely ASM diskgroup aware Ÿ Yes.

Migration to ASM Ÿ Database must already be 10g database Ÿ Use RMAN to migrate to ASM from raw or file system Ÿ RMAN can be used to migrate entire databases or individual files .

oracle.com – – – – – ASM Technical Overview ASM Best Practices ASM-EMC Best Practices ASM-RMAN Dataguard Instantiation ASMLib Overview and installation .More information Ÿ See otn.

Sign up to vote on this title
UsefulNot useful