About Oracle ASM - Oracle Automatic Storage Management
About Oracle ASM - Oracle Automatic Storage Management
ASM is new option for managing storage beginning with 10gR2, it reduces burden on Linux system
Administrator and DBA to check for hot spot as highly used data files and file layout, whenever the
storage configuration changes, the database storage is re-balanced.
ASM can also be used to provide redundancy, through the mirroring of database files on different disks.
ASM is self-tuning and self – managing storage solution for large and small databases. Once we started
using ASM the DBA needs only manage the disk groups for setting up a database. After setup, the DBA
need only be concerned with disk groups when monitoring and changing disk allocations within the disk
groups.
ASM is more used in RAC, but you can always use ASM without RAC. There is no relationship ASM with
RAC, it is self-sustaining storage solution.
ASM needs its own oracle database (there is no data files gets created with this database) instance to
manage storage solution for other database, other all the databases it managing becomes clients for this
one ASM instance. One ASM instance can manage multiple Oracle Databases.
When you install 10gR2 and use OUI to do so, you get option of to install ASM database, you must have
ASM instance running before using ASM for Oracle Database.
Best Practices
ASM is the volume manager for all databases that employ ASM on a given node. Therefore, only
one ASM instance is required per node regardless of the number of database instances on the
node.
ASM instance managing the storage for several database instances
Separate ASM oracle home
ASM disks
ASM database services
ASM Files
ASM needs RAW partitions to be configured before installing ASM instance. ASM requires raw
disks partitions (without file system) and initially used by root. It should be used indefined in
“/etc/sysconfig/rawdevices”
/dev/raw/raw1 /dev/sdb1
/dev/raw/raw2 /dev/sdb2.
The ownership of the raw devices should be transferred to user oracle upon configuration. All the
partitions should be owned by “oracle” with group permission “dba” and restart the rawdevices.
/etc/init.d/rawdevices retstart
# raw –qa
Once above configuration is done, proceed to install ASM instance using Oracle software binaries, which
will prompt you for if you want to install ASM or regular database, once ASM is selected, above raw
devices mount information needed.
ASMLib
T o use Automatic Storage Management for database storage for Linux, then Oracle recommends that
you install the ASMLIB driver and associated utilities, and use them to configure candidate disks
1. /etc/init.d/oracleaasm status
2. /etc/init.d/oracleaasm listdisk
3. Fdisk –l /dev/sdd
4. /etc/init.d/oracleasm create disk SD5(any name) /dev/sd5 ( raw device path)
5. /etc/init.d/oracleasm listdisk Should return “SB5)
6. /etc/init.d/oracleasm querydisk /dev/sdb5 ( path )
7. /etc/init.d/oracleasm scandisk
- ASM instance is always names +ASM for non-rac or +ASM_<Node #> for RAC
- INSTANCE_TYPE = ASM
- ASM_POWER_LIMIT = (0-11) defaults is 1
- ASM_DISKSTRING – comma separated list of strings that limits the set of disks
that ASM discovers
- ASM_DISKGROUPS = List of disk groups to be mounted by an ASM
V$ASM_OPERATION –
This view provides information that can be used for adjusting ASM_POWER_LIMIT ( 1-11),
resulting power of rebalance operation when adding disks to disk group
V$ASM_DISK_STATS
V$ASM_DISKGROUP_STAT
Backup and Recovery of ASM Instance
An ASM instance does not have any files , only metadata which gets stored on individual disk
heads and it is triple mirrored , so there is not to be backup. ASM always caches the metadata
from disk heads to SGA ,which contain information about the disk group and files
ASM
Contains one row for every disk Contains rows only for
discovered by the ASM instance, disks in the disk groups
v$asm_disk
including disks that are not part in use by that DB
of any disk group. instance.
Contains one row for every ASM Contains rows only for
v$asm_file file in every disk group mounted files that are currently
by the ASM instance. open in the DB instance.