# Automatic Storage Management

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Automatic_Storage_Management
> Markdown URL: https://mediated.wiki/source/Automatic_Storage_Management.md
> Source: https://en.wikipedia.org/wiki/Automatic_Storage_Management
> Source revision: 1290660891
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{cleanup|date=March 2012|reason=Needs to be pared down; Wikipedia is [not](/source/WP%3ANOT) a computer program guide or a vehicle for product promotion}}
'''Automatic Storage Management''' (ASM) is a feature provided by [Oracle Corporation](/source/Oracle_Corporation) within the [Oracle Database](/source/Oracle_Database) from release [Oracle 10g](/source/Oracle_Database) (revision 1) onwards. ASM aims to simplify the management of [database](/source/database) datafiles, control files and log files. To do so, it provides tools to manage [file system](/source/file_system)s and [volume](/source/Volume_(computing))s directly inside the database, allowing [database administrator](/source/database_administrator)s (DBAs) to control volumes and disks with familiar [SQL](/source/SQL) statements in standard Oracle environments. Thus DBAs do not need extra skills in specific [file system](/source/file_system)s or [volume managers](/source/Logical_volume_management) (which usually operate at the level of the [operating system](/source/operating_system)).

== Features ==
* [IO](/source/Input%2Foutput) [channel](/source/I%2FO_channel)s can take advantage of [data striping](/source/data_striping) and software [mirroring](/source/Disk_mirroring)
* DBAs can automate online redistribution of data, along with the addition and removal of disks/storage
* the system maintains redundant copies and provides 3rd-party{{Citation needed|date=September 2009}} [RAID](/source/RAID) functionality
* Oracle supports third-party multipathing IO technologies (such as [failover](/source/failover) or [load balancing](/source/Load_balancing_(computing)) to [SAN](/source/Storage_area_network) access)
* the need for [hot spare](/source/hot_spare)s diminish

== Architecture overview ==
ASM creates [extent](/source/Extent_(file_systems))s out of datafiles, log-files, system files, control files and other database structures. The system then spreads these extents across all disks in a "diskgroup". One can think of a diskgroup in ASM as a [Logical Volume Manager](/source/Logical_volume_management) [volume group](/source/volume_group) —  with an ASM file corresponding to a [logical volume](/source/logical_volume). In addition to the existing Oracle [background process](/source/background_process)es, ASM introduces two new ones - OSMB and RBAL. OSMB opens and creates disks in a diskgroup. RBAL provides the functionality of moving data between disks in a diskgroup.

== Implementation and usage ==
Automatic Storage Management (ASM) simplifies administration of Oracle-related files by allowing the administrator to reference disk groups (rather than individual disks and files) which ASM manages. ASM extends the Oracle Managed Files (OMF) functionality<ref>{{Cite web|url=http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/omf.htm#i1007206|title=Database Administrator's Guide}}</ref>
that also includes striping and mirroring to provide balanced and secure storage. DBAs can use the ASM functionality in combination with existing raw and cooked file-systems{{Definition|date=March 2013}}, along with OMF and manually managed files.

An ASM ''instance'' controls the ASM functionality. It isn't a full database instance{{Definition|date=March 2013}}, it provides just the memory structures, and as such is very small and lightweight.

The main components of ASM are disk groups, each of which comprise several physical disks controlled as a single unit. The physical disks are known as ASM disks, while the files that reside on the disks are known as ASM files. The locations and names for the files are controlled by ASM, but user-friendly aliases and directory structures can be defined by the DBA for ease of reference.

The level of redundancy and the granularity of the striping can be controlled using templates. Oracle Corporation provides default templates for each file-type stored by ASM, but additional templates can be defined as needed.

Failure groups are defined within a disk group to support the required level of redundancy. For two-way mirroring, a disk group might contain two failure groups, in which case individual files are written to two locations.

Oracle ASM Dynamic Volume Manager provides the foundation for the ASM Cluster File System (ACFS).<ref>
{{cite book
|last1= Gopalakrishnan
|first1= K.
|author-link1= 
|title= Oracle Database 11g Oracle Real Application Clusters Handbook
|url= https://books.google.com/books?id=E_83LcF_nAMC
|series= Oracle Press
|date= 10 August 2011
|edition= 2
|publisher= McGraw Hill Professional
|publication-date= 2011
|isbn= 9780071752626
|accessdate= 2015-01-05
|quote= Oracle ASM Dynamic Volume Manager is the foundation for ASM Cluster File System (ACFS). ACFS is a general-purpose cluster file system and supports non-Oracle applications.
}}
</ref>

In summary, ASM provides the following functionality:

* manages groups of disks, called disk groups
* manages disk redundancy within each disk group
* provides near-optimal I/O balancing without any manual tuning
* enables management of database objects without specifying mount-points or filenames
* supports large files

== Redundancy ==
One can configure ASM diskgroups to have no redundancy (external), two-way mirroring (normal), or three-way mirroring (high). In the case of normal and high mirrors, good practice suggests having fail groups that talk to different controllers for performance and fail-safe reasons.

* In the case of external redundancy, ASM does not do any [software mirror](/source/software_mirror)ing, but only stripes its files across all the disks that belong to the disk group that does external redundancy.
* In the case of normal [redundancy](/source/Redundancy_(engineering)), ASM does two-way mirroring, meaning that ASM maintains  two copies of the data through software mirroring. When querying for mirror information, DBAs will see two mirrors in this case.
* In the case of high redundancy, ASM does three-way mirroring, maintaining three copies of the data through software mirroring. When querying for mirror information, DBAs will see three mirrors in this case.

== See also ==
* [Logical volume management](/source/Logical_volume_management)

== References ==
{{reflist}}

==External links==
* http://twiki.cern.ch/twiki/pub/PSSGroup/Presentations2007/Inside_Oracle_ASM_LC_CERN_UKOUG07.ppt
* [http://www.oracle.com/technetwork/issue-archive/2006/06-mar/o26asm-090635.html ASMCMD]: useful for users not familiar with SQL (one can write scripts with it)

Category:Proprietary database management systems
Category:Oracle software

---
Adapted from the Wikipedia article [Automatic Storage Management](https://en.wikipedia.org/wiki/Automatic_Storage_Management) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Automatic_Storage_Management?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
