- Oracle Automatic Storage Management (ASM) is a built-in volume manager and file system for Oracle Databases that simplifies storage administration.
- Its a Volume Manager
- What will the Volume Manager will do ? and what do you mean by Volume ?
5TB Big Data , you need to store this --> In storage every single disc is having only 1TB.
5 Hard Disc Needed.
Multiple Disc into single disc to the outside world.
1 Volume can have 1 Physical Hard Disc or Multiple Hard Disc.
- These storage software will take care the Volume Manager also.
- If we assign Multiple disc to ASM , ASM can handle the disc , ASM add the disc from the Volume , Remove the disc from the volume , ASM can perform the redundancy of the storage, ASM can perform the Load Balancing inside the disc.
- ASM provides the Volume Manager layer which is needed by every storage software.
- ASM also acts as a File System.
What you mean by File System ?
- Its a storage area.
- File System is basically a STORAGE.
- File System as Storage area for Oracle Database.
Oracle Clusterware
- You can use it for Cluster Management not only for Oracle but for any other infrastructure.
- It can be installed to manage the cluster , it doesnt mean that you need to have only Oracle RAC.
Oracle ASM --> its is File System Storage only for Oracle RAC / Standalone Database. Its not supported for others.
What type of File can store in ASM ?
- RMAN Backup
- Flash Back Log
- Export Import Files
- Expect PFILE , all are in Binary Mode. So all files can be stored in ASM.
DiskGroups in ASM
- Collection of disks which make a volume ( diskgroups )
- Diskgroup is nothing but Volume.
- Diskgroups --> Collection of disk at the OS level.
- You can assign / must assign a name to diskgroup. Eg., ASM1 /dev/sdc1 --> The ASM1 name will be assiged to the physical disc.
- Minimum ASM Structure defined by Oracle is --> 3 Discgroups for basic Oracle RAC configuration.
- CRS Diskgroups --> To store cluster related files
- DATA Diskgroups --> To store database files like datafiles etc
- FRA Diskgroups --> To store FRA files
FRA --> Fast Recovery Area
Where we named ASM1 ? At what place ?
- When we installed the ASM Binary , Post ASM binary , we had issued a command " Oracle ASM CREATE DISC ".
What is DISkS ?
- Physical HDD Storage
- One HDD can't belong to two discgroups
- But Multiple HDD can be belonged to one single discgroup.
- Types of storage considered for ASM:
- Complete HDD partition.
- Multiple HDD Partitions assigned to single ASM disks
- NFS
- LUNs allocated from Storage. Oracle doesn't recommend this ? Why ?
- ASM is already a Volume Manager, so when allocate LUNs from the storage server , storage software is again a Volume Manager. Two Volume Manager are not recommended for storage of data. Because you will have Redundancy of Volume Manager.
Eg., for point 2
/dev/sdc
/dev/sdc1 --> ASM2 ( These are only disk )
/dev/sdc2 --> ASM3
/dev/sdc8 --> ASM7
ASM2 is a single disk , can be assigned to one diskgroup. But ASM2 can't be assigned to Multiple Diskgroups.
- 1 single diskgroup can have multiple disk , it means , single diskgroup can have ASM2 , ASM3 .
- For ASM1 , I can add --> ASM1 /dev/sdc1 + /dev/sdd1 + ..
- These disk will have datafile.
Lets get inside the ASM Instance
What is Oracle ASM Instance on STANDALONE DATABASE?
- Its built on same technology as of database instance.
- SGA + BG Processes ( BackGround )
- No Redo Logs
- Its just a mediator between Oracle Instance and the Storage Disc.
- Its very small when compared to Oracle Database Instance as it performs very small task.
- Its smaller in size when compared to DB instance.
- where is Oracle ASM installed ? Oracle ASM is installed in GRID_HOME. ASM binary are installed under GRID HOME.
- What exactly stored ? what is the metadata inside the ASM ? --> ASM manages the exact metadata of the disk group and provide file layout to Oracle Instance.
- ASM instance is like a mediator between Storage ( diskgroup ) and Oracle Instance.
- Every single machine as one ASM instance running on it.
- 3 DB instance on a single machine ==> 1 ASM instance shared by all the DB instances.
What is Oracle ASM Instance on RAC DATABASE?
- Every single machine / node has one ASM instance running on it.
Oracle ASM Instance Failure
- If the Oracle ASM fails on one node --> what will happen ? --> what happens to the Oracle DB instance ? or If the Oracle Database is running and suddenly Datafiles are deleted , what will happen ? DB instance FAILS. Same DB Instance also fails if ASM fails. ( DB instance will also FAIL )
- Can I stop the ASM instance when DB is up and running ? ( Important Interview Question ) ---> Stop all the DBs instance accessing the ASM before stopping the ASM instances. This is the procedure.
- From 12c RAC --> ASM Instance Fail over was introduced --> Oracle ASM Flex Cluster , need to be enabled.
- what the ASM flex Cluster will do ? --> If the ASM in node 1 fails , then it communicates to ASM in node 2 and then access the shared location.
- This is only available only from Oracle RAC 12c.
- This is like High Availability.
ASM Mirroring & Failure Group
- Mirroring is like Maintaining a copy of your data.
- Its like "A diskgroup is mirrored to another diskgroup".
- Oracle ASM itself provides the redunduncy.
- You have to mention the redundancy at the time of disk group creation.
- Once done , it can't be changed.
- Types of Redundancy in ASM :
- Normal --> 2 way redundancy --> 2 failure groups , Max you can have 3 Failure groups.
- High --> 3 way redundancy --> 3 failure groups , Max you can have 5 Failure groups.
- External --> No ASM level redundancy or you can have external Softwares for redundancy.
What is Failure Groups ?
- One Single Failure Group is one Single redundant Copy.
- To increase the redundancy , we can have multiple Failure groups.
- Failure Group are defined while creating the disk group.
- Failure Group is nothing but the redunduncy , no of failure group is nothing but the level of redunduncy.
ASM Adminstrator
- ASM needs the Utility to administor.
- SQLPLus ( How ? because ASM instance is like Oracle DB instance , so SQLPlus can be used )
- ASMCMD --> ASM command mode
- ASMCA --> ASM configuration ASSISTANCE --> its like GUI ( All things can be performed , even the upgrade of ASM ).
- These are the Utility used. But these are only for STANDALONE DB.
- What about RAC based Oracle Instance ? For Multiple ASM , then SRVCTL --> Clusterware Level Utility which allows you to administer all ASM Resources.
Note
- DiskGroups as Table space
- Disks --> is a Datafile.
- In a tablespace can have multiple datafile. But single datafile can't be assigned to two tablespace.
- SGA --> System Global Area
- CRS --> Cluster Ready Services
- LUNs --> Logical Unit Numbers
- Database backup is taken by RMAN. ASM will allocate the channel to the diskgroup. No ASM comes inbetween for backup . RMAN directly write into the ASM diskgroup. No over head on the ASM instance.
- When you take RMAN backup for OS level disk , does it give over head to the OS system ? Not really . Same , if you allocate channels to ASM diskgroup , RMAN will continur to write and ASM instance continue to perform until the diskgroup is full or ...
- If you talk about Volume Manager --> Stripping , Mirroring , Load Balancing --> Everything is supported by Oracle ASM.
- Irrespect of Database instance in a single node , only one ASM will be running for each node. That is the benefit .
- Mostly EXTERNAL will be configured , as they will allow the storage team at HARD DISK level.
- SRVCTL --> Server Control
Top comments (0)