Showing posts with label ASM. Show all posts
Showing posts with label ASM. Show all posts

Friday, 8 June 2018

Interview Q and A for Oracle ASM Part - 4

91. ASM instance is not discovering disks when asm_diskstring is 'ORCL:*'
You have reviewed the previous five points and still the disks are not discovered using the string 'ORCL:*' and only discover the disks if using the native path '/dev/sdX', '/dev/emcpowerxy' or '/dev/oracleasm/disks/XXX'. If you are in 10gR2 this is possible because from this version, Oracle can
execute IO referencing the block device and the devices under /dev/oracleasm/disks are block devices, linked to the physical device.
SOLUTION
We can simulate the disk discovery from the operating system level, using tool kfod. ($ORACLE_HOME/bin). The execution syntax is:
[usupport@jfrac1 bin]$ kfod asm_diskstring='ORCL:*' disks=all
--------------------------------------------------------------------------------
Disk Size Path
================================================================================
1: 954 Mb ORCL:ASMLIB1
2: 955 Mb ORCL:ASMLIB2
--------------------------------------------------------------------------------
ORACLE_SID ORACLE_HOME
================================================================================
+ASM2 /oracle/10gR2/asm
+ASM1 /oracle/10gR2/asm
That is the normal output when executed by oracle user. Sometimes, the command reports (discover) the disks when executed as root. This is an indication of an access problem in one of the files or directories under /opt/oracle. Make sure the permissions are 755 for all the directories and the
files under /opt/oracle.
If after verifying the permissions the disks are still not discovered, it is probably a faulty installation of the oracleasm rpms. The symptoms for this problem are:
The filesystem /dev/oracleasm is mounted
ASMLIB disks can be created using /etc/init.d/oracleasm createdisk command, and the block devices exist under /dev/oracleasm/disks
Commands like /etc/init.d/oracleasm listdisks or /etc/init.d/oracleasm querydisks return the expected results.
The first 5 points referenced in this note have been validated. The rpms are installed, at least what is rpm -qa oracleasm reports. At this point, the recommendation is reinstalling the rpms for ASMLIB. Use the --force flag.

92. ASMLIB disks are bound to the individual path device and not to the pseudo device created by the multipath software.
Multipathing allows to stablish multiple I/O access paths for an individual disk, providing features like load balancing, automatic failover. There is a pseudo device, which is created under /dev and it can be referenced by ASM. Examples are /dev/emcpowerxx (EMC PowerPath), /dev/vpath (IBM
SDD), /dev/md-x (Linux MD), /dev/dm (Linux DM).
ASMLIB disks can be created referencing this pseudo devices when /etc/init.d/oracleasm createdisk is used.
There is a situation during scandisks operation where the ASMLIB is binded to the single/individual path and not to the pseudo device. You can verify this running an ls -l /dev/oracleasm/disks and checking the major,minor numbers of the devices.
[usupport@jfrac1 bin]$ ls -l /dev/oracleasm/disks
total 0
brw-rw---- 1 usupport dba 8, 17 Jul 11 17:08 ASMLIB1
brw-rw---- 1 usupport dba 8, 18 Jul 11 17:08 ASMLIB2
In this particular case, ASMLIB1 is binded to disk identified with major,minor 8,17. File /proc/partitions contains the mapping of the major,minor and the name of the device.
Although some multipath vendors will trap the IO even if the individual path is referenced, it is prefered to bind the ASMLIB disks with the pseudo device created by the multipath layer.
SOLUTION
Modify parameter ORACLEASM_SCANORDER on file /etc/sysconfig/oracleasm and set the string associated with the pseudodevices.
Examples are:
ORACLEASM_SCANORDER=emcpower
ORACLEASM_SCANORDER=dm
ORACLEASM_SCANORDER=vpath
ORACLEASM_SCANORDER=md
If you are running a cluster, make sure to modify the file in all the nodes and restart ASMLIB.

