Asm Imp
Asm Imp
Only Oracle files are supported: * Database files * Control files * Online redo log files * Archived redo log files * Flash recovery area files * RMAN files (image copy and backup) These files are NOT supported: * Installation files (in ORACLE_HOME, CRS_HOME) * ORACLE_BASE files( including alert log, trace files, etc) * CRS voting disk and OCR files * Output data from UTL_FILE * Any user or application specific files(e.g. XML or Java files) * Oracle 9i external table files
Why ASM ?
Some of the storage management features with ASM include
Striping Mirroring Asynchronous I/O Direct I/O SAME and Load Balancing Is automatically installed as part of the base code set
ASM includes striping and mirroring to provide balanced and secure storage. The level of redundancy and the granularity of the striping can be controlled using templates. The new ASM functionality can be used in combination with existing raw and cooked file systems, along with OMF and manually managed files. Pre-Requisite for ASM Need CSS demon for creating an ASM instance(CSS service is responsible for synchronizing ASM and RDBMS instances.) $ps- ef | grep css In RAC it is done by Oracle Clusterware In single instance environment, we have to run #$ORACLE_HOME/bin/localconfig add Need additional atleast 100M memory for ASM instance
Features of ASM instance Dont mount the database but manage metadata required metadata to make ASM files available for DB instance DB instance access ASM files directly and contact ASM instance only for the layout of ASM files Smaller than DB instance < 100m Contains no physical files like logfiles/controlfiles or data files Requires only the init.ora file for startup Instance name is +ASM or +ASM 1.n(RAC) This is the new feature of 10g DATABASE --- C/R/D files <---- OS ---- Hard disk With the help of OS we are storing into Hard disk. Oracle has given their own file system i.e ASM. If we go with ASM 10 to 15 % performance will increased. DATABASE <------ ASM <------ Hard disk ASM is responsible to store and manage database files such as control, data, redo log files, spfile(not pfile) Archivelog file directly in the hard disk without taking help of OS, why b/c ASM itself acts as a file system. Here hard disk means raw disk(not formatted hard disk) Key points ASM is free which comes with oracle software. It acts as a logical volume manager(LVM). ASM operates on raw device(unformatted SATA Hard disk). A db can consists ASM files and OS files as well. We cannot take backup of ASM files by using user managed from OS, with the help of oracle utilites such as OEM, RMAN we can take backup of ASM database files. Root directory of ASM is + . Oracle uses two instances 1. RDBMS instance 2. ASM instance ASM Instance
ASM instance is a special type of oracle instance that are responsible to store and manage ASM files which are present in the ASM disk groups. An ASM has a SGA and background processes that are similar to those of Oracle Database. However, because ASM performs fewer tasks than a database, an ASM SGA is much smaller than a database SGA. In addition, ASM has a minimal performance effect on a server. ASM instances mount disk groups to make ASM files available to database instances. ASM instances do not mount databases. ASM metadata is the information that ASM uses to control a disk group and the metadata resides within the disk group. ASM metadata includes the following information:
The disks that belong to a disk group The amount of space that is available in a disk group The filenames of the files in a disk group The location of disk group datafile data extents A redo log that records information about atomically changing data blocks
ASM and database instances require shared access to the disks in a disk group. ASM instances manage the metadata of the disk group and provide file layout information to the database instances. ASM instances can be clustered using Oracle Clusterware; there is one ASM instance for each cluster node. If there are several database instances for different databases on the same node, then the database instances share the same single ASM instance on that node. If the ASM instance on a node fails, then all of the database instances on that node also fail. Unlike a file system failure, an ASM instance failure does not require restarting the operating system. In an Oracle RAC environment, the ASM and database instances on the surviving nodes automatically recover from an ASM instance failure on a node.
When you create a disk group, you specify an ASM disk group type based on one of the following three redundancy levels:
Normal for 2-way mirroring High for 3-way mirroring External to not use ASM mirroring, such as when you configure hardware RAID for redundancy
The disk group type determines the mirroring levels with which Oracle creates files in a disk group. The redundancy level controls how many disk failures are tolerated without dismounting the disk group or losing data. ASM mirroring is more flexible than traditional RAID mirroring because you can specify the redundancy level for each file. Two files can share the same disk group with one file being mirrored while the other is not. When ASM allocates an extent for a normal redundancy file, ASM allocates a primary copy and a secondary copy. ASM chooses the disk on which to store the secondary copy in a different failure group other than the primary copy. Failure groups are used to place mirrored copies of data so that each copy is on a disk in a different failure group. The simultaneous failure of all disks in a failure group does not result in data loss. After a disk group is created, you cannot alter the redundancy level of the disk group. To change the redundancy level of a disk group, create another disk group with the appropriate redundancy and then move the files to the new disk group. Oracle recommends that you create failure groups of equal size to avoid space imbalance and uneven distribution of mirror data. If you omit the failure group specification, then ASM automatically places each disk into its own failure group. Normal redundancy disk groups require at least two failure groups. High redundancy disk groups require at least three failure groups. Disk groups with external redundancy do not use failure groups.
A disk or partition from a storage array An entire disk or the partitions of a disk Logical volumes Network-attached files (NFS)
When you add a disk to a disk group, you either assign a disk name or the disk is given an ASM disk name automatically. This name is different from the name used by the operating system. In a cluster, a disk may be assigned different operating system device names on different nodes, but
the disk has the same ASM disk name on all of the nodes. In a cluster, an ASM disk must be accessible from all of the instances that share the disk group. If the disks are the same size, then ASM spreads the files evenly across all of the disks in the disk group. This allocation pattern maintains every disk at the same capacity level and ensures that all of the disks in a disk group have the same I/O load. Because ASM load balances among all of the disks in a disk group, different ASM disks should not share the same physical drive. Allocation Units facilation Every ASM disk is divided into allocation units (AU). An AU is the fundamental unit of allocation within a disk group. A file extent consists of one or more AU. An ASM file consists of one or more file extents. When you create a disk group, you can set the ASM AU size to be between 1 MB and 64 MB in powers of two, such as, 1, 2, 4, 8, 16, 32, or 64.
ASM Files
Files that are stored in ASM disk groups are called ASM files. Each ASM file is contained within a single ASM disk group. Oracle Database communicates with ASM in terms of files. This is identical to the way Oracle Database uses files on any file system. You can store the following file types in ASM disk groups:
Control files Datafiles, temporary datafiles, and datafile copies SPFILEs Online redo logs, archive logs, and Flashback logs RMAN backups Disaster recovery configurations Change tracking bitmaps Data Pump dumpsets
Note: Oracle executables and ASCII files, such as alert logs and trace files, cannot be stored in ASM disk groups. ASM automatically generates ASM file names as part of database operations, including tablespace creation. ASM file names begin with a plus sign (+) followed by a disk group name. You can specify user-friendly aliases for ASM files and create a hierarchical directory structure for the aliases. Extents
The contents of ASM files are stored in a disk group as a set, or collection, of data extents that are stored on individual disks within disk groups. Each extent resides on an individual disk. Extents consist of one or more allocation units (AU). To accommodate increasingly larger files, ASM uses variable size extents. The initial extent size is equal to the allocation unit size and it increases by a factor of 8 and 64 at predefined thresholds. This feature is automatic for newly created and resized datafiles when the disk group compatibility attributes are set to Oracle Release 11 or higher. ASM Striping ASM striping has two primary purposes:
To balance loads across all of the disks in a disk group To reduce I/O latency
Coarse-grained striping provides load balancing for disk groups while fine-grained striping reduces latency for certain file types by spreading the load more widely. To stripe data, ASM separates files into stripes and spreads data evenly across all of the disks in a disk group. The stripes are equal in size to the effective AU. The coarse-grained stripe size is always equal to the AU size. The fine-grained stripe size always equals 128 KB; this provides lower I/O latency for small I/O operations such as redo log writes. File Templates Templates are collections of attribute values that are used to specify file mirroring and striping attributes for an ASM file when it is created. When creating a file, you can include a template name and assign desired attributes based on an individual file rather than the file type. A default template is provided for every Oracle file type, but you can customize templates to meet unique requirements. Each disk group has a default template associated with each file type.
You can explicitly dismount a disk group. Oracle reports an error if you attempt to dismount a disk group when any of the disk group files are open. It is possible to have disks fail in excess of the ASM redundancy setting. If this happens, then the disk group is forcibly dismounted. This shuts down any database instances that are using the disk group.
You can create an ASM disk group using one of the following storage resources:
Raw disk partitionA raw partition can be the entire disk drive or a section of a disk drive. However, the ASM disk cannot be in a partition that includes the partition table because the partition table can be overwritten. Logical unit numbers (LUNs)Using hardware RAID functionality to create LUNs is a recommended approach. Storage hardware RAID 0+1 or RAID5, and other RAID configurations, can be provided to ASM as ASM disks. Raw logical volumes (LVM)LVMs are supported in less complicated configurations where an LVM is mapped to a LUN, or an LVM uses disks or raw partitions. LVM configurations are not recommended by Oracle because they create a duplication of functionality. Oracle also does not recommended using LVMs for mirroring because ASM already provides mirroring. NFS filesASM supports NFS files as ASM disks. Oracle Database has built-in support for the network file system (NFS) and does not depend on OS support for NFS. Although NFS and ASM have overlapping functionality, ASM can load balance or mirror across NFS files.
The procedures for preparing storage resources for ASM are: 1. Identify or create the storage devices for ASM by identifying all of the storage resource device names that you can use to create an ASM disk group. For example, on Linux systems, device names are typically presented from the /dev directory with the /dev/device_name_identifier name syntax. 2. Change the ownership and the permissions on storage device resources. For example, the following steps are required on Linux systems: o Change the user and group ownership of devices to oracle:dba o Change the device permissions to read/write o On older Linux versions, you must configure raw device binding After you have configured ASM, ensure that disk discovery has been configured correctly by setting the ASM_DISKSTRING initialization parameter. Note: Setting the ownership to oracle:dba is just one example that corresponds to the default settings. A non-default installation may require different settings. In general, the owner of the disk devices should be the same as the owner of the Oracle binary. The group ownership should be OSDBA of the ASM instance, which is defined at installation.
eliminating a single point of failure with the Storage Area Network (SAN), Host Bus Adapter, interface cable, or host port on a multiported storage array. Multipathing is a software technology implemented at the operating system device driver level. Multipathing creates a pseudo device to facilitate the sharing and balancing of I/O operations across all of the available I/O paths. Multipathing also improves system performance by distributing the I/O load across all available paths. This provides a higher level of data availability through automatic failover and failback. Although ASM is not designed with multipathing functionality, ASM does operate with multipathing technologies. Multipathing technologies are available from many sources. Storage vendors offer multipathing products to support their specific storage products, while software vendors usually develop multipathing products to support several server platforms and storage products.
Configure two disk groups, one for the datafile and the other for the Flash Recovery Area. For availability purposes, one is used as a backup for the other. Ensure that LUNs, which are disk drives of partitions, that ASM disk groups use have similar storage performance and availability characteristics. In storage configurations with mixed speed drives, such as 10K and 15K RPM, I/O distribution is constrained by the slowest speed drive. Be aware that ASM data distribution policy is capacity-based. LUNs provided to ASM have the same capacity for each disk group to avoid an imbalance. Use the storage array hardware RAID 1 mirroring protection when possible to reduce the mirroring overhead on the server. Use ASM mirroring redundancy in the absence of a hardware RAID, or when you need host-based volume management functionality, such as
mirroring across storage systems. You can use ASM mirroring in configurations when mirroring between geographically-separated sites over a storage interface. Hardware RAID 1 in some lower-cost storage products is inefficient and degrades the performance of the array. ASM redundancy delivers improved performance in lower-cost storage products.
Maximize the number of disks in a disk group for maximum data distribution and higher I/O bandwidth. Create LUNs using the outside half of disk drives for higher performance. If possible, use small disks with the highest RPM. Create large LUNs to reduce LUN management overhead. Minimize I/O contention between ASM disks and other applications by dedicating disks to ASM disk groups for those disks that are not shared with other applications. Choose a hardware RAID stripe size that is a power of 2 and less than or equal to the size of the ASM allocation unit. Avoid using a Logical Volume Manager (LVM) because an LVM would be redundant. However, there are situations where certain multipathing or third party cluster solutions require an LVM. In these situations, use the LVM to represent a single LUN without striping or mirroring to minimize the performance impact. For Linux, when possible, use the Oracle ASMLIB feature to address device naming and permission persistency.
ASMLIB provides an alternative interface for the ASM-enabled kernel to discover and access block devices. ASMLIB provides storage and operating system vendors the opportunity to supply extended storage-related features. These features provide benefits such as improved performance and greater data integrity.
A 10.1 database instance operating with an 11.1 ASM instance supports only ASM 10.1 features. An 11.1 database instance operating with a 10.1 ASM instance supports only ASM 10.1 features.
The SOFTWARE_VERSION column contains the software version number of the database or ASM instance for the selected disk group connection. The COMPATIBLE_VERSION column contains the setting of COMPATIBLE parameter of the database or ASM instance for the selected disk group connection.
You can query the V$ASM_CLIENT view on both ASM and database instances.
When installing ASM for a single-instance Oracle Database, DBCA creates a separate server parameter file (SPFILE) and password file for the ASM instance. When installing ASM in a clustered ASM environment where the ASM home is shared among all of the nodes, DBCA creates an SPFILE for ASM. In a clustered environment without a shared ASM home, DBCA creates a text-based initialization parameter file (PFILE) for ASM on each node. You can use an SPFILE or PFILE as the ASM instance parameter file. If you use an SPFILE in a clustered ASM environment, then you must place the SPFILE on a shared raw device or on a cluster file system. If you do not use a shared ASM home, then the ASM instance uses a PFILE. The same rules for file name, default location, and search order that apply to database initialization parameter files also apply to ASM initialization parameter files
$ORACLE_HOME/dbs/spfile+ASM.ora
Note: 1. For a Linux environment, automatic memory management cannot work if /dev/shm is not available or is undersized. For more information, see Oracle Database Administrator's Reference for Linux and UNIX. For information about platforms that support automatic memory management, see Oracle Database Administrator's Guide. 2.The minimum MEMORY_TARGET for ASM is 256 MB. If you set MEMORY_TARGET to 100 MB, then Oracle increases the value for MEMORY_TARGET to 256 MB automatically.
When using a text initialization parameter file (PFILE), you must edit the initialization parameter file to add the name of any disk group that you want mounted automatically at instance startup. You must remove the name of any disk group that you no longer want automatically mounted.
ASM_DISKGROUPS = CONTROLFILE, DATAFILE, LOGFILE, STANDBY
Note: Issuing the ALTER DISKGROUP...ALL MOUNT or ALTER DISKGROUP...ALL DISMOUNT commands does not affect the value of ASM_DISKGROUPS. ASM_DISKSTRING The ASM_DISKSTRING initialization parameter specifies a comma-delimited list of strings that limits the set of disks that an ASM instance discovers. The discovery strings can include wildcard characters. Only disks that match one of the strings are discovered. The same disk cannot be discovered twice.
For example, on a Linux server that does not use ASMLIB, to limit the discovery process to only include disks that are in the /dev/rdsk/ directory, set ASM_DISKSTRING to:
/dev/rdsk/*
The asterisk is required. To limit the discovery process to only include disks that have a name that ends in disk3 or disk4, set ASM_DISKSTRING to:
/dev/rdsk/*disk3, /dev/rdsk/*disk4
The ? character, when used as the first character of a path, expands to the Oracle home directory. Depending on the operating system, when you use the ? character elsewhere in the path, it is a wildcard for one character. The default value of the ASM_DISKSTRING parameter is a NULL string. A NULL value causes ASM to search a default path for all disks in the system to which the ASM instance has read and write access. The default search path is platform-specific. ASM cannot use a disk unless all of the ASM instances in the cluster can discover the disk through one of their own discovery strings. The names do not need to be the same on every node, but all disks must be discoverable by all of the nodes in the cluster. This may require dynamically changing the initialization parameter to enable adding new storage. ASM_POWER_LIMIT The ASM_POWER_LIMIT initialization parameter specifies the default power for disk rebalancing. The default value is 1 and the range of allowable values is 0 to 11 inclusive. A value of 0 disables rebalancing. Higher numeric values enable the rebalancing operation to complete more quickly, but might result in higher I/O overhead. ASM_PREFERRED_READ_FAILURE_GROUPS The ASM_PREFERRED_READ_FAILURE_GROUPS initialization parameter value is a commadelimited list of strings that specifies the failure groups that should be preferentially read by the given instance. This parameter is generally used only for clustered ASM instances and its value can be different on different nodes. For example: diskgroup_name1.failure_group_name1, ... The ASM_PREFERRED_READ_FAILURE_GROUPS parameter setting is instance specific. This parameter is only valid for clustered ASM instances and the default value is NULL. Note: The ASM_PREFERRED_READ_FAILURE_GROUPS parameter is valid only in Oracle RAC environments.
DB_CACHE_SIZE You do not need to set a value for the DB_CACHE_SIZE initialization parameter if you use automatic memory management. The setting for the DB_CACHE_SIZE parameter determines the size of the buffer cache. This buffer cache is used to store metadata blocks. The default value for this parameter is suitable for most environments. DIAGNOSTIC_DEST The DIAGNOSTIC_DEST initialization parameter specifies the directory where diagnostics for an instance are located. The value for an ASM instance is of the form: diagnostic_dest=/diag/asm/db_name/instance_name For an ASM instance, db_name defaults to +asm. INSTANCE_TYPE The INSTANCE_TYPE initialization parameter must be set to ASM for an ASM instance. This is a required parameter and cannot be modified. The following is an example of the INSTANCE_TYPE parameter in the initialization file:
INSTANCE_TYPE = ASM
LARGE_POOL_SIZE You do not need to set a value for the LARGE_POOL_SIZE initialization parameter if you use automatic memory management. The setting for the LARGE_POOL_SIZE parameter is used for large allocations. The default value for this parameter is suitable for most environments. PROCESSES You do not need to set a value for the PROCESSES initialization parameter if you use automatic memory management. The PROCESSES initialization parameter affects ASM, but generally you do not need to modify the setting. The default value provided is usually suitable. REMOTE_LOGIN_PASSWORDFILE The REMOTE_LOGIN_PASSWORDFILE initialization parameter specifies whether the ASM instance checks for a password file. This parameter operates the same for ASM and database instances.
SHARED_POOL_SIZE You do not need to set a value for the SHARED_POOL_SIZE initialization parameter if you use automatic memory management. The setting for the SHARED_POOL_SIZE parameter determines the amount of memory required to manage the instance. The setting for this parameter is also used to determine the amount of space that is allocated for extent storage. The default value for this parameter is suitable for most environments.
Add and remove ASM instance records in the Oracle Cluster Registry (OCR) Enable, disable, start, and stop ASM instances Display the ASM instance configuration and status
To connect to an ASM instance with SQL*Plus, set the ORACLE_SID environment variable to the ASM SID. The default ASM SID for a single-instance database is +ASM, and the default SID for ASM for an Oracle RAC node is +ASMnode_number where node_number is the number of the node The initialization parameter file must contain the following entry:
INSTANCE_TYPE = ASM
This parameter indicates that an ASM instance, not a database instance, is starting.
When you run the STARTUP command, rather than trying to mount and open a database, this command attempts to mount the disk groups specified by the initialization parameter ASM_DISKGROUPS. If you have not entered a value for ASM_DISKGROUPS, then the ASM instance starts and Oracle displays an error that no disk groups were mounted. You can then mount disk groups with the ALTER DISKGROUP...MOUNT command. ASM provides a MOUNT FORCE option to enable ASM disk groups to be mounted in normal or high redundancy modes even though some ASM disks may be unavailable to the disk group at mount time. The default behavior without the FORCE option is to fail to mount a disk group that has damaged or missing disks. To successfully mount with the MOUNT FORCE option, ASM must be able to find at least one copy of the extents for all of the files in the disk group. In this case, ASM can successfully mount the disk group, but with potentially reduced redundancy. If all disks are available, then using the FORCE option causes the MOUNT command to fail as well. This discourages unnecessary and improper use of the feature. ASM puts the unavailable disks in an offline mode if ASM is unable to access them. ASM then begins timing the period that these disks are in an offline mode. If the disk offline time period exceeds the timer threshold, then ASM permanently drops those disks from the disk group. You can change the offline timer after a disk is put in an offline state by using the ALTER DISKGROUP OFFLINE statement. The MOUNT FORCE option is useful in situations where a disk is temporarily unavailable and you want to mount the disk group with reduced redundancy while you correct the situation that caused the outage. Note: An ASM instance mounts an incomplete disk group differently depending on the specified compatibility as discussed under the heading "Disk Group Compatibility".
The associated Oracle database instance does not need to be running when you start the associated ASM instance.
specified.
Starts up an instance in restricted mode that enables access only to users with both the CREATE SESSION and RESTRICTED SESSION system privileges. The RESTRICT clause can be used in combination with the MOUNT, NOMOUNT, and OPEN clauses. In restricted mode, database instances cannot use the disk groups. In other words, databases cannot open files that are in that disk group. Also, the disk group cannot be mounted by any other instance in the cluster. Mounting the disk group in restricted mode enables only one ASM instance to mount the disk group. This mode is useful to mount the disk group for repairing configuration issues. About Restricted Mode You can use the STARTUP RESTRICT command to control access to an ASM instance while you perform maintenance. When an ASM instance is active in this mode, all of the disk groups that are defined in the ASM_DISKGROUPS parameter are mounted in RESTRICTED mode. This prevents databases from connecting to the ASM instance. In addition, the restricted clause of the ALTER SYSTEM statement is disabled for the ASM instance. The ALTER DISKGROUP diskgroupname MOUNT statement is extended to enable ASM to mount a disk group in restricted mode. When you mount a disk group in RESTRICTED mode, the disk group can only be mounted by one instance. Clients of ASM on that node cannot access that disk group while the disk group is mounted in RESTRICTED mode. The RESTRICTED mode enables you to perform maintenance tasks on a disk group in the ASM instance without interference from clients. Rebalance operations that occur while a disk group is in RESTRICTED mode eliminate the lock and unlock extent map messaging that occurs between ASM instances in an Oracle RAC environment. This improves the overall rebalance throughput. At the end of a maintenance period, you must explicitly dismount the disk group and remount it in normal mode. Cluster Synchronization Services Requirements for ASM The Cluster Synchronization Services (CSS) daemon provides cluster services for ASM, communication between the ASM and database instances, and other essential services. When DBCA creates a database, the CSS daemon is usually started and configured to start upon restart. If DBCA created the database, then you must ensure that the CSS daemon is running before you start the ASM instance.
CSS Daemon on UNIX and Linux Computers
To determine if the CSS daemon is running, run the command crsctl check cssd. If Oracle displays the message CSS appears healthy, then the CSS daemon is running. Otherwise, to start the CSS daemon and configure the host to always start the daemon upon restart, do the following: 1. Log in to the host as the root user. 2. Ensure that the entry $ORACLE_HOME/bin is in your PATH environment variable.
You can also use the crsctl and localconfig commands to check the status of the CSS daemon or to start it. To use Windows GUI tools to determine whether the CSS daemon is properly configured and running, double-click the Services icon in the Windows Control Panel and locate the OracleCSService service. The service's status should be Started and its startup type should be Automatic. Note: Refer to your Windows documentation for information about how to start a Windows service and how to configure it for automatic startup.
The ASM instance waits for all connected ASM instances and SQL sessions to exit then shuts down. IMMEDIATE The ASM instance waits for any SQL transactions to complete then shuts down. It doesnt wait for sessions to exit. TRANSACTIONAL Same as IMMEDIATE. ABORT The ASM instance shuts down instantly.
NORMAL
ARBn performs the actual rebalance data extent movements in an Automatic Storage Management instance. There can be many of these processes running at a time, named ARB0, ARB1, and so on. ASMB runs in a database instance that is using an ASM disk group. ASMB communicates with the ASM instance, managing storage and providing statistics. ASMB
can also run in the ASM instance. ASMB runs in ASM instances when the ASMCMD cp command runs or when the database instance first starts if the SPFILE is stored in ASM. GMON maintains disk membership in ASM disk groups. MARK marks ASM allocation units as stale following a missed write to an offline disk. This essentially tracks which extents require resync for offline disks. RBAL runs in both database and ASM instances. In the database instance, it does a global open of ASM disks. In an ASM instance, it also coordinates rebalance activity for disk groups.
Also, there are ASM slave processes that run periodically to perform a specific task. The slave processes are not technically background processes. The V$BGPROCESS view that displays information about background processes
The instance from which you run this statement verifies whether the value that you specified for number is compatible with the current installed version of your software. When the upgrade begins, the behavior of the clustered ASM environment changes, and only the following operations are permitted on the ASM instance:
Disk group mount and dismount Database file open, close, resize, and delete Limited access to fixed views and fixed packages
Oracle disables all global views when a clustered ASM environment is in rolling upgrade mode.(only local views available)
After the rolling upgrade has been started, you can shut down each ASM instance and perform the software upgrade. On start up, the updated ASM instance can rejoin the cluster. When you have migrated all of the nodes in your clustered ASM environment to the latest software version, you can end the rolling upgrade mode. If a disk goes offline when the ASM instance is in rolling upgrade mode, then the disk remains offline until the rolling upgrade has ended. Also, the timer for dropping the disk is stopped until the ASM cluster is out of rolling upgrade mode. You can also use the same procedure to roll back node upgrades if you encounter problems with the upgrade. The ASM functionality is compatible with the lowest software version that is on any of the nodes in the cluster during an upgrade. The upgrade fails if there are rebalancing operations occurring anywhere in the cluster. You must wait until the rebalance completes before attempting to start a rolling upgrade. In addition, as long as there is one instance active in the cluster, the rolling upgrade state is preserved. If a rolling upgrade is in progress in a clustered ASM environment and if any new ASM instance joins the cluster, then the new ASM instance is notified that the cluster is in rolling upgrade mode.
SELECT SYS_CONTEXT('sys_cluster_properties','cluster_state') FROM DUAL;
To perform the upgrade after your instances restart, you must re-run the commands to restart the rolling upgrade operation. When the rolling upgrade completes, run the following SQL statement:
ALTER SYSTEM STOP ROLLING MIGRATION;
After you run this statement, Oracle performs the following operations:
Validates that all of the members of the cluster are at the same software version. If there are one or more ASM instances that have different versions, then Oracle displays an error and the cluster continues to be in rolling upgrade mode. Updates the cluster-wide state so that the ASM instances are no longer in rolling upgrade mode; the ASM instances begin supporting the full clustered ASM functionality. Rebalance operations that were pending are restarted if the setting for the ASM_POWER_LIMIT parameter enables this.
Note: You must apply the patch to the ASM home before you apply it to the Oracle Database home.
Local connection using operating system authentication Local connection using password authentication Remote connection by way of Oracle Net Services using password authentication
Note: If you create an ASM instance using Database Configuration Assistant (DBCA), or if you create the ASM instance using Database Upgrade Assistant (DBUA), then the user SYS should have SYSASM privileges.
Group
If you do not want to divide system privileges access into separate operating system groups, then you can designate one operating system group as the group whose members are granted access as OSDBA, OSOPER, OSASM, and OSDBA for ASM, and OSOPER for ASM privileges. The default operating system group name for all of these is dba. Whether you create separate operating system privilege groups or use one group to provide operating system authentication for all system privileges, you should use SYSASM to connect to and administer an ASM instance. In Oracle 11g release 1, both SYSASM and SYSDBA are supported privileges; however, if you use the SYSDBA privilege to administer an ASM instance, then Oracle will write warning messages to the alert log, indicating that the SYSDBA privilege is deprecated on an ASM instance for administrative commands. In a future release, the privilege to administer an ASM instance with SYSDBA will be removed. Connecting to an ASM instance as SYSASM grants you full access to all of the available ASM disk groups and management functions.
Use the following statement to connect to an ASM instance with SYSDBA privilege:
sqlplus / AS SYSDBA
Oracle writes messages to the alert log if you issue ASM administrative commands that will be accessible only to the SYSASM privilege in future releases.
If you select the ASM storage option, then DBCA creates a password file for ASM when it initially configures the ASM disk groups. Similar to a database password file, the only user added to the password file when DBCA creates it is SYS. To add other users to the password file, you can use the CREATE USER and GRANT commands. If you configure an ASM instance without using DBCA, then you must manually create a password file and GRANT the SYSASM privilege to user SYS.
Migrating to ASM Best Practices White Papers on Oracle Technology Network (OTN)
The Oracle Maximum Availability Architecture (MAA) Web site provides excellent best practices technical white papers based on different scenarios, such as:
Minimal Downtime Migration to ASM Platform Migration using Transportable Tablespaces Platform Migration using Transportable Database
Assign a unique name to the disk group. Specify the redundancy level of the disk group.
If you want ASM to mirror files, you specify the redundancy level as NORMAL REDUNDANCY (2way mirroring by default for most file types) or HIGH REDUNDANCY (3-way mirroring for all files). You specify EXTERNAL REDUNDANCY if you do not want mirroring by ASM.
Specify the disks as belonging to specific failure groups. Specify the disks that are to be formatted as ASM disks belonging to the disk group. Optionally specify disk group attributes, such software compatibility or allocation unit size.
ASM programmatically determines the size of each disk. If for some reason this is not possible, or if you want to restrict the amount of space used on a disk, you are able to specify a SIZE clause for each disk. ASM creates operating systemindependent names for the disks in a disk group that you can use to reference the disks in other SQL statements. Optionally, you can provide your own name for a disk using the NAME clause. Disk names are available in the V$ASM_DISK view. Note: A disk cannot belong to multiple disk groups. a disk might have failed and was dropped from its disk group. After the disk is repaired, it is no longer part of any disk group, but ASM still recognizes that the disk had been a member of a disk group. You must use the FORCE flag to include the disk in a new disk group. In addition, the disk must be addressable, and the original disk group must not be mounted. Otherwise, the operation fails. Note: Use caution when using the FORCE option to add a previously used disk to a disk group; you might cause another disk group to become unusable. The CREATE DISKGROUP statement mounts the disk group for the first time, and adds the disk group name to the ASM_DISKGROUPS initialization parameter if a server parameter file is being used. If a text initialization parameter file is being used and you want the disk group to be automatically mounted at instance startup, then you must remember to add the disk group name to the ASM_DISKGROUPS initialization parameter before the next time that you shut down and restart the ASM instance.
How to create a disk group? Sql> CREATE DISKGROUP mygrp NORMAL REDUNDENCY DISK /dev/sda6,/dev/sda14, ATTRIBUTE 'au_size'='4M', // Diskgroup created The NAME clause enable you to explicitly assign names to the disks rather than the default systemgenerated names. The system-generated names are in the form diskgroupname_nnnn, where nnnn is the disk number for the disk in the disk group. When creating the disk group, the values of following disk group attributes were explicitly set:
AU_SIZE specifies the size of the allocation unit for the disk group. COMPATIBLE.ASM determines the minimum software version for any ASM 'compatible.asm' = '11.1', 'compatible.rdbms' = '11.1';
instance that uses a disk group COMPATIBLE.RDBMS determines the minimum software version for any database instance that uses a disk group.
Sql> select name,state from v$diskgroup; // mygrp How to drop a disk group? Sql> drop diskgroup mygrp including contents; We can drop diskgroups only when it is in the mount stage. Sql> alter diskgroup mygrp mount; Sql> select name,state from v$diskgroup;