Professional Documents
Culture Documents
ORACLE-BASE - Automatic Storage Manager (ASM) Enhancements in Oracle Database 11g Release 1
ORACLE-BASE - Automatic Storage Manager (ASM) Enhancements in Oracle Database 11g Release 1
php
Home Articles Scripts Forums Blog Certification Misc About Printer Friendly
Oracle 8i | Oracle 9i | Oracle 10g | Oracle 11g | Oracle 12c | Miscellaneous | PL/SQL | SQL | Oracle RAC | Oracle Apps | Linux
Related articles.
COMPATIBLE.ASM - The minimum version of the ASM software that can access the disk group. In 11g, the default setting is 10.1.
COMPATIBLE.RDBMS - The minimum COMPATIBLE database initialization parameter setting for any database instance that uses the disk
group. In 11g, the default setting is 10.1.
The compatibility versions of a disk group can only be increased, not decreased. If you have increased the version by mistake, you will need to create
a new disk group.
The disk group compatibility attributes can be set during disk group creation by adding the ATTRIBUTE clause to the CREATE DISKGROUP command.
The disk group compatibility attributes for existing disk groups can be altered using the SET ATTRIBUTE clause to the ALTER DISKGROUP
command.
The current compatibility settings are available from the V$ASM_DISKGROUP and V$ASM_ATTRIBUTE views.
Translate
1 of 6 7/24/2014 9:08 PM
ORACLE-BASE - Automatic Storage Manager (ASM) Enhancements in O... http://www.oracle-base.com/articles/11g/asm-enhancements-11gr1.php
1 row selected.
SQL>
4 rows selected.
SQL>
Fast mirror resync is only available when the disk groups compatibility attributes are set to 11.1 or higher.
ASM drops disks if they remain offline for more than 3.6 hours. The disk groups default time limit is altered by changing the DISK_REPAIR_TIME
parameter with a unit of minutes (M or m) or hours (H or h).
The DROP AFTER clause of the ALTER DISKGROUP command is used to override the disk group default DISK_REPAIR_TIME.
If a disk goes offline during a rolling upgrade, the timer is not started until after the rolling upgrade is complete.
Rolling Upgrade
Clustered ASM instances for 11g onwards can be upgraded using a rolling upgrade. The ASM cluster is placed in rolling upgrade mode by issuing the
following command from one of the nodes.
Once the cluster is in rolling upgrade mode each node in turn can be shutdown, upgraded and started. The cluster runs in a mixed version environment
until the upgrade is complete. In this state, the cluster is limited to the following operations:
The current status of the ASM cluster can be determined using the following query.
Once the last node is upgraded, the rolling upgrade is stopped by issuing the following command, which checks all ASM instances are at the
appropriate version, turns off rolling upgrade mode and restarts any pending rebalance operations.
2 of 6 7/24/2014 9:08 PM
ORACLE-BASE - Automatic Storage Manager (ASM) Enhancements in O... http://www.oracle-base.com/articles/11g/asm-enhancements-11gr1.php
Restrictions and miscellaneous points about the rolling upgrade process include:
The Oracle clusterware must be fully patched before an ASM rolling upgrade is started.
Rolling upgrades are only available from 11g onwards, so this method is not suitable for 10g to 11g upgrades.
This method can be used to rollback to the previous version if the rolling upgrade fails before completion.
If the upgrade fails, any rebalancing operations must complete before a new upgrade can be attempted.
New instances joining the cluster during a rolling upgrade are automatically placed in rolling upgrade mode.
If all instances in a cluster are stopped during a rolling upgrade, once the instances restart they will no longer be in rolling upgrade mode. The
upgrade must be initiated as if it were a new process.
Users can be created in the ASM instance in a similar manner to database users. Granting these users the SYSASM privilege allows them to connect
to the ASM instance and perform administration tasks. First, connect to the ASM instance.
$ export ORACLE_SID=+ASM
$ sqlplus / as sysasm
Next, create a new user in the ASM instance and grant it the SYSASM privilege. The user is now able to connect using SYSASM.
User created.
Grant succeeded.
Alternatively, assigning an operating system user to the OSASM group (asmadmin) allows then to connect as SYSASM using OS authentication. The
following example creates a new OS user assigned to the OSASM group (asmadmin), which is immediately able to connect using SYSASM.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
When the disk group compatibility attributes are set to 11.1 or higher, the extent size will automatically grow as the file grows. In 11.1, the first 20,000
extents match the allocation unit size (1*AU). The next 20,000 extents are made up of 8 allocation units (8*AU). Beyond that point, the extent size
becomes 64 allocation units (64*AU). In 11.2 this behavior has changed from 1, 8, 64 to 1, 4, 16.
In addition to the automatic expansion of the extent sizes, Oracle 11g also allows control over the allocation unit size using the ATTRIBUTE clause in
the CREATE DISKGROUP statement, with values ranging from 1M to 64M.
3 of 6 7/24/2014 9:08 PM
ORACLE-BASE - Automatic Storage Manager (ASM) Enhancements in O... http://www.oracle-base.com/articles/11g/asm-enhancements-11gr1.php
DISK '/dev/sde1'
ATRRIBUTE 'au_size' = '32M';
The combination of expanding extent sizes and larger allocation units should result in increased I/O performance for very large databases.
$ asmcmd -p
ASMCMD [+] >
The usage notes for each command is available by issuing the "help <command>" command from within the asmcmd utility, so I will avoid displaying
all this information here.
The lsdsk command lists information about ASM disks from the V$ASM_DISK_STAT and V$ASM_DISK views. The summary usage is shown below.
An example of the output from the basic command and the "-k" option are shown below.
The cp command allows files to be copied between ASM and local or remote destinations. The summary usage is shown below.
The following example copies the current USERS datafile from ASM to the local file system.
There seems to be some concern that the cp command doesn't work for control files (here).
The md_backup command makes a copy of the metadata for one or more disk groups. The summary usage is shown below.
An example of the command is shown below. The resulting file contains all the metadata needed to recreate the ASM setup.
The md_restore command allows you to restore a disk group from the metadata created by the md_backup command. It also allows a certain
amount of manipulation of the final disk groups during the restore. The summary usage is shown below.
4 of 6 7/24/2014 9:08 PM
ORACLE-BASE - Automatic Storage Manager (ASM) Enhancements in O... http://www.oracle-base.com/articles/11g/asm-enhancements-11gr1.php
The remap command repairs a range of physical blocks on disk. The contents of each block is not validated, so only blocks exhibiting read errors are
repaired. The summary usage is shown below.
To configure preferred read failure groups the disk group compatibility attributes must be set to 11.1 or higher. Once the compatibility options are
correct, the ASM_PREFERRED_READ_FAILURE_GROUPS parameter is set to the preferred failure groups for each node.
NAME FAILGROUP
------------------------------ ------------------------------
DATA_0000 DATA_0000
DATA_0001 DATA_0001
DATA_0002 DATA_0002
3 rows selected.
SQL>
Fast Rebalance
The "ALTER DISKGROUP ... MOUNT" statement allows disk groups to be mounted in restricted mode.
NAME
------------------------------
DATA
Diskgroup altered.
Diskgroup altered.
Diskgroup altered.
Diskgroup altered.
SQL>
In a RAC environment, a disk group mounted in RESTRICTED mode can only be accessed by a single instance. The restricted disk group is not
available to any ASM clients, even on the node where it is mounted.
Using RESTRICTED mode improves the performance of rebalance operations in a RAC environment as it elimitates the need for lock and unlock
extent map messaging that occurs between ASM instances. Once the rebalance operation is complete, the disk group should be dismounted then
mounted in NORMAL mode (the default).
The CHECK clause of the ALTER DISKGROUP command has been simplified so there are only two options, NOREPAIR and REPAIR, available,
with NOREPAIR as the default. Summarized errors are displayed, with full error messages writen to the alert log.
5 of 6 7/24/2014 9:08 PM
ORACLE-BASE - Automatic Storage Manager (ASM) Enhancements in O... http://www.oracle-base.com/articles/11g/asm-enhancements-11gr1.php
Disk groups can now be mounted in restricted mode, which can improve performance of some maintenance tasks.
The ALTER DISKGOUP command now includes ONLINE and OFFLINE clauses so disks can be taken offline for repair before being brought
back online.
-- Individual disks.
ALTER DISKGROUP data OFFLINE DISK 'disk_0000', 'disk_0001';
ALTER DISKGROUP data ONLINE DISK 'disk_0000', 'disk_0001';
-- Failure groups.
ALTER DISKGROUP data OFFLINE DISKS IN FAILGROUP 'fg_0000';
ALTER DISKGROUP data ONLINE DISKS IN FAILGROUP 'fg_0000';
Disk groups that can't be mounted by ASM can now be dropped using the FORCE keyword of the DROP DISKGROUP command.
4 Like 6 Tweet 0 9
6 of 6 7/24/2014 9:08 PM