0% found this document useful (0 votes)
24 views10 pages

15 Asm and Gi

Uploaded by

awsmdrajiv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views10 pages

15 Asm and Gi

Uploaded by

awsmdrajiv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

• Grid Infrastructure:

Ø Star%ng 11gR2, ASM comes with Gridinfrastructure along with oracle restart.

• ASM(Automa6c Storage Management):

Ø Oracle ASM is a volume manager and a file system introduced in 10g and added many features in 11g for Oracle
database files that supports single-instance Oracle Database and Oracle Real Applica%on Clusters (Oracle RAC)
configura%ons.
Ø Oracle ASM is Oracle's recommended storage management solu%on that provides an alterna%ve to conven%onal
volume managers, file systems, and raw devices.
Ø Oracle ASM uses disk groups to store data files; an Oracle ASM disk group is a collec%on of disks that Oracle ASM
manages as a unit. Within a disk group.
Ø The content of files that are stored in a disk group is evenly distributed to eliminate hot spots and to provide uniform
performance across the disks. The performance is comparable to the performance of raw devices.
Ø You can add or remove disks from a disk group while a database con%nues to access files from the disk group. When
you add or remove disks from a disk group, Oracle ASM automa%cally redistributes the file contents and eliminates
the need for down%me when redistribu%ng the content.
Ø The Oracle ASM volume manager func%onality provides flexible server-based mirroring op%ons. The Oracle ASM
normal and high redundancy disk groups enable two-way and three-way mirroring respec%vely. You can use external
redundancy to enable a Redundant Array of Independent Disks (RAID) storage subsystem to perform the mirroring
protec%on func%on.
Ø Oracle ASM also uses the Oracle Managed Files (OMF) feature to simplify database file management. OMF
automa%cally creates files in designated loca%ons. OMF also names files and removes them while relinquishing space
when tablespaces or files are deleted.
Ø OS filesystem required large amount of memory to buffer i/o where as ASM doesn't require the memory to perform i/
o. This Memory can be allocated to database SGA.
Ø ASM does not perform any i/o itself so there is no transal%on layer for oracle i/o to datafiles into disk block offsets.I/O
from databases is directly applied to disk volumes without modifica%on. This will reduce the overhead and improves
the performance.
Ø ASM can be managed from within Oracle tooling and does not require Unix administra%on.
• AU(Alloca6on Unit):

Ø An AU is the fundamental unit of alloca%on within a disk group. A file extent consists of one or more AU.
Ø In 10g AU size is 1MB but in 11g we can create diskgroup with different AU size.
Ø To create diskgroup with different AU size we need to use the au_size aZribute.
Ø To find the the alloca6on size we can query alloca%on_unit_size from v$asm_diskgroup.
Ø AU size can range from 1MB to 64MB in mul%ple of 2.

• ASM Extents:

Ø ASM files are stored as extents and an extent consists of one or more alloca%on unit.
Ø In 11g we have variable size extents. 0-19999 extentsts size of extent will be 1AU from 20000 to 39999
extents size of extent is 8*AU and then 40k to 59999 extentsize is 16*AU.
Ø The metadata for these extents are stored in bitmaps which describe the structure of an ASM file. These
extent maps consume disk space as well as shared memory. The memory part is sent from the ASM instance
to the ASMB background process of the DB instance when doing IO.
Ø Clearly the larger the au size chosen the less the number of extents it will take to map a file of a given size.
The larger au are clearly beneficial for large data files and cuts down on SGA required to track. Each
individual extent resides on a single disk.
Ø Below query can be used to see the extent alloca%on between the disks in ASM diskgroup.

select count(*), group_kffxp, disk_kffxp


from X$KFFXP
group by group_kffxp, disk_kffxp
order by group_kffxp;
• Striping:

Ø Always the writes to ASM disks are stripped across the disks as extents.
Ø There are 2 types of striping in ASM fine striping and coarse striping.

Coarse striping Fine Striping

It is used for all voluminous input/output, e.g. input/output It is used for all small input/output, e.g. input/output
opera%ons on datafiles. opera%ons on online redolog files and control files.

The size of the coarse grained data stripes is large.(extent The size of the fine grained data stripes is small.
size) (128KB)
It manages the load balance across the disk groups. It spreads the load on disk groups reducing latency
for certain file types.

