ASM- Automatic Storage Management – Interview Question Answer
1. What is ASM?
ASM is a Volume Manager and a file system for Oracle Database Files that supports single-instance Oracle Database and Oracle Real Application cluster (RAC) configuration.
2. What is the recommended storage management solution from Oracle? Why?
ASM is the recommended storage management solution from oracle as it provides an alternative to conventional volume managers, file systems, and raw devices.
3. How is datafile stored in ASM?
ASM uses disk groups to store data files.
4. What is an ASM disk group?
An ASM disk group is a group of disks that ASM manages as a unit. Within the disk groups a file system interface maintains the Oracle database files. ASM simplifies database storage by consolidating disks into disk groups. This reduces I/O overhead.
5. How is the performance of disk groups comparable to raw disks?/Are disk groups a good alternative to raw disks?
The files distributed across the set of disks in a disk group are striped or distributed across the disks to eliminate hot spots and improve performance. Thus they perform equally well as raw disks.
6. How does ASM eliminate downtime?
Disks can be added and removed from the disk groups online,(i.e)during the operation of the database without any downtime. When disks are added or removed ASM automatically redistributes the contents without any downtime. Thus ASM eliminates downtime.
7. Give details on server-based mirroring:-
This is a flexible option provided by ASM. The normal and redundant options of ASM provide two and three-way mirroring. We can use an external option to enable RAID(Redundant Array Of Independent Disks).
8. How does an ASM manage files?/How is file management simplified using ASM?
ASM uses the Oracle Managed Files(OMF) feature which simplifies file management. Files are created at the specified locations, renames files, and deletes files are when operations at the tablespace level happen (say tablespace deletion).
9. Give some interfaces used to manage ASM:-
Oracle Enterprise Manager(OEM), SQL*PLUS, ASMCMD command-line interface are some interfaces that can be used with ASM.
10. Can ASM co-exist with non-ASM systems:-
Yes, ASM can co-exist with non-ASM third-party file systems and thus can be integrated into pre-existing environments.OEM has an interface for migrating non-ASM files to ASM.
11. What is an ASM instance?
An ASM instance is the instance that manages ASM disk groups. It composes of System Global Area(SGA) and background processes. ASM
instance mounts a disk group that is made available to the database instance. An ASM instance manages the metadata of a disk group and provides file layout information to the database instances.
12. Will the SGA(System Global Area) of ASM is comparable in size to an Oracle database instance?
The SGA size of an ASM is smaller than that of an Oracle database instance, as an ASM performs fewer tasks than a database.
13. Can ASM instance mount a database?
An ASM instance can mount a disk group that can be used by a database instance.
14. What is ASM metadata and where is it present?
ASM metadata is the information that ASM uses to control the disk group.It is present within a disk group.
15. What is ASM metadata composed of?
An ASM metadata includes the following:
1) The disks that belong to a disk group
2) Amount of space available within a disk group
3) The filenames of the files within a disk group
4) The location of disk group datafile data extents
5) A redo log that records information about automatically changing data blocks
16. What are the possible ASM configurations?
ASM and database instances share access to disks in a disk group.
1) There can be one ASM instance and one database instance serving a single database in a node
2) There can be one ASM instance, and multiple database instances serving many databases in a node. If the ASM instance fails, all the databases fail. The advantage is that this doesn’t demand a Server reboot(Operating system restart)
3) There can be clustered ASM instances that are clustered using Oracle Clusterware.(i.e)One ASM instance on each node that is integrated using Oracle Clusterware.
17. What are the advantages of ASM?
• Provides automatic load balancing over all the available disks, thus reducing hot spots in the file system
• Prevents fragmentation of disks, so you don’t need to manually relocate data to tune I/O performance
• Adding disks is straightforward – ASM automatically performs online disk reorganization when you add or remove storage
• Uses redundancy features available in intelligent storage arrays
• The storage system can store all types of database files
• Using disk group makes configuration easier, as files are placed into disk groups
• ASM provides stripping and mirroring (fine and coarse gain – see below)
• ASM and non-ASM oracle files can coexist
18. How does an ASM instance communicate with a database instance?
The ASM instance manages the metadata and provides space allocation for the ASM files. When a database instance creates or opens an ASM file, it communicates those requests to the ASM instance. In response, the ASM instance provides the file extent map information to the database instance.
19. What is striping?
ASM stripes files across all the disks within the disk group thus increasing performance, each stripe is called an ‘allocation unit’. ASM offers two types of stripping which is dependent on the type of database file
Coarse Stripping used for datafile, and archive logs (1MB stripes)
Fine Stripping used for online redo logs, controlfile, and flashback files(128KB stripes)
20. What is ASM Mirroring?
Disk mirroring provides data redundancy, this means that if a disk were to fail Oracle will use the other mirrored disk and would continue as normal. Oracle mirrors at the extent level, so you have a primary extent and a mirrored extent. When a disk fails, ASM rebuilds the failed disk using mirrored extents from the other disks within the group, this may have a slight impact on performance as the rebuild takes place.
All disks that share a common controller are in what is called a failure group, you can ensure redundancy by mirroring disks on separate failure groups which in turn are on different controllers, ASM will ensure that the primary extent and the mirrored extent are not in the same failure group. When mirroring you must define failure groups otherwise the mirroring will not take place.
There are three forms of Mirroring
• External redundancy – doesn’t have failure groups and thus is effectively a no-mirroring strategy
• Normal redundancy – provides two-way mirroring of all extents in a disk group, which results in two failure groups
• High redundancy – provides three-way mirroring of all extents in a disk group, which results in three failure groups
21. What are the ASM processes?
|coordinates the rebalancing when a new disk is added or removed|
|actually does the work requested by the RBAL process (up to 9 of these)|
|RBAL||opens and closes the ASM disk|
|ASMB||connects to the ASM instance via session and is the communication between ASM and RBMS, requests could be file creation, deletion, resizing and also various statistics and status messages.|
22. What are the three components of ASM ?
|ASM Instance||is a special instance that does not have any data files, there is only ASM instance one per server which manages all ASM files for each database. The instance looks after the disk groups and allows access to the ASM files. Databases access the files directly but use the ASM instance to locate them. If the ASM instance is shutdown then the database will either be automatically shutdown or crash.|
|ASM Disk Groups||Disks are grouped together via disk groups, these are very much like logical volumes.|
|ASM Files||Files are stored in the disk groups and benefit from the disk group features i.e. stripping and mirroring.|
|ASM Summary||the database is allowed to have multiple disk groups You can store all of your database files as ASM files Disk group comprises a set of disk drives ASM disk groups are permitted to contain files from more than one disk Files are always spread over every disk in an ASM disk group and belong to one disk group only ASM allocates disk space in allocation units of 1MB|
23. What are the files we can keep in ASM & out of ASM?
• Managed by ASM – Oracle binaries, alert log, trace files, init.ora or password file
• Managed by ASM – Datafiles, SPFILES, redo log files, archived log files, RMAN backup set/image copies, flash recovery area.
24. Rebalance in ASM
25. What main adv of asm other than the mirroring, striping, and rebalancing, as storage provides all these
26. ACFs advantages
27. Creation of large databases that are expected to grow to over ~10TB?
ASM provides two hidden initialization parameters that allow you to create a disk group with an AU size of 16 megabytes and FINE grain striping at 1MB (instead of 128KB). This reduces the extent of map size by a factor of 16.
You must also modify the ASM file templates and set the stripe type to ‘FINE’ for all file types to achieve 1MB striping. This must be done after the disk group is created.
1. Shut down the ASM instance
2. Edit the ASM init.ora parameter file and add:
3. Restart the ASM instance
4. Create a disk group
CREATE DISKGROUP diskgroup_name disk ‘/devices/diska1′,’/devices/diska2’;
5. Change all ASM file templates to FINE grained:
ALTER DISKGROUP diskgroup_name ALTER TEMPLATE <tmpl> ATTRIBUTES (FINE);
Repeat this command for all ASM file types. Attributes types are listed below:
CONTROLFILE, DATAFILE, ONLINELOG, ARCHIVELOG, TEMPFILE, BACKUPSET, PARAMETERFILE, DATAGUARDCONFIG,
FLASHBACK, CHANGETRACKING, DUMPSET,XTRANSPORT, AUTOBACKUP
28. Steps to Re-Create ASM Diskgroups? (ID 268481.1)
1. Ensure that you have a prior RMAN backup of all databases using ASM
2. Shut down your ASM instance(s)
3. Use dd to clear the metadata from ASM disks
4. Re-create your ASM disk group(s)
5. Restore databases
This error may occur if:
a) ASM disk(s) is not visible on the operating system.
b) asm_diskstring parameter is not set correctly on ASM instance(s)
c) ASM metadata in the disk is overwritten or corrupted
29. How to Clone An ASM Disk Group On The Same Server?
These are the steps required to complete the process:
1. Prepare a set of storage devices with enough space to hold a copy of the diskgroup to be copied
2. Shutdown the source database
3. Make a bit by bit copy of the source database on the target devices
4. Add kfed path to the path of user root
5. Execute the rename diskgroup script
6. Rename ASM disks of the cloned devices
7. Rescan ASM disks
8. Start the ASM instance and mount the new diskgroup
9. Recreate the controlfile and rename the database based on the cloned diskgroup
10.Open the clone with the resetlogs option
30. If Checksum Mismatch After Storage Crash (the HEADER_STATUS does not match the disk header)
SQL> select path, MOUNT_STATUS, HEADER_STATUS, MODE_STATUS, STATE from v$asm_disk;
PATH MOUNT_S HEADER_STATUS MODE_ST STATE
————- ——- ————- ——- ——–
/dev/raw/raw1 CLOSED PROVISIONED ONLINE NORMAL
Use kfed in read mode to generate the bad text information:
kfed read /dev/raw/raw1 text=bad
Use kfed in write mode to correct the checksum:
kfed write /dev/raw/raw1 CHKSUM=YES text=bad
31. How to find unmounted ASM disk information ?
amdu -diskstring ‘/dev/sd*’ -dump ‘DATADGER’
DATADGER.map file we can see all the information