93. ASMLIB Logging
ASMLIB provides additional logging for the following areas:
ENTRY /* func call entry */
EXIT /* func call exit */
DISK /* Disk information */
REQUEST /* I/O requests */
BIO /* bios backing I/O */
IOC /* asm_iocs */
ABI /* ABI entry points */
The settings are recorded in file /proc/fs/oracleasm, where those are the default values:
ENTRY deny
EXIT deny
DISK off
REQUEST off
BIO off
IOC off
ABI off
ERROR allow
NOTICE allow
There are three possible values:
deny
off
allow
To change the values, run this simple command:
echo "DISK allow" > /proc/fs/oracleasm/log_mask
This will change the particular value for the DISK entry without affecting others values. It is recommended to run the command for each change individually or you can use the following shell script:
1.log_mask="/proc/fs/oracleasm/log_mask"
2.echo " ***************** Current values ********************"
3.echo
4.cat $log_mask
5.echo REQUEST > /tmp/logmask.out
6.echo DISK >> /tmp/logmask.out
7. cat /tmp/logmask.out | (
8. while read bit status; do
9. # $1 is "allow" or "off
10. echo "$bit $1" > $log_mask
11. done
12. )
13.echo
14.echo "****************** New Values ***********************"
15.cat $log_mask
and execute sh x.sh <new value>.
Ex: x.sh allow
Setting the value to off will disable the extra logging.
This changes does not require restarting ASMLIB or restarting ASM Instance.

94. What is the default memory allocation for ASM?

In 10g the default SGA size is 1G in 11g it is set to 256M and in 12c ASM it is set back to 1G.

95. How do your backup ASM Metadata?

You can use md_backup to restore the ASM diskgroup configuration in-case of ASM diskgroup storage loss.

96. What files can be stored in the ASM diskgroup?

In 11g the following files can be stored in ASM diskgroups.
·       Datafiles
·       Redo logfiles
·       Spfiles
In 12c the files below can also new be stored in the ASM Diskgroup
·       Password file

97. What it the ASM POWER_LIMIT?

This is the parameter which controls the number of Allocation units the ASM instance will try to rebalance at any given time. In ASM versions less than 11.2.0.3 the default value is 11 however it has been changed to unlimited in later versions.

98. What are different types of redundancies in ASM & explain?
External redundancy,
Normal redundancy,
High redundancy.

99. What is stripping and mirroring.
Striping is spreading data across multiple disks so that IO is spread across multiple disks and hence increase in throughput. It provides read/write performance but fail over support.
ASM offers two types of striping, with the choice depending on the type of database file. Coarse striping uses a stripe size of 1MB, and you can use coarse striping for every file in your database, except for the control files, online redo log files, and flashback files. Fine striping uses a stripe size of 128KB. You can use fine striping for control files, online redo log files, and flashback files.
 Mirroring means redundancy. It may add performance benefit for read operations but overhead for write operations. It's basic purpose is to provide fail over support.
There are three ASM mirroring options:

High Redundancy - In this configuration, for each primary extent, there are two mirrored extents. For Oracle Database Appliance this means, during normal operations there would be three extents (one primary and two secondary) containing the same data, thus providing “high” level of protection. Since ASM distributes the partnering extents in a way that prevents all extents to be unable due to a component failure in the IO path, this configuration can sustain at least two simultaneous disk failures on Oracle Database Appliance (which should be rare but is possible).
Normal Redundancy - In this configuration, for each primary extent, there is one mirrored (secondary) extent. This configuration protects against at least one disk failure. Note that in the event a disk fails in this configuration, although there is typically no outage or data loss, the system operates in a vulnerable state, should a second disk fail while the old failed disk replacement has not completed. Many Oracle Database Appliance customers thus prefer the High Redundancy configuration to mitigate the lack of additional protection during this time.
External Redundancy - In this configuration there are only primary extents and no mirrored extents. This option is typically used in traditional non-appliance environments when the storage sub-system may have existing redundancy such as hardware mirroring or other types of third-party mirroring in place. Oracle Database Appliance does not support External Redundancy.

100. How does ASM provides Redundancy?
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 - 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.
High for 3-way mirroring. In this case the extent is mirrored across 3 disks.
External to not use ASM mirroring. This is used if you are using Third party Redundancy mechanism like RAID, Storage arrays.

101. Can ASM instance and database (rdbms) be on different servers?
ASM instance and Database (rdbms) have to be present on same server. Otherwise it will not work.

102. Can we see the files stored in the ASM instance using standard unix commands.
No, you cannot see the files using standard unix commands like ls. You need to use utility called asmcmd to do this. This is present in 10.2 and above.e.g
/home/oracle>asmcmd
Asmcmd>
You can use help command to see the options.

103. What is SYSASM role?
Starting from Oracle 11g, SYSASM role can be used to administer the ASM instances. You can continue using SYSDBA role to connect to ASM but it will generate following warning messages at time of startup/shutdown, create Diskgroup/add disk ,etc
<span style="font-size: small; font-family: arial,helvetica,sans-serif;">Alert entry
WARNING: Deprecated privilege SYSDBA for command 'STARTUP'</span>