• Mirroring:
Ø ASM redundancy is different from tradi%onal disk mirroring in that ASM mirroring is a logical-physical approach than a
pure physical approach. ASM does not mirror en%re disks. It mirrors logical storage en%%es called 'extents' that are
allocated on physical disks. Thus, all “mirrored” extents of a set of primary extents on a given disk do not need to be
on a single mirrored disk but they could be distributed across mul%ple disks. This approach to mirroring provides
significant benefits and flexibility. ASM uses intelligent, Oracle Database Appliance architecture aware, extent
placement algorithms to maximize system availability in the event of disk failure(s).
Ø mirroring reduces the usable capacity: It's one half of the raw capacity for normal redundancy and one third for high
redundancy. The normal redundancy as on the picture safeguards against the loss of any one disk.
Ø ASM supports three types of redundancy (mirroring*) op%ons.
1. High Redundancy - In this configura%on, for each primary extent, there are two mirrored extents. For Oracle
Database Appliance this means, during normal opera%ons there would be three extents (one primary and
two secondary) containing the same data, thus providing “high” level of protec%on. Since ASM distributes
the partnering extents in a way that prevents all extents to be unable due to a component failure in the IO
path, this configura%on can sustain at least two simultaneous disk failures on Oracle Database Appliance
(which should be rare but is possible).
2. Normal Redundancy - In this configura%on, for each primary extent, there is one mirrored (secondary)
extent. This configura%on protects against at least one disk failure. Note that in the event a disk fails in this
configura%on, although there is typically no outage or data loss, the system operates in a vulnerable state,
should a second disk fail while the old failed disk replacement has not completed. Many Oracle Database
Appliance customers thus prefer the High Redundancy configura%on to mi%gate the lack of addi%onal
protec%on during this %me.
3. External Redundancy - In this configura%on there are only primary extents and no mirrored extents. This
op%on is typically used in tradi%onal non-appliance environments when the storage sub-system may have
exis%ng redundancy such as hardware mirroring or other types of third-party mirroring in place.

Diskgroup in Normal Redundancy


Disk 2 gets
dropped in
normal
redundancy

• ASM 11g New Feature: DISK_REPAIR_TIME(default 3.6 hours)

Ø What if the disk from the picture above is only temporarily offline and comes back online amer a short while? These
transient failures have been an issue in 10g, because the disk got immediately dropped, followed by a rebalancing to re-
establish redundancy. Amerwards an administrator needed to add the disk back to the diskgroup which causes again a
rebalancing. To address these transient failures, Fast Mirror Resync was introduced:
• ASM Instance:

Ø An Oracle ASM instance is built on the same technology as an Oracle Database instance. An Oracle ASM instance has
a System Global Area (SGA) and background processes that are similar to those of Oracle Database. However,
because Oracle ASM performs fewer tasks than a database, an Oracle ASM SGA is much smaller than a database SGA.
Oracle ASM instances mount disk groups to make Oracle ASM files available to database instances.
Ø Parameters associated with ASM instance:
1. ASM_POWER_LIMIT:Which determines with what speed rebalance should happen to redistribute the data
across the disks whenever a disk is added or dropped from the diskgroup. 1 being slower 11 being faster and 0
means turning off rebalance.
2. ASM_DISKGROUPS:Which determines the diskgroups part of the ASM instance which needs to be mounted
whenever the ASM is started.
3. ASM_DISKSTRIPS:Specifies the path to look into for the ASM disks.
4. INSTANCE_TYPE=ASM specifies the instance is ASM instance.

• Background Process:

Ø ARBn performs the actual rebalance data extent movements in an Automa%c Storage Management instance. There
can be many of these processes running at a %me, named ARB0, ARB1, and so on.
Ø ASMB runs in a database instance that is using an ASM disk group. ASMB communicates with the ASM instance,
managing storage and providing sta%s%cs. ASMB can also run in the ASM instance. ASMB runs in ASM instances when
the ASMCMD cp command runs or when the database instance first starts if the SPFILE is stored in ASM.
Ø GMON maintains disk membership in ASM disk groups.
Ø MARK marks ASM alloca%on units as stale following a missed write to an offline disk. This essen%ally tracks which
extents require resync for offline disks.
Ø RBAL runs in both database and ASM instances. In the database instance, it does a global open of ASM disks. In an
ASM instance, it also coordinates rebalance ac%vity for disk groups.
• Diskgroup:
Ø A disk group is basically one or more ASM disks that are managed as a single logical unit. Any data-structure stored in
an ASM disk group is totally contained within that disk group, or self-contained.
Ø Diskgroup has below aZributes:
§ AU_SIZE:Defines the size of alloca%on unit for the diskgroup.
§ COMPATIBLE.ASM:The value for the disk group COMPATIBLE.ASM aZribute determines the minimum somware
version for an ASM instance that uses the disk group. This sepng also determines the format of the data
structures for the ASM metadata on the disk.
§ COMPATIBLE.RDBMS:The value for the disk group COMPATIBLE.RDBMS aZribute determines the minimum
COMPATIBLE database ini%aliza%on parameter sepng for any database instance that uses the disk group. For
example, if the database COMPATIBLE ini%aliza%on parameter is set to 11.1.0, then COMPATIBLE.RDBMS can
be set to any value between 10.1 and 11.1 inclusively.
§ DISK_REPAIR_TIME: Specifies the %me before which the disk comes back online amer failure, it will
automa%cally be part of the diskgroup and delta of extents will be resynched back once the disk in online.
Ø To create diskgroup:
SQL>create diskgroup <diskgroup-name> <redundacy_type>
[failgroup <fg-name> ] disk '<disk1-loca%on','<disk2-loca%on>'
[failgroup <fg-name>] disk '<disk3-loca%on>','<disk4-loca%on>'
[ATTRIBUTE 'au_size' = '4M',
'compa%ble.asm' = '11.2',
'compa%ble.rdbms' = '11.2',
'compa%ble.advm' = '11.2'];
Ø To Drop adiskgroup: Drops the diskgroup if it is empty, if we need to drop the diskgroup including files we need to
use including contents and ASM make sures the files are not in use and then drop the diskgroup.
SQL>drop diskgroup <dg-name> [including contents]
§ To delete/add a disk to diskgroup: Whenever a disk is added or delete from diskgroup rebalance happens with
the value defined for power_limit which will redistribute the data across all the disks evenly.
SQL>alter diskgroup <dg-name> add disk <path>;
SQL>alter diskgroup <dg-name> drop disk <disk-name>;
SQL>alter diskgroup <dg-name> rebalance power <value>;--to change the rebalance power. If value is 0
rebalance will be suspended.
SQL>select * from v$asm_opera%on;àTo view rebalance power;-àit will return 0 rows if rebalance is
completed.

Ø To view ASM disk informa6on:


SQL>select path,name,os_mb,total_mb,free_mb,header_status from v$asm_disk;

Ø To view ASMDISKGROUP informa6on:


SQL>select group_number,name,total_mb,free_mb from v$asm_diskgroup;
• ASMCMD:
Ø ASM command prompt allows DBA to traverse throught the ASM file system,Create directory drop files/directory and
look at ASM diskgroup info.
Ø Some useful commands:
ASMCMD>lsdgàto list the diskgroup
ASMCMD>spgetàto get the loca%on of ASM spfile
ASMCMD>spcopy-àto copy spfile
ASMCDM>cd
ASMCMD>mkdir
ASMCMD du <folder-name/file-name>---to look at directory and file size.
ASMCMD>rm –rfàto remove a file or directory.
ASMCMD>ls
• Oracle Restart:

Ø Oracle Restart implements a high availability solu%on for standalone oracle databases.
Ø It can monitor and restart the following components:
§ Database instances
§ Oracle Listener
§ Database services
§ ASM instance
§ ASM diskgroups
§ Oracle No%fica%on Services(ONS).
§ Oracle restart ensures the components are started in peoper order in accordance with component
dependencies.If a components must be shutdown it ensures that dependent components are cleanly shutdown
first.
Oracle Restart process startup

Database
instance
diskgroup
ASM
Listener
• Managing Oracle restart and its components:

Ø To manage HAS
$]crsctl check/start/stop has
$]crsctl config/enable/disable has

Ø To Manage all resources in oracle restart:


$]crsctl status resource –t
$]crs_stat –t
$]crsctl stop/start resource –all
$]crs_stop –all
$]crs_start –all

Ø To Manage ASM:
$]srvctl config asm
$]srvctl modify asm –l <listener_name> -p <spfile-loca%on> -d <disk-string>
$]srvctl stop/start/status asm [–f]
$]srvctl stop/start/status diskgroup –g <dg-name>

Ø To Manage Listener:
$]srvctl config listener –l <listener-name>
$]srvctl start/stop/status listener –l <listener-name>
$]srvctl modify listener –l <listener-name> -o <ORACLE_HOME> -p <protocol>:<port#>

Ø To Manage Database: we can use srvctl from RDBMS_HOME or GRID_HOME to manage database:
$]srvctl config database –d <db-name>
$]srvctl modify database –d <db-name> –o <ORACLE_HOME> -p <SPFILE> -s <STARTUP_OPTION> -a <diskgroup-list>
$]srvctl start/stop/status database –d <db-name>

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy