Oracle's ASM is a large piece of content, which has been sorted out separately. The link is as follows:
Oracle ASM details
Http://blog.csdn.net/tianlesoftware/article/details/5314541
Summary of Oracle ASM Series
Http://blog.csdn.net/tianlesoftware/article/details/6364422
Remote client access to the ASM instance
Http://blog.csdn.net/tianlesoftware/article/details/5901749
Example of Oracle racasm disk header Backup Recovery and Reconstruction
Http://blog.csdn.net/tianlesoftware/article/details/6743677
Oracle uses bbed to view the content of the ASM disk Header
Http://blog.csdn.net/tianlesoftware/article/details/6739369
Views related to Oracle ASM (V $) and Data Dictionary (x $)
Http://blog.csdn.net/tianlesoftware/article/details/6733039
Upgrade an oracle racasm instance from 10.2.0.1 to 10.2.0.4
Http://blog.csdn.net/tianlesoftware/article/details/6416036
Oracledatabase 11gr1 and 10gr2 ASM best practices instructions
Http://blog.csdn.net/tianlesoftware/article/details/6302304
Procedure for modifying the ASM instance name of RAC
Http://blog.csdn.net/tianlesoftware/article/details/6275827
In this article, let's take a look at the enhancement of ASM in Oracle 11g,Content from Oracle 11g OCP. Later, I will summarize the ASM series.
I. asmfast mirror Resync 1.1 When the fast image without ASM is re-synchronized in the same step
Whenever ASM cannot write data to the partition allocated to a disk, it will take the disk offline and write at least one partition (ASM Data Partition) to another disk) (if the corresponding disk group uses ASM redundancy ).
When oracledatabase is used for 10 Gb, ASM assumes that the offline disk only contains outdated data, so it no longer reads data from this type of disk. Shortly after the disk is offline, ASM will re-create the partition (ASM data zone) allocated to the disk on the remaining disk in the disk group using the redundant zone copy to delete the offline disk from the disk group. This process is a relatively costly operation and may take several hours to complete.
If a disk fault is temporary (such as a cable, host bus adapter, controller fault, or disk power interruption), you must re-Add the disk after temporary fault repair. However, to add a deleted disk back to the disk group, you also need to migrate the partition (ASM data zone) back to the disk, which increases the cost.
1.2 ASM fast image synchronization 1.2.1 Overview
The re-synchronization of the ASM fast image significantly reduces the time required to re-Synchronize the temporary faulty disk. If a disk is offline due to a temporary fault, ASM will track the modified zone during the interruption. After a temporary fault is repaired, ASM can quickly synchronize only the affected ASM disk areas during the interruption. This function assumes that the affected ASM disk content is not damaged or modified.
When an ASM disk path fails, if you have set the disk_repair_time attribute of the corresponding disk group, the ASM disk will be offline but will not be deleted. The setting of this attribute determines the tolerable disk Interruption Duration of ASM. If the interruption is within this time range, the disk can still be synchronized after the restoration is complete.
Note: The tracking mechanism uses a single position for each modified area to ensure that the tracking mechanism is very efficient.
1.2.2 configure fast image synchronization for ASM
Set this function according to the disk group. You can use the alter diskgroup command to complete this operation after creating a disk group. Use a command similar to the following to enable fast image synchronization for ASM:
Alter diskgroupset attribute 'disk _ repair_time '= '2d4h30m'
After the disk is repaired, run the SQL statement alter diskgroup online disk. This statement can bring the repaired disk group online again to enable write operations, so that no new write content will be lost. This statement also starts a process to replicate all partitions marked as obsolete on its redundant copies. You cannot use the online statement on a deleted disk.
You can query the V $ asm_attribute view to view the current attribute value.
You can query the repair_timer column of V $ asm_disk or V $ asm_disk_iostat to determine the remaining time before ASM deletes an offline disk. In addition, a row corresponding to the disk re-synchronization operation appears in V $ asm_operation, and the operation column is set to sync.
For preventive maintenance, you can also use the SQL statement alter diskgroup offline disk to manually take the ASM disk offline. You can use this command to specify a timer to overwrite the timer defined at the disk group level. After maintenance, use the alter diskgroup online disk statement to bring the disk online again.
If you cannot fix a fault group that is offline, you can use the alter diskgroup drop disks infailgroup command with the force option, this ensures that the data originally stored on these disks is rebuilt based on the redundant copies of the data and stored on other disks in the same disk group.
Note: The time is calculated only when the disk group is loaded. In addition, changing the disk_repair_time value does not affect the previous offline disk. The default setting of disk_repair_time is 3.6 hours, which should be sufficient for most environments.
Ii. ASM preferred image read 2.1 Overview
When you configure an ASM fault group in Oracle database10g, ASM will always read the primary copy of the image area. It is more efficient for a node to read data from the fault group area closest to the node, even in the secondary area. This is especially evident in the expanded cluster configuration (nodes are distributed across multiple sites). In this case, reading data from local copies of the zone can improve performance.
When using oracledatabase 11g, you can use the new initialization parameter asm_preferred_read_failure_groups to specify the preferred image read name list to configure the preferred image read. The disks in these fault groups will become the preferred disk to read. In this way, each node can read data from its local disk. This not only improves efficiency and performance, but also reduces network traffic. The setting of this parameter depends on the specific instance.
2.2 settings
To configure this function, set the new asm_preferred_read_failure_groups initialization parameter. This parameter is a multi-value parameter and should contain a string with a comma-separated list of fault group names. The name of each specified fault group should be prefixed with its disk group name and a "." character. This parameter is a dynamic parameter and can be modified at any time using the alter system command. However, this initialization parameter is only valid for the ASM instance. When using the extended cluster, the fault group specified in this parameter should only contain the local disk of the corresponding instance.
The new column preferred_read has been added to the V $ asm_disk view and uses the single-character format. If the disk to which the disk belongs to the preferred read fault group, the value of this column is Y.
Use the V $ asm_disk_iostat view to determine whether ASM preferred to read specific performance issues from the fault group.
This view displays the disk input/output (I/O) statistics for each ASM client. If you query this view from a database instance, only the rows of this instance are displayed.
2.3 Best Practices
In practice, there are only a limited number of valid disk groups in the extended cluster. The effective disk group configuration takes into account the performance and availability of the disk group in the extended cluster at the same time. Below are some possible examples:
For an extended cluster that contains two sites, the normal redundant disk group should have only two fault groups, and all the local disks of one site should belong to the same fault group. In addition, each instance can only specify one fault group as the preferred read fault group. If there are more than two fault groups, ASM will not mirror a virtual zone across two sites. In addition, if the site with more than two fault groups is closed, the disk group will also be closed. If the disk to be created is a highly redundant disk group, you should create a maximum of two fault groups on each site and its local disk, specify both local fault groups as the preferred read fault group for the local instance.
For extended clusters with three sites, a high-redundancy disk group with three fault groups should be used. In this way, ASM ensures that each virtual zone has a copy of the local image for each site, and the disk groups on the three sites are protected to avoid major disasters.
Iii. scalability and Performance Enhancement
3.1 ASM scalability and Performance Enhancement
ASM variable Large cell is an automatic function. ASM can use this function to increase memory usage efficiency while supporting large file sizes.
In Oracle Database 11g, ASM supports 1, 8, and 64 allocation units (Au) of variable large cells. ASM uses a predetermined number of zones of various sizes. If a file exceeds the specified threshold, the next partition size is used.
This function can reduce the number of area pointers required for the description file and manage the memory required for intra-area ing in the Shared Pool (disabled in large file configurations ). The partition size varies between files and within the file.
You can use ASM to deploy hundreds of terabytes (or even several petabytes) of Oracle databases.
Note: The management of Variable-size cells is completely automated without manual management.
However, if a large number of non-contiguous small data areas are allocated and released, and no other contiguous large data areas are available, external fragments may occur. The fragment operation will be integrated into the rebalancing operation. Therefore, DBA can always perform the rebalancing operation to fragment the disk group.
However, this situation is extremely rare because ASM will automatically perform fragment during the partition allocation process when the required size is not available. This may extend the time for some Allocation Operations.
Note: This function can also speed up file opening, because it can greatly reduce the amount of memory required for the storage file area.
ASM scalability and performance enhancement:
(1) The partition size is automatically increased according to the file size.
(2) ASM supports variable area size, which can be:
-Increase the maximum file size.
-Reduce memory usage in the Shared Pool
(3) When important fragments occur, management tasks other than manual rebalancing are not required.
3.2 Oracle Database 11
GASM scalability in
ASM enforces the following restrictions:
(1) the storage system contains 63 disk groups.
(2) the storage system contains 10,000 ASM Disks
(3) The maximum storage space for each ASM disk is 4 Pb
(4) The maximum storage space for each storage system is 40 EB
(5) Each disk group contains 1 million files
(6) The maximum file size depends on the redundancy type of the disk group used:
The external redundancy is 140 Pb (the current value is greater than the possible database file size ),
The normal redundancy is 42 Pb,
High redundancy is 15 Pb.
Note: in Oracle database10g, the maximum size of external redundant ASM files is 35 TB.
Iv. Compatibility of the ASM disk group 4.1.
There are two compatibility options available for ASM disk groups:
(1) ASM compatibility: handling instructions on the persistent data structure of the disk group
(2) RDBMS compatibility: the ability to process clients (users of disk groups)
You can independently control the compatibility of each disk group. This is required to enable a heterogeneous environment that contains a disk group from Oracle Database 10g and oracledatabase 11g. These two compatibility settings are the attributes of each ASM disk group:
(1) RDBMS compatibility refers to the minimum compatible version of the RDBMS instance, which allows the instance to load the disk group. This compatibility determines the format of message exchange between the ASM instance and the database (RDBMS) instance. The ASM instance supports running different RDBMS clients with different compatibility settings. The database compatibility version setting for each instance must be higher than or equal to the RDBMS compatibility of all disk groups used by the database. Database instances and ASM instances are usually run in different Oracle Home Directories. This indicates that the database instance and the ASM instance may run different software versions. When the database instance is connected to the ASM instance for the first time, the system will agree the maximum version supported by both instances. The database compatibility parameter settings, the database software version, and the RDBMS compatibility settings of the disk group determine whether the database instance can load the specified disk group.
(2) ASM compatibility refers to the persistent compatibility settings that control the data structure format of the ASM metadata on the disk. The ASM Compatibility Level of a disk group must always be higher than or equal to the RDBMS Compatibility Level of the same disk group. ASM compatibility is only related to the format of ASM metadata. The format of the file content depends on the database instance. For example, you can set the ASM compatibility of a disk group to 11.0, And the RDBMS compatibility of the disk group to 10.1. This indicates that the disk group can only be managed by the ASM Software Version 11.0 or higher, and can be used by any database client with a software version higher than or equal to 10.1.
Only when the persistent disk structure or message transfer protocol is changed, the compatibility of the disk group needs to be improved. However, increasing the compatibility of a disk group is irreversible. You can use the create diskgroup command or the alter diskgroup command to set the disk group compatibility.
Note: In addition to determining the disk group compatibility, the compatible parameter (Database compatible version) also determines the features enabled. This parameter applies to database instances or ASM instances, depending on the instance_type parameter. For example, setting this parameter to 10.1 will disable any new features introduced in Oracle Database 11g (online/offline disks, variable regions, etc ).
4.2 attributes of the ASM disk group
When creating or changing an ASM disk group, you can use the create diskgroup command or the Attribute Clause added by the alter diskgroup command to change its attributes.
ASM disk group attributes:
(1) Using ASM, you can use different au sizes specified during disk creation. The AU size can be 1 MB, 2 MB, 4 MB, 8 Mb, 16 MB, 32 MB, or 64 MB.
(2) RDBMS compatibility.
(3) ASM compatibility.
(4) You can specify disk_repair_time in the unit of minute (M), hour (H), or day (d.
If the unit is omitted, the default unit is H. If you ignore this attribute, the default value is 3.6 h. You can use the alter diskgroup statement to overwrite this attribute.
(5) You can specify the redundancy attribute for the specified template.
(6) You can specify the Strip attribute for the specified template.
Note: For each defined disk group, you can use the V $ asm_attribute fixed view to view all the defined attributes.
See the following table:
4.3 enhanced disk group check
The check disk group command is simplified. By default, all metadata directories are checked. Use the check command to verify the internal consistency of the metadata of the ASM disk group.
Alter diskgroupdata check;
ASM displays an error summary and writes the detected error details to the warning log.
In earlier versions, you can specify this clause for all, disk, disks in failgroup, and file.
Since these clauses are no longer needed, they are discarded. In the current version, you can perform the following operations with the check Keyword:
(1) Check disk consistency (equivalent to check disk and check disk in failgroup in previous versions)
(2) Cross-check the consistency of all file area ing and allocation tables (equivalent to check file in previous versions)
(3) check whether the link between the alias metadata directory and the file directory is correct.
(4) check whether the link to the alias directory tree is correct
(5) Check the ASM metadata directory to make sure it does not contain allocated blocks that cannot be accessed
Use the repair | norepair clause to indicate whether ASM attempts to fix errors found during consistency checks. The default value is "repair (repair )". If you want to receive a notification when there are inconsistencies, but do not want ASM to perform any automatic operations to solve the problem, you can use the "norepair (not fixed)" setting.
Note: introducing additional checks in the disk group check will speed up the entire disk group check operation. Introducing additional checks in the disk group check reduces the speed of the entire disk group check operation.
4.4 restricted Mount disk groups for fast rebalancing
In Oracle database11g, there is a new loading mode restricted for mounting the disk group. When a disk is loaded in restricted mode, the client cannot access the files in the disk. If an ASM instance knows that no client exists, the instance will not try to send messages to the client to lock/unlock the lock zone ing, which can improve the performance of the rebalance operation.
The disk group loaded in restricted mode is loaded exclusively on only one node. The ASM client on this node cannot use this disk group.
In restricted mode, all maintenance tasks can be performed on a disk group in the ASM instance without external interaction.
At the end of the maintenance cycle, you must unmount the disk Group explicitly and then reload the corresponding disk group in normal mode.
The alter diskroupdiskgroupname mount command has been extended and supports ASM to mount a disk group in restricted mode.
When you use the restricted option to start an ASM instance, all the disk groups defined in the asm_diskgroups parameter will be loaded in restricted mode.
Suitable for fast rebalancing of restricted Mount disk groups:
(1) The disk group can only be mounted on a single instance.
(2) No database client or other ASM instances can obtain access permissions.
(3) Rebalancing can continue without locking overhead.
Example:
(1) alter diskgroup data dismount;
(2) alter diskgroup data Mount restrict;
(3) maintenance task: Add/delete disks...
(4) alter diskgroup data dismount;
(5) alter diskgroup data Mount;
4.5 force mount a disk group
This function changes the ASM behavior when an incomplete disk group is loaded.
When using oracledatabase for 10 Gb, as long as there are enough fault groups to load the disk group, the loading operation will be successful, even if there is a lost or damaged fault group. This action may automatically delete the ASM disk, and you need to re-Add the disk after the repair, which will lead to a long time for the rebalancing operation.
When you use oracledatabase 11g, this operation will fail unless a new force option is specified when the corrupted disk group is mounted. In this way, you can correct the configuration error (such as asm_diskstring setting error) or solve the connectivity problem before trying to reload.
However, the disk groups loaded with the force option may take one or more disks offline (if these disks are not available during loading ). You must take corrective actions before disk_repair_time expires and the devices cannot be restored. If these disks are not brought online, the system will delete them from the disk group. Therefore, a high-cost rebalancing is required to restore redundancy for all files in the disk group. In addition, if one or more devices are offline due to mount force, some or all files cannot be properly protected until redundancy in the disk is restored by rebalancing.
Therefore, if you know that some disks belonging to a disk group are not available, the mount command with the force option is useful. If ASM finds enough disks to form an arbitration disk, the disk is successfully loaded.
When no option is specified, the mount option with the noforce option is the default mount option. In noforce mode, all disks belonging to a disk group must be accessible. Otherwise, the disk will not be loaded successfully.
Note: specifying the force option is not necessary, which may cause errors. There is also a special case in the Cluster: if the first disk to be loaded is not an ASM instance, when it is determined that the disk cannot be accessed locally but other instances can access the disk, mount force will fail due to an error.
Force mount a disk group
• By default, Mount uses the noforce option:
-All disks must be available.
• Mount with the force option:
-If an arbitration disk exists, it will take the unavailable disk offline.
-If all disks are available, the operation fails.
Alter diskgroup data Mount [force | noforce];
4.6 force delete a disk group
Force delete a disk group marks the disk header of a disk that is not loaded by the ASM instance as former. However, the ASM instance first determines whether any other ASM instance using the same storage subsystem is using the disk group. If yes, and the disk group is on the same cluster or node, the statement fails.
If the disk group is on a different cluster, the system checks whether an instance in another cluster has been attached to the disk group. If the disk is mounted elsewhere, the statement fails. However, compared with checking the disk groups in the same cluster. The next check is not very definite. Therefore, use this clause with caution.
Note: When executing the drop diskgroup command with the force option, you must specify the including contents clause at the same time.
Force delete a disk group
(1) allow users to delete unmounted disk groups
(2) If a disk group is mounted anywhere, the operation fails.
Drop diskgroup data force including contents;
5. Use the sysasm role
This feature introduces a new role sysasm, specifically used to execute the ASM management task. Replacing the sysdba role with the sysasm role improves security because the ASM management is separated from the database management.
When oracledatabase 11G version 1 is used, the OS groups of sysasm and sysdba are the same, and the default installation group of sysasm is DBA. In future versions, separate groups must be created and sysdba users will be limited in the ASM instance.
You can also use the create user and grant sysasm SQL statement combination in the ASM instance to create a new sysasm user. This is useful for remote ASM management. These commands can update the password file of each ASM instance without the need to start and run the instance. Similarly, you can use the revoke command to revoke the user's sysasm role and use the drop USER command to delete the user from the password file.
The V $ pwfile_users view integrates a new sysasm column to indicate whether a user (true or false) can be associated with sysasm permissions.
Note: When Oracle Database 11G version 1 is used, if you log on to the ASM instance as sysdba, a warning will be written in the corresponding alert. log file.
Vi. asmcmd Extension
(1) asmcmd has been extended, including ASM metadata backup and restoration. In this way, you can use the corresponding template and alias directory structure to recreate the existing ASM disk group. Currently, if the ASM disk group is lost, you can use RMAN to restore the lost files. However, you must manually recreate the ASM disk group and any Required User Directories Or templates.
ASM metadata backup and restoration (ambr) have two operation modes:
1) In backup mode, ambr analyzes the ASM fixed tables and views to collect information about the existing disk and fault group configurations, templates, and alias directory structure. Then, dump the metadata information to a text file.
2) In restoration mode, ambr reads the previously generated files to reconstruct the disk group and its metadata. You can control the ambr behavior in restoration mode to perform full, nodg, or newdg restoration. The difference between the three sub-modes is whether to include creating a disk group and changing its features.
(2) The lsdsk command can list information about the ASM disk. This command can be run in two modes:
1) In connection mode, asmcmd uses the V $ view and GV $ view to retrieve disk information.
2) in non-connection mode, asmcmd uses the ASM disk string to restrict the search set and scans the disk header to retrieve disk information. The connection mode is always the preferred operation.
(3) Use the CP command to copy files between the local instance and the ASM disk on the remote instance. The following is a possible example:
CP + Data/orcl/datafile/tbsjfv.256.629730771 + Data/orcl/tbsjfv. Bak
In the preceding example, an existing file is copied locally. However, you can specify a connection string to copy files to a remote ASM disk. The format of the copied file is portable between the little-Endian System and the big-Endian system. You can also use the CP command to copy the ASM file to your operating system. For example:
CP + Data/orcl/datafile/tbsjfv.256.629730771/home/Oracle/tbsjfv. DBF
You can also use the CP command to copy files from your operating system to an ASM directory. For example:
CP/home/Oracle/tbsjfv. DBF + Data/jfv
To copy an ASM file from a local ASM instance to a remote ASM instance, use the following syntax:
CP + Data/orcl/datafile/tbsjfv.256.629989893
\ Sys @ edcdr12p1. + asm2: + D2/jfv/tbsjfv. DBF
Bytes ---------------------------------------------------------------------------------------
Skype: tianlesoftware
QQ: tianlesoftware@gmail.com
Email: tianlesoftware@gmail.com
Blog: http://blog.csdn.net/tianlesoftware
WEAVER: http://weibo.com/tianlesoftware
Twitter: http://twitter.com/tianlesoftware
Facebook: http://www.facebook.com/tianlesoftware
LinkedIn: http://cn.linkedin.com/in/tianlesoftware