About Oracle ASM – Oracle Automatic Storage Management What is ASM, Why it is used and where it used? What is needed to for ASM? How to Install and manage ASM ASM is new option for managing storage beginning beginnin g with 10gR2, it reduces burden on Linux system Administrator Administrator and DBA to check check for hot spot as highly used data files files and file layout, whenever the storage configuration changes, the database storage is re-balanced. ASM can also be used to provide redundancy, through the mirroring of database files on different disks. – managing storage solution for large and small databases. Once we started ASM is self-tuning and self – using ASM the DBA needs only manage the disk groups for setting up a database. After setup, the DBA need only be concerned with disk groups when monitoring and changing disk allocations within the disk groups. ASM is more used in RAC, but you can always use ASM without RAC. There is no relationship ASM with RAC, it is self-sustaining self-sustaining storage solution. ASM needs its own oracle database (there is no data files gets created with this database) instance to manage storage solution for other database, other all the databases it managing becomes clients for this one ASM instance. One ASM instance can manage multiple Oracle Databases. When you install 10gR2 and use OUI to do so, you get option of to install ASM database, you must have ASM instance running before using ASM for Oracle Database. Best Practices ASM is the volume manager for all databases that employ ASM on a given g iven node. Therefore, only one ASM instance is required per node no de regardless of the number of database instances on the node. ASM instance managing the storage for several database instances Separate ASM oracle home
What are the components of ASM?
ASM disks ASM database services ASM Files ASM disk groups ASM templates
Install - Configure ASM and ASMlibs 1. Configure storage 2. Install rpm to ASMLibs 3. Install ASM instance 4. Create Oracle Database using ASM Configure RAW storage.
ASM needs RAW partitions to be configured before installing ASM instance. ASM requires raw disks partitions (without file system) and initially used by root. It should be used indefined in “/etc/sysconfig/rawdevices”
Contents of this file should like .. #raw device binding /dev/raw/raw1 /dev/sdb1 /dev/raw/raw2 /dev/sdb2. The ownership of the raw devices should be transferred to user oracle upon configuration. configuration. All the partitions should be owned by “oracle” with group permission “dba” and restart the rawdevices. /etc/init.d/rawdevices retstart Following command will show the current raw devices binding # raw –qa Once above configuration is done, proceed to install ASM instance using Oracle software binaries, which will prompt you for if you want to install ASM or regular database, once ASM is selected, above raw devices mount information needed.
ASMLib T o use Automatic Storage Management for database storage for Linux, then Oracle recommends that you install the ASMLIB driver and associated utilities, and use them to configure candidate disks
Partition your disks Bind partitions to raw devices with correct perms Install asmlib /etc/init.d/oracleasm configure
/etc/init.d/oracleasm createdisk DISK1 /dev/sdb1 (for each disk required) /etc/init.d/oracleasm scandisks (on the 2nd node) Run DBCA to map the ASM disks to disk groups. 1. 2. 3. 4. 5. 6. 7.
/etc/init.d/oracleaasm status /etc/init.d/oracleaasm listdisk Fdisk – l /dev/sdd /etc/init.d/oracleasm create disk SD5(any name) /dev/sd5 ( raw device path) /etc/init.d/oracleasm listdisk Should return return “SB5) /etc/init.d/oracleasm querydisk /dev/sdb5 ( path ) /etc/init.d/oracleasm scandisk
Install ASM software/Database instance
Most of the input needed while installing ASM instance user ‘oracle ‘ dba privilege privilege 1. It is need to be installed user 2. It should be installed separate oracle home.
3. If cluster is installed already , OUI will automatically detect the cluster option 4. ASM instance can also running under cluster mode, thus eliminating storage as SPOF. 5. It will ask Disk Group Name - , Redundancy - and A candidate Disks , ( which we configured step one) 6. By default external redundancy is selected , at this level SAN redundancy is assumed 7. Once ASM binaries are installed , 8. Logs $ORACLEINVENTOYR/logs
What are the major parameters in init.ora for ASM INSTANCE? -
ASM instance is always names +ASM for non-rac or +ASM_ for RAC INSTANCE_TYPE = ASM ASM_POWER_LIMIT = (0-11) defaults is 1 ASM_DISKSTRING – comma separated list of strings that limits the set of disks that ASM discovers ASM_DISKGROUPS = List of disk groups to be mounted by an ASM V$ASM_OPERATION –
This view provides information that can be used for adjusting ASM_POWER_LIMIT ( 1-11), resulting power of rebalance operation when adding addin g disks to disk group V$ASM_DISK_STATS V$ASM_DISKGROUP_STAT
Backup and Recovery of ASM Instance
An ASM instance does not have any files , only metadata which gets stored on individual disk heads and it is triple mirrored , so there is not n ot to be backup. ASM always caches the metadata from disk heads to SGA ,which contain information about the disk group and an d files Data on ASM disks always always backup by RMAN. RMAN. ASM VIEW
ASM INSTANCE
DB INSTANCE
v$asm_diskgroup
Describes a disk group (number, name, size related info, state, and
Contains one row for every open ASM disk in
redundancy type)
the DB instance.
Identifies databases using disk v$asm_client
groups managed by the ASM
Empty
instance.
v$asm_disk
v$asm_file
Contains one row for every disk
Contains rows only for
discovered by the ASM instance, including disks that are not part
disks in the disk groups in use by that DB
of any disk group.
instance.
Contains one row for every ASM
Contains rows only for
file in every disk group mounted
files that are currently
by the ASM instance.
open in the DB instance.
Contains one row for every alias v$asm_alias
present in every disk group
Empty
mounted by the ASM instance. Contains one row for every active v$asm_operation
ASM long running operation executing in the ASM instance.
v$asm_attribute
v$asm_disk_iostat
All ASM configuration attributes
Disk I/O statistics
Empty