- Explain ASM Architecture?
The three major components of ASM are the ASM instance, ASM disk groups, and ASM files.
The ASM instance is a special Oracle instance—it does not have its own data files like a regularOracle database does. A single ASM instance on a server can manage the ASM file systems for all the Oracle databases on that server. The ASM instance looks after disk groups and gives the database access to the ASM files. The database makes the initial contact with the ASM instance to get information on the data files, but it accesses those files directly. The ASM instance must be running for an Oracle database to use the ASM file system, and the ASM instance can’t be shut down while the other Oracle databases using ASM file systems are still running, since those databases will crash without the ASM instance.
ASM disk groups are somewhat analogous to logical volumes created by a Logical Volume Manager. Unlike the usual Oracle database files, you don’t access ASM files directly. Disks in an ASM context are rather loosely defined and can include a partition of a disk spindle or the entire disk spindle itself. This depends on how the storage system represents the logical unit number (LUN) to the operating system. Any LUN or a disk represented to the operating system is called a disk. Since each operating system could have a different disk-naming system, check your disk-naming system.
ASM files are part of an ASM disk group, which contains all your database files. ASM manages a disk group consisting of several disk drives as a single unit, and it spreads the data evenly among all the disks in the group. You don’t have to change the management of your database if you want to switch to an ASM system, because you can use your operating system–based files with the new ASM files. Logical concepts such as extents, segments, and tablespaces work the same way under an ASM
Here’s a summary of an ASM storage system:
• A database is allowed to have multiple disk groups.
• You can store all of your Oracle database files as ASM files because Oracle sets up a one-toone
mapping between an Oracle database file (data files and control files, for example) and
an ASM file.
• An ASM disk group comprises a set of disk drives.
• ASM disk groups are permitted to contain files from more than one disk.
• ASM files always spread over every disk in an ASM disk group and belong to one disk
• ASM allocates disk space in allocation units of 1MB.
What is the use of ASM (or) Why ASM preferred over filesystem?
ASM provides striping and mirroring.
a) Provides automatic load balancing over all the available disks, thus reducing hot spots in the file system.
b) Prevents fragmentation of disks, so you don’t need to manually relocate data to tune I/O performance.
c) Adding disks is straight forward – ASM automatically performs online disk reorganization when you add or remove storage.
d) Uses redundancy features available in intelligent storage arrays.
e)The storage system can store all types of database files.
f) Using disk group makes configuration easier, as files are placed into disk groups.
What is ASM in Oracle?
Oracle ASM is Oracle’s volume manager specially designed for Oracle database data. It is available since Oracle database version 10g and many improvements have been made in versions 11g release 1 and 2 and 12c
ASM offers support for Oracle RAC clusters without the requirement to install 3rd party software, such as cluster aware volume managers or file systems.
ASM is shipped as part of the database server software (Enterprise and Standard editions) and does not cost extra money to run.
ASM simplifies administration of Oracle related files by allowing the administrator to reference disk groups
rather than individual disks and files, which are managed by ASM.
The ASM functionality is an extention of the Oracle Managed Files (OMF) functionality that also includes striping and mirroring to provide balanced and secure storage. The new ASM functionality can be used in combination with existing raw and cooked file systems, along with OMF and manually managed files.
What is ASM instance in Oracle?
The ASM functionality is controlled by an ASM instance. This is not a full database instance, just the memory structures and as such is very small and lightweight
What are ASM Background Processes in Oracle?
RBAL – Oracle background process. In an ASM instance coordinated rebalancing operations. In a DB instance, opens and mount diskgroups from the local ASM instance.
ARBx – Oracle background processes. In an ASM instance, a slave for rebalancing operations
PSPx – Oracle background processes. In an ASM instance, Process Spawners
GMON – Oracle background processes. In an ASM instance, diskgroup monitor.
ASMB – Oracle background process. In an DB instance, keeps a (bequeath) persistent DB connection to the local ASM instance. Provides heart-beat and ASM statistics. During a diskgroups rebalancing operation ASM communicates to the DB AU changes via this connection.
O00x – Oracle background processes. Slaves used to connected from the DB to the ASM instance for ‘short operations’.
What are ASM instance initialization parameters?
INSTANCE_TYPE – Set to ASM or RDBMS depending on the instance type. The default is RDBMS.
DB_UNIQUE_NAME – Specifies a globally unique name for the database. This defaults to +ASM but must be altered if you intend to run multiple ASM instances.
ASM_POWER_LIMIT -The maximum power for a rebalancing operation on an ASM instance. The valid values range from 1 to 11, with 1 being the default. The higher the limit the more resources are allocated resulting in faster rebalancing operations. This value is also used as the default when the POWER clause is omitted from a re-balance operation.
ASM_DISKGROUPS – The list of disk groups that should be mounted by an ASM instance during instance startup, or by the ALTER DISKGROUP ALL MOUNT statement. ASM configuration changes are automatically reflected in this parameter.
ASM_DISKSTRING – Specifies a value that can be used to limit the disks considered for discovery. Altering the default value may improve the speed of disk group mount time and the speed of adding a disk to a disk group. Changing the parameter to a value which prevents the discovery of already mounted disks results in an error. The default value is NULL allowing all suitable disks to be considered.
How Oracle ASM instance works?
The ASM instance manages and communicates the map as to where each file extent resides. It also controls the process of rebalancing the placement of the extents when the storage allocation is changed ie, when the disk is added or removed from ASM. As an ASM instance uses only about 64-MB for its system global area, it requires a relatively small amount of system resource. In a RAC configuration, an ASM instance on each node in the cluster manages all disk groups for that node, in coordination with the other nodes in the cluster.
The ASM instance creates an extent map which has a pointer to each 1 MB extent of the data file is located. When a database instance creates or opens a database file that is managed by ASM, the database instance messages the ASM instance and ASM returns an extent map for that file. From that point the database instance performs all I/O directly to the disks unless the location of that file is being changed. Three things might cause the extent map for a database instance to be updated:
1) Re-balancing the disk layout following an storage configuration change (adding or dropping a disk from a disk group)
2) Opening of a new database file and
3) extending an existing database file when a tablespace is enlarged.
What are different types of redundancies in ASM & explain?
Normal redundancy – for 2-way mirroring, requiring two failure groups, when ASM allocates an extent for a normal redundancy file, ASM allocates a primary copy and a secondary copy. ASM chooses the disk on which to store the secondary copy in a different failure group other than the primary copy.
High redundancy – for 3-way mirroring, requiring three failure groups, in this case the extent is mirrored across 3 disks.
External redundancy – to not use ASM mirroring. This is used if you are using hardware mirroring or third party redundancy mechanism like RAID, Storage arrays.
How to copy file to/from ASM from/to filesystem?
ASMCMD command cp can be used to copy files between ASM disk groups on local instance as well as remote instances
How to find out the databases, which are using the ASM instance?
FROM GRID USER OR ASMCMD.
FROM CONNECTING WITH INSTANCE
SQL> select DB_NAME from V$ASM_CLIENT;
What are different types of stripings in ASM & their differences?
To stripe data, Oracle ASM separates files into stripes and spreads data evenly across all of the disks in a disk group. It has two methods of striping, Fine & Coarse.
Finegrained Striping:- Fine striping writes 128 KB data to each ASM Disk in the diskgroup in a round robin fashion, 128 KB goes to the first disk, then the next 128 KB, goes to the next disk, etc. According to manual, The fine-grained stripe size always equals 128 KB in any configuration; this provides lower I/O latency for small I/O operations.” Small I/O operations sure sounds like a good candidate for redo logs, control files etc.
Coarse Striping:-With coarse grained striping ASM writes data to each disk in the same round robin fashion, but writes chunks in the size of the ASM instance’s allocation unit (AU) size, default is 1MB.
Further, starting from 11gR2, Online redo log files are no more in Fine striping contradictory to 10g, as Oracle silently changed the template to Coarse striping.