Starting from Oracle 11g, SYSASM role can be used to administer the ASM instances. You can continue using SYSDBA role to connect to ASM but it will generate following warning messages at time of startup/shutdown, create Diskgroup/add disk, etc
Alert entry
WARNING: Deprecated privilege SYSDBA for command 'STARTUP'

104. Is it mandatory to use disks of same size and characteristics for Diskgroups?
No, it is not mandatory to use the disks of same size and characteristics for Diskgroups though it is a Recommended Practice.
Same size disk for Failuregroups in Normal/High redundancy will prevent issues like ORA-15041 as the file extents needs to be mirrored across the disks. Also as Oracle distributes data based on capacity, so larger disk will have more data stored in it and which will result in higher I/O to disk and eventually can lead to sub-optimal performance.
Moreover having disks of different characteristic like varying disk speed can impact the performance.
When managing disks with different size and performance capabilities, best practice is to group them into disk groups according to their characteristics. So you can use higher speed disks for your database files while other disks can be part of Diskgroup used for Flash Recovery Area.

105. Do we need to install ASM and Oracle Database Software in different ORACLE_HOME?
No. Again installing ASM and Oracle Database Software in different ORACLE_HOME is not mandatory but a best practice. This is useful in cases when we need to have multiple databases using same ASM instance and you need to patch only one of them. E.g You need to apply a CBO patch to one of 10.2 database while your other 10.1 database using different installation does not require it. In this case having a ASM_HOME separate from 10.2 ORACLE_HOME will allow your 10.1 database to keep running. Thus this approach is useful for High Availability.

105. What is the maximum size of Disk supported by ASM?
ASM supports disks upto 2Tb, so you need to ensure that lun size should be less then 2Tb. 10.2.0.4 and 11g database will give error if you try to create a diskgroup with ASM disks having disk size >2Tb.

106. I have created Oracle database using DBCA and having a different home for ASM and Oracle Database. I see that listener is running from ASM_HOME. Is it correct?
This is fine. When using different home for ASM, you need to run the listener from ASM_HOME instead of ORACLE_HOME.

107. How do we identify if we are connected to Normal Instance or ASM instance?
Issue following command to identify this
SQL> show parameter instance_type
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_type string asm
In case you are connected to ASM instance, it will display value as asm, otherwise it will display value as RDBMS.

108. Can we change the Redundancy for Diskgroup after its creation?
No, we cannot modify the redundancy for Diskgroup once it has been created. To alter it we will be required to create a new Diskgroup and move the files to it. This can also be done by restoring full backup on the new Diskgroup. Following metalink note describes the steps
Note.438580.1 – How To Move The Database To Different Diskgroup (Change Diskgroup  Redundancy)


109. Can we use ASM for storing Voting Disk/OCR in a RAC instance?
In oracle 11gR1 and below, you cannot use ASM for storing the voting disk and OCR. It is due to the fact that Clusterware starts before ASM instance and it should be able to access these files which is not possible if you are storing it on ASM. You will have to use raw devices or OCFS or any other shared storage.
In Oracle 11gR2 we can store them in ASM.

110. Does ASM instance automatically rebalances and takes care of hot spots?
No. This is a myth and ASM does not do it. It will initiate automatic rebalance only when a new disk is added to Diskgroup or we drop a disk from existing Diskgroup.

111. Can we use block devices for ASM Disks?
Yes. Starting from Oracle Database 10.2 block devices can be used directly for ASM Disks in Linux. This is not true for other Unix based systems where block devices are not supported yet.
Along with this it is recommended to use a Device mapping functionality so that disk mapping is preserved after disk failure. This is important when you have devices as /dev/sda,/dev/sdb,/dev/sdc and due to some reason the devices are not detected at next reboot (say /dev/sdb), the system will map the incorrect device (i.e /dev/sdc will be marked as /dev/sdb). You can use following methods for preserving disk names
-udev – the role of udev is to provide device persistency and naming consistency.This is especially important for the Oracle Cluster Registry (OCR) and Voting disks required by Oracle Clusterware.
-ASMLIB – ASMLIB will provide device management specifically for ASM disk devices.

 112. Describe about ASM architecture.
Automatic Storage Management (ASM) instance
Instance that manages the diskgroup metadata
Disk Groups
Logcal grouping of disks
Determines file mirroring options
ASM Disks
LUNs presented to ASM
ASM Files
Files that are stored in ASM disk groups are called ASM files, this includes database files
Notes:
Many databases can connect as clients to single ASM instances
ASM instance name should only be +ASM only

