HOME > > ASM

ASM

Anup - Saturday, April 13, 2024

ASM Basic

1.What is the use of ASM(or) Why is ASM preferred over a filesystem? ASM is the most powerful feature. As a DBA we don’t worry about database file (Data file, control files, redo log files, archive logs RMAN backup set and so on) management task because ASM completely automates file management tasks. Only we deal with a few disk groups, instead of directly handling data files. (Example: When we use ASM enable databases. We don’t need to refer to table space by filename. We just use simple Disk Group name)

2.What is the component of ASM?

Three major components are:- ASM Instance, Disk Group and ASM Files.

In the ASM Enable database, we first start the ASM instance (This is not a full database instance; just the memory structures and as such is very small and lightweight), ASM instances manage the Disk Group and help the database to access the ASM files.

3. Describe ASM Instance in details?

ASM Instance maintains the ASM file metadata. Database can use it to access the files directly. ASM does not mount the database files. ASM also does not have a data dictionary. ASM instance only manage the disk group, protect disk group and communication file metadata to database instance using ASM files.

4. Advantage of ASM?

* Big advantage is that ASM gives us power to bypass using a third- party LVM, mirroring and stripping because ASM works as LVM and it also handles striping and mirroring functions.

* As a DBA no need to perform relocation of data because ASM prevents disk fragmentation.

* ASM performs mirroring and stripping. Mirroring is applied on file basic rather than disk basic. ASM automatically balances I/O.

5. Functionality of ASM?

* ASM Manage group of Disk, Called disk groups.

* It manages disk redundancy within a disk group.

* Provides near-optimal I/O balancing without any manual tuning, Support largs file

6. What are the init parameters related to ASM?

* INSTANCE_TYPE = ASM,

* ASM_POWER_LIMIT = 11,

* ASM_DISKSTRING = '/dev/rdsk/*s2', '/dev/rdsk/c1*'

* ASM_DISKGROUPS = DG_DATA, DG_FRA

7. How to copy file to/from ASM from/to filesystem? By using ASMCMD cp command

8. How to find out the databases, which are using the ASM instance? Select DB_NAME from V$ASM_CLIENT;

9. What is FlexASM? Flex ASM is a feature in Oracle ASM (Automatic Storage Management) that allows for dynamic allocation and management of ASM instances across multiple nodes in a cluster. It enables ASM instances to run in a shared server pool, providing flexibility and scalability in ASM deployments.

Use case:

Imagine a large-scale Oracle database environment with multiple nodes. Flex ASM allows ASM instances to be dynamically started or stopped based on workload demand, optimizing resource utilization and enhancing availability.

Example:

In a cluster with four nodes, Flex ASM dynamically adjusts ASM instances based on workload. If one node experiences increased demand, Flex ASM can allocate additional ASM instances to that node to handle the workload efficiently. Conversely, if workload decreases on a node, Flex ASM can reallocate ASM instances to other nodes, ensuring optimal resource utilization across the cluster.

ASM Reblancing

1. What is rebalancing?

* Rebalancing is the process of moving file extents onto disks.

* Purpose of rebalancing is evenly distributing the I/O load of the diskgroup.

* In the RAC Environment, Rebalancing for a disk group is done within a single ASM instance only and cannot be distributed across multiple cluster node to speed it up.

* ASM will automatically rebalance data on disks when disks are added or removed by using ASM_POWER_LIMIT initialization parameter.

2. What is the use of ASM_POWER_LIMIT? ASM_POWER_LIMIT is a dynamic parameter, which will be useful for rebalancing the data across disks. Value can be 1(lowest) to 11 (highest).

3. What are different types of redundancies in ASM & explain?

* External redundancy

* Normal redundancy

* High redundancy.

4. What are different types of stripings in ASM & their differences? -

* Fine-grained striping, Coarse-grained striping

Fine 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.

5. What is the allocation unit and what is the default value of au_size and how to change?

* Every ASM disk is divided into allocation units (AU).

* An AU is the fundamental unit of allocation within a disk group.

* A file extent consists of one or more AU.

* An ASM file consists of one or more file extents.

* CREATE DISKGROUP disk_group_2 EXTERNAL REDUNDANCY DISK '/dev/sde1' ATRRIBUTE 'au_size' = '32M';

6. What process does the rebalancing?

* Process flow for ASM rebalancing:

* On the ASM instance, a disk is added or dropped from a diskgroup.

* This invokes the RBAL process to create the rebalance plan and then begin coordination of the redistribution.

* RBAL will calculate estimation time and work required to perform the task and then message the ARBx processes to actually handle the request.

* The number of ARBx processes invoked is directly determined by the asm_power_limit.

* The Continuing Operations Directory (metadata) will be updated to reflect a rebalance activity.

* Each extent to be relocated is assigned to an ARBx process.

* ARBx performs rebalance on these extents. Each extent is locked, relocated, and unlocked. This is shown as Operation REBAL in V$ASM_OPERATION

Contact me

Get in Touch

Need to get touch with me? Please fill out the form with your enquiry.

Name
Anup Srivastav
Address
Lucknow - Utter Pradesh
Email
myindiandba@gmail.com
Message me