One diskgroup can serve many databases

Interview Q and A for Oracle ASM Part - 3

61. How do you stop an Oracle ASM Instance?
Ensure that the ORACLE_SID environment variable is set to the Oracle ASM SID and run SHUTDOWN command in SQL*Plus.
IMPORTANT : If Oracle Cluster Registry (OCR) or voting files are stored in a disk group, the disk group can only be dismounted by shutting down the Oracle ASM instance as part of shutting down the clusterware on a node. To shut down the clusterware, run crsctl stop crs.

62. What will happen if the version of ASM is different than database ? (take both scenarios : higher and lower)
Oracle Automatic Storage Management (Oracle ASM) in Oracle Database 11g Release 2 (11.2) supports 11g Release 2 (11.2) or older software versions of Oracle database instances, including Oracle Database 10g. BUT it is not true vice versa ..
An Oracle ASM instance must be at 11g Release 2 (11.2) to support an 11g Release 2 (11.2) Oracle Database.
Also , When using different software versions, the database instance supports Oracle ASM functionality of the earliest release in use. For example, a 10.1 database instance operating with an 11.2 Oracle ASM instance supports only Oracle ASM 10.1 features.

63. How many Oracle ASM instance are supported on a server?
Only one Oracle ASM instance is supported on a server.

64. Can an ASM file be contained in more than one disk groups ?
No, Any Oracle ASM file is completely contained within a single disk group. However, a disk group might contain files belonging to several databases and a single database can use files from multiple disk groups.

65. What are various ASM redundancy levels?
The redundancy level controls how many disk failures are tolerated without dismounting the disk group or losing data. When you create a disk group, you specify an Oracle ASM disk group type based on one of the following three redundancy levels:
1) Normal for 2-way mirroring
2) High for 3-way mirroring
3) External to not use Oracle ASM mirroring, such as when you configure hardware RAID for redundancy

66. Why it is advised that different Oracle ASM disks should not share the same physical drive?
Oracle ASM spreads the files proportionally 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 Oracle ASM load balances among all of the disks in a disk group, different Oracle ASM disks should not share the same physical drive.

67. What are ‘Extents’ in context of Asm?
The contents of Oracle ASM files are stored in a disk group as a set, or collection, of 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, Oracle ASM uses variable size extents. The initial extent size equals the disk group allocation unit size and it increases by a factor of 4 or 16 at predefined thresholds. ( for a file extent is same as AU till 20000 extent ; 4*AU size for the next 20000 extent sets (20000 – 39999); 16*AU size for the next 20000 and higher extent sets (40000+))

68. What are general recommendations for ASM Storage Preparation?
Following are the basic guidelines for preparing storage for use with Oracle ASM:
·        Configure two disk groups, one for data and the other for the fast recovery area.
  • A minimum of four LUNs (Oracle ASM disks) of equal size and performance is recommended for each disk group.
  • Ensure that all Oracle ASM disks in a disk group have similar storage performance and availability characteristics.
  • Ensure that Oracle ASM disks in a disk group have the same capacity to maintain balance as Oracle ASM data distribution policy is capacity-based.
  • Create external redundancy disk groups when using high-end storage arrays.
  • For Linux, use the Oracle ASMLib feature to provide consistent device naming and permission persistency.
  • Choose a hardware RAID stripe size that is a power of 2 and less than or equal to the size of the Oracle ASM allocation unit.

69. How do you Start Up an Oracle ASM Instance?
Starting an Oracle ASM instance is similar to the way in which you start an Oracle database instance
  • set the ORACLE_SID environment variable to the Oracle ASM system identifier (SID). (for a single-instance database is +ASM, and the default SID for Oracle ASM for an Oracle RAC node is +ASMnode_number where node_number is the number of the node.)
  • initialization parameter file must contain the entry: INSTANCE_TYPE = ASM
  • remember that ASM instance doesn’t mount a database but mount Oracle ASM disk groups.
  • The associated Oracle database instance does not have to be running when you start the associated Oracle ASM instance
  • STARTUP FORCE will issue a SHUTDOWN ABORT to the Oracle ASM instance before restarting it.
  • STARTUP MOUNT or OPEN : Mounts the disk groups specified in the ASM_DISKGROUPS initialization parameter. This is the default if no command parameter is specified.
  • STARTUP NOMOUNT : Starts up the Oracle ASM instance without mounting any disk groups.
  • STARTUP RESTRICT : Starts up an instance in restricted mode that enables access only to users with both the CREATE SESSION and RESTRICTED SESSION system privileges. You can use the RESTRICT clause in combination with the MOUNT, NOMOUNT, and OPEN clauses.In restricted mode, database instances cannot use the disk groups.
  • STARTUP PFILE=<pfile_path> can also be used if you want to start with pfile instead of spfile

70. How to find out the databases, which are using the ASM instance?
ASMCMD>lsct
SQL> select DB_NAME from V$ASM_CLIENT;

71. What is Oracle Restart?
Oracle Restart improves the availability of Oracle database. Oracle Restart runs out of the Oracle Grid Infrastructure home. Oracle Restart provides managed startup and restart of a single-instance (non-clustered) Oracle Database, Oracle ASM instance, service, listener, and any other process running on the server. If an interruption of a service occurs after a hardware or software failure, Oracle Restart automatically takes the necessary steps to restart the component.
You need to add a component, such as an Oracle ASM instance, to Oracle Restart and enable the protection for using this feature.

72. What is Kfed?
kfed is a utility which can be used to view the ASM Disk information. Syntax for using it is
         kfed read devicename

73.  Can we use BCV to clone the ASM Diskgroup on same host?
Diskgroup Cloning is not supported on the same host using BCV. You have no other option to use except RMAN DUPLICATE. You can find more detail on BCV and ASM in below whitepaper

74. How can we copy the files from/to ASM?
You can use RMAN or DBMS_FILE_TRANSFER.COPY_FILE procedure to copy the files to/from ASM from/to Filesystem. Starting from Oracle 11g, you can use cp command in asmcmd to perform the same between ASM Diskgroups and also to OS Filesystem.

75. Can we edit the ASM Disk header to change the Diskgroup Name?
No. This cannot be done.

76. What is ASMLIB?
ASMLIB is the support library for the ASM. ASMLIB allows an Oracle database using ASM more efficient and capable access to diskgroups. The purpose of ASMLIB, is to provide an alternative interface to identify and access block devices. Additionally, the ASMLIB API enables storage and operating system vendors to supply extended storage-related features. You can read more about ASMLIB in
Note: 359266.1 – FAQ ASMLIB CONFIGURE, VERIFY, TROUBLESHOOT
ASMLIB has following benefits:
• Simplified disk discovery
• Persistent disk names
• Efficient use of system resources
o Reduced Overhead

77. I am unable to open the ASM instance. What is the reason?
ASM instance does not have open stage. It has got only two options
  • Nomount- This starts the ASM instance
  • Mount- At this stage, Diskgroup defined in ASM_DISKGROUPS parameter are mounted
When you try to open the ASM instance , you get error
<span style="font-size: small; font-family: arial,helvetica,sans-serif;">SQL&gt; alter database open;
alter database open
*
ERROR at line 1:
ORA-15000: command disallowed by current instance type</span>

78. Can ASM be used as replacement for RAID?
ASM is supposed to stripe the data and also mirror the data (if Using Normal, High Redundancy). So this can be used as a alternative for RAID 0+1 solutions

79. Is it possible to do rolling upgrades on ASMLIB in a RAC configuration
ASMLIB is independent of Oracle Clusterware and Oracle Database, and thus can be upgraded on its own Upgrading ASMLIB one a given node will require that ASMLIB be disabled/stop, will require the database and ASM to also be shutdown on that node. Once the ASMLIB is upgarded then the stack can be restarted.

80. Can DBMS_FILE_TRANSFER be used to upload text files into ASM ?
This is not possible because DBMS_FILE_TRANSFER can be used for Archive logs, RMAN backups, datafile copies, spfiles, DataGuard configuration files, change tracking file, flashback logs, cross platform transportable tablespaces, and datapump files.
Oracle Binaries, trace files and other OS files cannot be stored on ASM diskgroups.

81. Can External Tables Be Placed inside ASM diskgroups?  
ASM cannot store external tables in ASM diskgroups since external tables are flat ASCII files which are not a file type supported in ASM, therefore external tables must be allocated on regular filesystem files.

82. Can you create a second voting disk in a different ASM diskgroup when using External Redundancy in 11.2?
You cannot create more than 1 voting disk in the same or on another/different diskgroup disk when using External Redundancy in 11.2. The rules are as follows:
External = 1 voting disk
Normal= 3 voting disk
High= 5 voting disk

83. Is it possible to create disk at single-path device, then reconfigure disc-array to multipath and still use this asm-disk?
yes. ASM will scan the disks based on the parameter asm_diskstring and the permissions. When the disk is scanned and the data is found, it does not matter the path or the major,minor numbers.
ASM does not change anything in the metadata when using different paths.
There is a discovery phase when starting up the ASM instance based on the ASM_DISKSTRING parameter. There is nothing in the dictionary.
All the needed information is located in the disk header and so it doesn't care to the device name.
This is also the reason why you must take care to avoid to have the same device twice visible with
different names, because from ASM point of view this will be duplicate disks.

84. Whether the failover of ASM based instance using HA-Agent like VCS/SG is supported or not.
At the moment, single instance Oracle databases using ASM cannot be failed over. That's because when a database instance is halted, and the ASM disk groups are dropped, ASM processes still keep some file descriptors to the ASM disk groups open.
First of all if a 3rd party clusterware controls applications running on a server (including ASM instance, db instance, listener, ...) these applications are not required to support this setup in any way. And in fact ASM does not 'support' HA clusters in any meaning of that word.
The best way to solve this problem is to run ASM instances as a cluster all the time on all nodes. All the ASM instances mount all the diskgroups.The databases can fail over to another node and access the same files via the local ASM instance. This does not require a RAC license even though ASM is using
Oracle clusterware.

85. can we execute add disk & drop disk statements in one operation, in that way only one rebalance operation will be started as
SQL> alter diskgroup<diskgroup name>
add disk '<new device physical name 1>', .., '<new device physical name N>'
drop disk <old disk logical name 1>, <old disk logical name 2>, ..,<old disk logical name N>
rebalance power <#>;
This is more efficient than separated commands (add disk & drop disk statements).

86. ASMLIB INSTALLATION
ASMLIB is distributed as Linux RPMs which are specific for the different Linux distributions based on:
- Linux distribution (RedHat 2.1, 3.0, 4.0, 5.0 or Suse Enterprise Server 8,9,10)
- Linux Kernel. (smp, highmem, or release)
- Type of CPUs: AMD64, Intel 64, Itanium 64bits, Intel 32 bits.
To verify the RPM installed execute rpm -qa |grep oracleasm.
$ rpm -qa |grep oracleasm
oracleasm-support-2.0.4-1.el5
oracleasm-2.6.18-53.el5-2.0.4-1.el5
oracleasmlib-2.0.3-1.el5
The following syntax will print at the end of the file, the platform:
$rpm -qa --qf "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm\n" | grep asm
oracleasm-support-2.0.4-1.el5.x86_64.rpm
oracleasm-2.6.18-53.el5-2.0.4-1.el5.x86_64.rpm
oracleasmlib-2.0.3-1.el5.x86_64.rpm
As mentioned before, this set of files is different for each platform, but once you have selected the correct set, files oracleasm-support and oracleasmlib are identical for all the possible kernels (smp,highmem,etc). Only the third RPM is unique to the kernel release installed, which is obtained executing command uname -a or uname -r
$ uname -a
Linux jfrac1.us.oracle.com 2.6.18-53.el5 #1 SMP Sat Nov 10 19:37:22 EST 2007 x86_64
In this example using RedHat 5.0 for 64bits on Intel processors, checking the files in ASMLIB download page,
notice there are four different kernels :
oracleasm-2.6.18-53.el5xen-2.0.4-1.el5.x86_64.rpm
oracleasm-2.6.18-53.el5debug-2.0.4-1.el5.x86_64.rpm
oracleasm-2.6.18-53.el5-2.0.4-1.el5.x86_64.rpm
Downloading the correct RPM is required and for this kernel, it will be oracleasm-2.6.18-53.el5-2.0.4-1.el5.x86_64.rpm. The installation of an incorrect RPM will produce different errors, during the configuration of ASMLIB or later during the discovery of the disks.
* Is /dev/oracleasm created
When ASMLIB is configured, a special filesystem is created and mounted: /dev/oracleasm.
$ df -ha
Filesystem Size Used Avail Use% Mounted on
/dev/hdc2 13G 11G 1.9G 85% /
none 0 0 0 - /proc
none 0 0 0 - /dev/pts
usbdevfs 0 0 0 - /proc/bus/usb
/dev/hdc1 101M 14M 81M 15% /boot
none 250M 0 250M 0% /dev/shm
/dev/sda1 8.4G 4.8G 3.2G 60% /oradata2
/dev/sde1 8.3G 6.6G 1.4G 84% /oradata3
oracleasmfs 0 0 0 - /dev/oracleasm
When command oracleasm createdisk is executed, a block device is created under /dev/oracleasm/disks. This is the device discovered by ASMLIB using the string ORCL:*.
brw-rw---- 1 usupport dba 8, 33 Feb 23 10:54 VOL1
* Checking if ASMLIB was installed properly:
[root@arlnx2 asm_tar]# /etc/init.d/oracleasm status
Checking if ASM is loaded: [ OK ]
Checking if /dev/oracleasm is mounted: [ OK ]
If the command fails, use strace and generate a log file:
strace -f -o asm_status.out /etc/init.d/oracleasm status
* Listing the ASMLIB disks:
/etc/init.d/oracleasm listdisks
TESTX
VOL1
You will find an entry under /dev/oracleasm/disks. This is the block device associated to the physical device. If the file exist the command will return information, but if not, please execute:
strace -f -o asm_listd.out /etc/init.d/oracleasm listdisks.

87. Error Device "/dev/sdg" is not a partition when creating the ASMLIB device
This problem is reported during the creation of the ASMLIB device:
[root@arlnx2 asm_tar]# /etc/init.d/oracleasm createdisk mydisk /dev/sdg
Marking disk "/dev/sdg" as an ASM disk: asmtool: Device "/dev/sdg" is not a partition [FAILED]
The message indicates the disk is not a partition and ASMLIB requires the disk has at least one partition.
How to check this: using command fdisk -l <device name>
Example:
[root@arlnx2 asm_tar]# /sbin/fdisk -l /dev/sdg
Disk /dev/sdg: 9105 MB, 9105018880 bytes
64 heads, 32 sectors/track, 8683 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdg1 1 2862 2930672 83 Linux
The command shows disk /dev/sdg having one partition /dev/sdg1 and this is the device that should be referenced on command oracleasm createdisk. If you still have problems, then use strace:
# strace -f -o asm_create.out /etc/init.d/oracleasm createdisk <disk name> <physical disk>

88. How to identify the physical disk bound to the ASMLIB disk.
Use /etc/init.d/oracleasm querydisk <NAME> where NAME is any name under /dev/oracleasm/disks.
Example:
[root@arlnx2 asm_tar]# /etc/init.d/oracleasm querydisk -d VOL1
Disk "VOL1" is a valid ASM disk on device [8, 33]
The command reports the device identified with major,minor numbers which are unique numbers associated to each disk. File /proc/partitions can be used to find the name of the device associated with those numbers:
major minor #blocks name rio rmerge rsect ruse wio wmerge wsect wuse running use aveq
8 0 8891620 sda 39715 78016 941080 417000 156198 242472 3189752 214180 0 420630 631180
8 1 8891376 sda1 39691 77970 940922 416780 156198 242472 3189752 214180 0 420410 630960
8 16 8891620 sdb 87 250 803 740 0 0 0 0 0 740 740
8 17 8891376 sdb1 57 193 632 480 0 0 0 0 0 480 480
8 32 17783250 sdc 745 2993 8321 8300 0 0 0 0 0 5250 8300
8 33 977904 sdc1 87 139 644 1040 0 0 0 0 0 1040 1040
8 34 977920 sdc2 35 193 456 230 0 0 0 0 0 230 230
8 35 1 sdc3 4 0 8 40 0 0 0 0 0 40 40
8 37 977904 sdc5 57 193 632 1240 0 0 0 0 0 1240 1240
8 38 977904 sdc6 57 193 632 1170 0 0 0 0 0 1170 1170
Also connected as root you can run the same command but referencing the physical device:
[root@arlnx2 dbs]# /etc/init.d/oracleasm querydisk /dev/sdc1
Disk "/dev/sdc1" is marked an ASM disk with the label "VOL1"
Any error on this command will require using strace:
strace -f -o asm_query.out /etc/init.d/oracleasm querydisk <NAME>.

89. ASM disks are not discovered when using asm_diskstring='ORCL:*'
In 10gR2 if the disks are not discovered using string ORCL:*, the alternative is using /dev/oracleasm/disks. This could be set in parameter asm_diskstring or using this path in the DDL statement when creating a diskgroup or adding a disk. This is possible because in this release Oracle
can open directly the block device. 10.1 requires binding the block device to the character device known as /dev/raw/rawX.
Notice the output of ls -l /dev/oracleasm/disks
[root@arlnx2 asm_tar]# ls -l /dev/oracleasm/disks
total 0
brw-rw---- 1 usupport dba 7, 1 Feb 20 13:30 TESTX
brw-rw---- 1 usupport dba 8, 33 Feb 17 09:41 VOL1
The b at the beginning indicates this is a block device. When referencing /dev/oracleasm/disks/VOL1 there is not ASMLIB used as we are accessing
directly the block device. Using /dev/sdg1 or /dev/oracleasm/disks/VOL1 is exactly the same.
This situation could affect environments where ASM is using 10.2 but there are databases using 10.1 and 10.2. Databases using 10.2 can use the diskgroup but 10.1 will fail when a file is created. Example: creating a tablespace will fails with error ora-600:
ORA-00600: internal error code, arguments: [kfioSubmitIO07], [], [], [], [], [], [], []
CallStack:
kgeasnmierr kfioSubmitIO kfioRequest ksfd_osmcrt ksfd_create ksfdcre kcfcedtf tbsafl ctsdrv1 ctsdrv.
kfioSubmitIO is trying to obtain the extent map of the disks associated to the diskgroup but can not identify the disk. The reason is because 10.1 can
not reference directly the block device /dev/oracleasm/disks/.
* How to diagnose why ORCL:* is not working: Use /usr/sbin/oracleasm-discover 'ORCL:*'.
When ORCL:* is resolved, the following output is presented:
[root@arlnx2 asm_tar]# /usr/sbin/oracleasm-discover 'ORCL:*'
Using ASMLib from /opt/oracle/extapi/32/asm/orcl/1/libasm.so
[ASM Library - Generic Linux, version 2.0.0 (KABI_V1)]
Discovered disk: ORCL:TESTX [819200 blocks (419430400 bytes), maxio 128]
Discovered disk: ORCL:VOL1 [1955808 blocks (1001373696 bytes), maxio 128]
If something is wrong, you could get error Unable to open ASMLib. Use strace to debug the command:
strace -f -o asm_discover.out /usr/sbin/oracleasm-discover 'ORCL:*'
Check for the reference to library libasm.so.
open("/opt/oracle/extapi/32/asm/orcl/1/libasm.so", O_RDONLY) = 3.
If you get open("/opt/oracle/extapi/32/asm/orcl/1/libasm.so", O_RDONLY) = -1 EACCES (Permission denied), then that is the cause of the problem.
Check if the library exists or if the permissions are correct: 755. Also validate that the directories in the path also have the correct permissions (755).

90. Starting ASM instance report errors ORA-604, ORA-15183, ORA-15180 after deleting file libasm.so
When all the files under /opt/oracle/extapi path are deleted, if ASMLIB is used, when mounting diskgroups, following errors will be reported:
ORA-00604 : error occurred at recursive SQL level 2
ORA-15183 : ASMLIB initialization error [/opt/oracle/extapi/64/asm/orcl/1/libasm.so]
ORA-15180 : Could not open dynamic library /opt/oracle/extapi/64/asm/orcl/1/libasm.so, error
This set of directories and files are created during the installation of the ASMLIB rpms, particularly oracleasmlib-*. The diskgroups can not be mounted because there are not ASMLIB devices available.
During the installation, the following directories and files are created:
/opt/oracle/extapi
/opt/oracle/extapi/32
/opt/oracle/extapi/32/asm
/opt/oracle/extapi/32/asm/orcl
/opt/oracle/extapi/32/asm/orcl/1
/opt/oracle/extapi/32/asm/orcl/1/libasm.so
For 64bit platforms the 32 directory will be renamed by 64 directory. You can verify the existence of these elements executing command find
/opt/oracle/extapi
Also executing /usr/sbin/oracleasm-discover (strace -f -o asm_discover.out /usr/sbin/oracleasm-discover 'ORCL:*'), will report errors when trying to read the missing directories/files.
In order to create this objects, oracleasmlib-* rpm needs to be reinstalled, first deleting from disk the rpm image.
For example, in this environment those are the rpms installed:
[usupport@arlnx2 admin]$ rpm -qa |grep oracleasm
oracleasm-support-2.0.0-1
oracleasmlib-2.0.0-1
oracleasm-2.4.21-EL-1.0.0-1
oracleasm-2.4.21-27.0.4.EL-1.0.4-2
To remove the rpm as root execute: rpm -e oracleasmlib-2.0.0-1
To reinstall the rpm as root execute: rpm -Uvh oracleasmlib-2.0.0-1
Note: Use --force flags to reinstall the rpms if the normal flags Uvh don't work.
Due to Unpublished BUG:9824267 you can get this:
ORA-15183: ASMLIB initialization error [driver/agent not installed]
WARNING: FAILED to load library: /opt/oracle/extapi/64/asm/orcl/1/libasm.so

if you have asmlib rpms installed but not configured. Even if your asm discovery string contains NO asmlib components.