Friday, December 19, 2014

Error while setting up dataguard RMAN-03015: error occurred in stored script Memory Script

Starting backup at 19-DEC-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=67 instance=RAC1 device type=DISK
RMAN-03009: failure of backup command on ORA_DISK_1 channel
ORA-19505: failed to identify file "/u01/app/oracle/product/11.2.0/db_1/dbs/orapwRAC2"
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
continuing other job steps, job failed will not be re-run
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script


This was fixed by setting up the tnsnames with SID on all primary and dr nodes

error while setting up dataguard ORA-17628: Oracle error 19505 returned by remote Oracle server

[oracle@rac1 ~]$ 
[oracle@rac1 ~]$ rman target sys/***@rac auxiliary sys/***@rac_stby

Recovery Manager: Release 11.0.2.0 - Production

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: RAC (DBID=2454459401)
connected to auxiliary database: RAC (not mounted)

RMAN> DUPLICATE TARGET DATABASE
2> FOR STANDBY
3> FROM ACTIVE DATABASE
4> DORECOVER
5> SPFILE
6> set audit_file_dest='/u01/app/oracle/admin/rac_stby/adump' 
7> SET db_unique_name='RAC_STBY' COMMENT 'Is standby'
8> SET LOG_ARCHIVE_DEST_2='SERVICE=RAC ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=RAC'
9> SET FAL_SERVER='RAC' COMMENT 'Is primary'
10> SET instance_number='1'
11> NOFILENAMECHECK;

Starting Duplicate Db at 19-DEC-14
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=1 device type=DISK

contents of Memory Script:
{
   backup as copy reuse
   targetfile  '/u01/app/oracle/product/11.0.2/db_1/dbs/orapwRAC2' auxiliary format 
 '/u01/app/oracle/product/11.0.2/db_1/dbs/orapwRAC_STBY1'   targetfile 
 '+DATA/rac/spfilerac.ora' auxiliary format 
 '/u01/app/oracle/product/11.0.2/db_1/dbs/spfileRAC_STBY1.ora'   ;
   sql clone "alter system set spfile= ''/u01/app/oracle/product/11.0.2/db_1/dbs/spfileRAC_STBY1.ora''";
}
executing Memory Script

Starting backup at 19-DEC-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=89 instance=RAC2 device type=DISK
Finished backup at 19-DEC-14

sql statement: alter system set spfile= ''/u01/app/oracle/product/11.0.2/db_1/dbs/spfileRAC_STBY1.ora''

contents of Memory Script:
{
   sql clone "alter system set  audit_file_dest = 
 ''/u01/app/oracle/admin/rac_stby/adump'' comment=
 '''' scope=spfile";
   sql clone "alter system set  db_unique_name = 
 ''RAC_STBY'' comment=
 ''Is standby'' scope=spfile";
   sql clone "alter system set  LOG_ARCHIVE_DEST_2 = 
 ''SERVICE=RAC ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=RAC'' comment=
 '''' scope=spfile";
   sql clone "alter system set  FAL_SERVER = 
 ''RAC'' comment=
 ''Is primary'' scope=spfile";
   sql clone "alter system set  instance_number = 
 1 comment=
 '''' scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

sql statement: alter system set  audit_file_dest =  ''/u01/app/oracle/admin/rac_stby/adump'' comment= '''' scope=spfile

sql statement: alter system set  db_unique_name =  ''RAC_STBY'' comment= ''Is standby'' scope=spfile

sql statement: alter system set  LOG_ARCHIVE_DEST_2 =  ''SERVICE=RAC ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=RAC'' comment= '''' scope=spfile

sql statement: alter system set  FAL_SERVER =  ''RAC'' comment= ''Is primary'' scope=spfile

sql statement: alter system set  instance_number =  1 comment= '''' scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1519898624 bytes

Fixed Size                     2253464 bytes
Variable Size                503319912 bytes
Database Buffers            1006632960 bytes
Redo Buffers                   7692288 bytes

contents of Memory Script:
{
   sql clone "alter system set  control_files = 
  ''+DATA/rac_stby/controlfile/current.264.866720455'' comment=
 ''Set by RMAN'' scope=spfile";
   backup as copy current controlfile for standby auxiliary format  '+DATA/rac_stby/controlfile/current.265.866720457';
   sql clone "alter system set  control_files = 
  ''+DATA/rac_stby/controlfile/current.265.866720457'' comment=
 ''Set by RMAN'' scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

sql statement: alter system set  control_files =   ''+DATA/rac_stby/controlfile/current.264.866720455'' comment= ''Set by RMAN'' scope=spfile

Starting backup at 19-DEC-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying standby control file
output file name=/u01/app/oracle/product/11.0.2/db_1/dbs/snapcf_RAC2.f tag=TAG20141219T114058 RECID=3 STAMP=866720462
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
Finished backup at 19-DEC-14

sql statement: alter system set  control_files =   ''+DATA/rac_stby/controlfile/current.265.866720457'' comment= ''Set by RMAN'' scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1519898624 bytes

Fixed Size                     2253464 bytes
Variable Size                503319912 bytes
Database Buffers            1006632960 bytes
Redo Buffers                   7692288 bytes

contents of Memory Script:
{
   sql clone 'alter database mount standby database';
}
executing Memory Script

sql statement: alter database mount standby database
RMAN-05538: WARNING: implicitly using DB_FILE_NAME_CONVERT
RMAN-05529: WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed to disk group only.
Using previous duplicated file +DATA/rac_stby/datafile/system.258.866718017 for datafile 1 with checkpoint SCN of 1984814
Using previous duplicated file +DATA/rac_stby/datafile/sysaux.259.866718099 for datafile 2 with checkpoint SCN of 1985693
Using previous duplicated file +DATA/rac_stby/datafile/undotbs1.261.866718223 for datafile 3 with checkpoint SCN of 1986178
Using previous duplicated file +DATA/rac_stby/datafile/users.263.866718257 for datafile 4 with checkpoint SCN of 1986512
Using previous duplicated file +DATA/rac_stby/datafile/example.260.866718177 for datafile 5 with checkpoint SCN of 1985968
Using previous duplicated file +DATA/rac_stby/datafile/undotbs2.262.866718247 for datafile 6 with checkpoint SCN of 1986472

contents of Memory Script:
{
   set newname for tempfile  1 to 
 "+data";
   switch clone tempfile all;
   set newname for datafile  1 to 
 "+DATA/rac_stby/datafile/system.258.866718017";
   set newname for datafile  2 to 
 "+DATA/rac_stby/datafile/sysaux.259.866718099";
   set newname for datafile  3 to 
 "+DATA/rac_stby/datafile/undotbs1.261.866718223";
   set newname for datafile  4 to 
 "+DATA/rac_stby/datafile/users.263.866718257";
   set newname for datafile  5 to 
 "+DATA/rac_stby/datafile/example.260.866718177";
   set newname for datafile  6 to 
 "+DATA/rac_stby/datafile/undotbs2.262.866718247";
   sql 'alter system archive log current';
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to +data in control file

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

sql statement: alter system archive log current

contents of Memory Script:
{
   backup as copy reuse
   archivelog like  "+FRA/rac/archivelog/2014_12_19/thread_2_seq_39.326.866719369" auxiliary format 
 "+FRA"   archivelog like 
 "+FRA/rac/archivelog/2014_12_19/thread_1_seq_41.328.866720495" auxiliary format 
 "+FRA"   archivelog like 
 "+FRA/rac/archivelog/2014_12_19/thread_2_seq_38.324.866719365" auxiliary format 
 "+FRA"   archivelog like 
 "+FRA/rac/archivelog/2014_12_19/thread_1_seq_40.327.866719371" auxiliary format 
 "+FRA"   archivelog like 
 "+FRA/rac/archivelog/2014_12_19/thread_2_seq_40.329.866720495" auxiliary format 
 "+FRA"   archivelog like 
 "+FRA/rac/archivelog/2014_12_19/thread_1_seq_39.325.866719367" auxiliary format 
 "+FRA"   archivelog like 
 "+FRA/rac/archivelog/2014_12_19/thread_1_seq_38.322.866718257" auxiliary format 
 "+FRA"   archivelog like 
 "+FRA/rac/archivelog/2014_12_19/thread_2_seq_37.323.866718257" auxiliary format 
 "+FRA"   ;
   catalog clone start with  "+FRA";
   catalog clone datafilecopy  "+DATA/rac_stby/datafile/system.258.866718017", 
 "+DATA/rac_stby/datafile/sysaux.259.866718099", 
 "+DATA/rac_stby/datafile/undotbs1.261.866718223", 
 "+DATA/rac_stby/datafile/users.263.866718257", 
 "+DATA/rac_stby/datafile/example.260.866718177", 
 "+DATA/rac_stby/datafile/undotbs2.262.866718247";
   switch clone datafile  1 to datafilecopy 
 "+DATA/rac_stby/datafile/system.258.866718017";
   switch clone datafile  2 to datafilecopy 
 "+DATA/rac_stby/datafile/sysaux.259.866718099";
   switch clone datafile  3 to datafilecopy 
 "+DATA/rac_stby/datafile/undotbs1.261.866718223";
   switch clone datafile  4 to datafilecopy 
 "+DATA/rac_stby/datafile/users.263.866718257";
   switch clone datafile  5 to datafilecopy 
 "+DATA/rac_stby/datafile/example.260.866718177";
   switch clone datafile  6 to datafilecopy 
 "+DATA/rac_stby/datafile/undotbs2.262.866718247";
}
executing Memory Script

Starting backup at 19-DEC-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log copy
input archived log thread=2 sequence=39 RECID=63 STAMP=866719368
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 12/19/2014
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 12/19/2014
ORA-17628: Oracle error 19505 returned by remote Oracle server

RMAN> 



This was fixed by adding the FRA disk group on DR site.

while setting up dataguard ORA-00245: control file backup failed; target is likely on a local file system

RMAN> DUPLICATE TARGET DATABASE
2> FOR STANDBY
3> FROM ACTIVE DATABASE
4> DORECOVER
5> SPFILE
6> set audit_file_dest='/u01/app/oracle/admin/rac_stby/adump' 
7> SET db_unique_name='RAC_STBY' COMMENT 'Is standby'
8> SET LOG_ARCHIVE_DEST_2='SERVICE=RAC ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=RAC'
9> SET FAL_SERVER='RAC' COMMENT 'Is primary'
10> SET instance_number='1'
11> NOFILENAMECHECK;

Starting Duplicate Db at 19-DEC-14
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=1 device type=DISK

contents of Memory Script:
{
   backup as copy reuse
   targetfile  '/u01/app/oracle/product/11.0.2/db_1/dbs/orapwRAC2' auxiliary format 
 '/u01/app/oracle/product/11.0.2/db_1/dbs/orapwRAC_STBY1'   targetfile 
 '+DATA/rac/spfilerac.ora' auxiliary format 
 '/u01/app/oracle/product/11.0.2/db_1/dbs/spfileRAC_STBY1.ora'   ;
   sql clone "alter system set spfile= ''/u01/app/oracle/product/11.0.2/db_1/dbs/spfileRAC_STBY1.ora''";
}
executing Memory Script

Starting backup at 19-DEC-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=29 instance=RAC2 device type=DISK
Finished backup at 19-DEC-14

sql statement: alter system set spfile= ''/u01/app/oracle/product/11.0.2/db_1/dbs/spfileRAC_STBY1.ora''

contents of Memory Script:
{
   sql clone "alter system set  audit_file_dest = 
 ''/u01/app/oracle/admin/rac_stby/adump'' comment=
 '''' scope=spfile";
   sql clone "alter system set  db_unique_name = 
 ''RAC_STBY'' comment=
 ''Is standby'' scope=spfile";
   sql clone "alter system set  LOG_ARCHIVE_DEST_2 = 
 ''SERVICE=RAC ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=RAC'' comment=
 '''' scope=spfile";
   sql clone "alter system set  FAL_SERVER = 
 ''RAC'' comment=
 ''Is primary'' scope=spfile";
   sql clone "alter system set  instance_number = 
 1 comment=
 '''' scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

sql statement: alter system set  audit_file_dest =  ''/u01/app/oracle/admin/rac_stby/adump'' comment= '''' scope=spfile

sql statement: alter system set  db_unique_name =  ''RAC_STBY'' comment= ''Is standby'' scope=spfile

sql statement: alter system set  LOG_ARCHIVE_DEST_2 =  ''SERVICE=RAC ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=RAC'' comment= '''' scope=spfile

sql statement: alter system set  FAL_SERVER =  ''RAC'' comment= ''Is primary'' scope=spfile

sql statement: alter system set  instance_number =  1 comment= '''' scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1519898624 bytes

Fixed Size                     2253464 bytes
Variable Size                503319912 bytes
Database Buffers            1006632960 bytes
Redo Buffers                   7692288 bytes

contents of Memory Script:
{
   sql clone "alter system set  control_files = 
  ''+DATA/rac_stby/controlfile/current.266.866729111'' comment=
 ''Set by RMAN'' scope=spfile";
   backup as copy current controlfile for standby auxiliary format  '+DATA/rac_stby/controlfile/current.267.866729111';
   sql clone "alter system set  control_files = 
  ''+DATA/rac_stby/controlfile/current.267.866729111'' comment=
 ''Set by RMAN'' scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

sql statement: alter system set  control_files =   ''+DATA/rac_stby/controlfile/current.266.866729111'' comment= ''Set by RMAN'' scope=spfile

Starting backup at 19-DEC-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying standby control file
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 12/19/2014
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 12/19/2014
ORA-00245: control file backup failed; target is likely on a local file system

RMAN> 


********************************

Changed the location of SNAPSHOT CONTROLFILE in RMAN to fix this

RMAN> show all;

RMAN configuration parameters for database with db_unique_name RAC are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.0.2/db_1/dbs/snapcf_RAC2.f'; # default

RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+FRA/snapcf_RAC2.f';

new RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+FRA/snapcf_RAC2.f';
new RMAN configuration parameters are successfully stored

RMAN> show all;

RMAN configuration parameters for database with db_unique_name RAC are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+FRA/snapcf_RAC2.f';

RMAN> 



Thursday, December 18, 2014

Setup Recovery catalog

Setup Recovery catalog
1. Create recovery catalog database
2. Create RMAN tablespace
3. Create RMAN user
4. Grant privilidges to RMAN user
5. Connect to RMAN and create recovery catalog


1. Create recovery catalog database

I suppose you know how to create the database

2. Create RMAN tablespace

SQL> create tablespace RMAN;

Tablespace created.

SQL>


3. Create RMAN user

SQL> create user rman identified by rman default tablespace rman quota unlimited on rman;

User created.

SQL>

4. Grant privilidges to RMAN user

SQL> grant connect, resource, recovery_catalog_owner to rman;

Grant succeeded.

SQL>

5. Connect to RMAN and create recovery catalog

[oracle@rcat1 ~]$ rman catalog rman/rman@rcat

Recovery Manager: Release 11.2 - Production on 

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to recovery catalog database

RMAN> create catalog;

recovery catalog created

RMAN> 


Thursday, December 11, 2014

Loading module "oracleasm": failed

I was able to install oracleasmlib, support and kmod but even then when I was trying to initialize the oracleasm init it was failing.

I think the reason was we should have aleast RedHat linux 6.4 or above for this.

[root@rac1 ~]# cd /media/sf_vshare/
[root@rac1 sf_vshare]# rpm -ivh oracleasmlib-2.0.4-1.el6.x86_64.rpm
warning: oracleasmlib-2.0.4-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
error: Failed dependencies:
        oracleasm >= 1.0.4 is needed by oracleasmlib-2.0.4-1.el6.x86_64
[root@rac1 sf_vshare]# 
[root@rac1 sf_vshare]# yum install kmod-oracleasm
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package kmod-oracleasm.x86_64 0:2.0.8-4.el6_6 will be installed
--> Processing Dependency: kernel(get_user_pages_fast) = 0xa2046a95 for package: kmod-oracleasm-2.0.8-4.el6_6.x86_64
--> Processing Dependency: kernel >= 2.6.32-504.el6 for package: kmod-oracleasm-2.0.8-4.el6_6.x86_64
--> Running transaction check
---> Package kernel.x86_64 0:2.6.32-504.1.3.el6 will be installed
--> Processing Dependency: kernel-firmware >= 2.6.32-504.1.3.el6 for package: kernel-2.6.32-504.1.3.el6.x86_64
--> Running transaction check
---> Package kernel-firmware.noarch 0:2.6.32-358.14.1.el6 will be updated
---> Package kernel-firmware.noarch 0:2.6.32-504.1.3.el6 will be an update
--> Processing Conflict: kernel-2.6.32-504.1.3.el6.x86_64 conflicts bfa-firmware < 3.2.21.1-2
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package bfa-firmware.noarch 0:3.0.3.1-1.el6 will be updated
---> Package bfa-firmware.noarch 0:3.2.23.0-2.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================================================================================================================================
 Package                                                       Arch                                                 Version                                                            Repository                                                          Size
================================================================================================================================================================================================================================================================
Installing:
 kmod-oracleasm                                                x86_64                                               2.0.8-4.el6_6                                                      rhel-x86_64-server-6                                                35 k
Updating:
 bfa-firmware                                                  noarch                                               3.2.23.0-2.el6                                                     rhel-x86_64-server-6                                               3.2 M
Installing for dependencies:
 kernel                                                        x86_64                                               2.6.32-504.1.3.el6                                                 rhel-x86_64-server-6                                                29 M
Updating for dependencies:
 kernel-firmware                                               noarch                                               2.6.32-504.1.3.el6                                                 rhel-x86_64-server-6                                                14 M

Transaction Summary
================================================================================================================================================================================================================================================================
Install       2 Package(s)
Upgrade       2 Package(s)

Total download size: 47 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): bfa-firmware-3.2.23.0-2.el6.noarch.rpm                                                                                                                                                                                            | 3.2 MB     00:00     
(2/4): kernel-2.6.32-504.1.3.el6.x86_64.rpm                                                                                                                                                                                              |  29 MB     00:03     
(3/4): kernel-firmware-2.6.32-504.1.3.el6.noarch.rpm                                                                                                                                                                                     |  14 MB     00:01     
(4/4): kmod-oracleasm-2.0.8-4.el6_6.x86_64.rpm                                                                                                                                                                                           |  35 kB     00:00     
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                           4.9 MB/s |  47 MB     00:09     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Updating   : kernel-firmware-2.6.32-504.1.3.el6.noarch                                                                                                                                                                                                    1/6 
  Installing : kernel-2.6.32-504.1.3.el6.x86_64                                                                                                                                                                                                             2/6 
  Installing : kmod-oracleasm-2.0.8-4.el6_6.x86_64                                                                                                                                                                                                          3/6 
  Updating   : bfa-firmware-3.2.23.0-2.el6.noarch                                                                                                                                                                                                           4/6 
  Cleanup    : kernel-firmware-2.6.32-358.14.1.el6.noarch                                                                                                                                                                                                   5/6 
  Cleanup    : bfa-firmware-3.0.3.1-1.el6.noarch                                                                                                                                                                                                            6/6 
Installed products updated.
  Verifying  : kernel-2.6.32-504.1.3.el6.x86_64                                                                                                                                                                                                             1/6 
  Verifying  : bfa-firmware-3.2.23.0-2.el6.noarch                                                                                                                                                                                                           2/6 
  Verifying  : kernel-firmware-2.6.32-504.1.3.el6.noarch                                                                                                                                                                                                    3/6 
  Verifying  : kmod-oracleasm-2.0.8-4.el6_6.x86_64                                                                                                                                                                                                          4/6 
  Verifying  : kernel-firmware-2.6.32-358.14.1.el6.noarch                                                                                                                                                                                                   5/6 
  Verifying  : bfa-firmware-3.0.3.1-1.el6.noarch                                                                                                                                                                                                            6/6 

Installed:
  kmod-oracleasm.x86_64 0:2.0.8-4.el6_6                                                                                                                                                                                                                         

Dependency Installed:
  kernel.x86_64 0:2.6.32-504.1.3.el6                                                                                                                                                                                                                            

Updated:
  bfa-firmware.noarch 0:3.2.23.0-2.el6                                                                                                                                                                                                                          

Dependency Updated:
  kernel-firmware.noarch 0:2.6.32-504.1.3.el6                                                                                                                                                                                                                   

Complete!
[root@rac1 sf_vshare]# 
[root@rac1 sf_vshare]# pwd
/media/sf_vshare
[root@rac1 sf_vshare]# 
[root@rac1 sf_vshare]# ls -lah 
total 244K
drwxrwx---. 1 root vboxsf 4.0K Jun 24 10:27 .
drwxr-xr-x. 4 root root   4.0K Dec 10 11:53 ..
drwxrwx---. 1 root vboxsf    0 Jun 24 10:29 db_backups
-rwxrwx---. 1 root vboxsf  894 Aug  1  2013 file.log
-rwxrwx---. 1 root vboxsf  13K Jul 15  2013 oracleasmlib-2.0.4-1.el6.x86_64.rpm
-rwxrwx---. 1 root vboxsf  74K Jul 15  2013 oracleasm-support-2.1.8-1.el6.x86_64.rpm
[root@rac1 sf_vshare]# 
[root@rac1 sf_vshare]# 
[root@rac1 sf_vshare]# yum localinstall oracleasmlib-2.0.4-1.el6.x86_64.rpm
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Local Package Process
Examining oracleasmlib-2.0.4-1.el6.x86_64.rpm: oracleasmlib-2.0.4-1.el6.x86_64
Marking oracleasmlib-2.0.4-1.el6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package oracleasmlib.x86_64 0:2.0.4-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================================================================================================================================
 Package                                                    Arch                                                 Version                                                   Repository                                                                      Size
================================================================================================================================================================================================================================================================
Installing:
 oracleasmlib                                               x86_64                                               2.0.4-1.el6                                               /oracleasmlib-2.0.4-1.el6.x86_64                                                27 k

Transaction Summary
================================================================================================================================================================================================================================================================
Install       1 Package(s)

Total size: 27 k
Installed size: 27 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : oracleasmlib-2.0.4-1.el6.x86_64                                                                                                                                                                                                              1/1 
Installed products updated.
  Verifying  : oracleasmlib-2.0.4-1.el6.x86_64                                                                                                                                                                                                              1/1 

Installed:
  oracleasmlib.x86_64 0:2.0.4-1.el6                                                                                                                                                                                                                             

Complete!
[root@rac1 sf_vshare]# 
[root@rac1 sf_vshare]# 
[root@rac1 sf_vshare]# yum localinstall oracleasm-support-2.1.8-1.el6.x86_64.rpm
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Local Package Process
Examining oracleasm-support-2.1.8-1.el6.x86_64.rpm: oracleasm-support-2.1.8-1.el6.x86_64
Marking oracleasm-support-2.1.8-1.el6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package oracleasm-support.x86_64 0:2.1.8-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================================================================================================================================
 Package                                                      Arch                                              Version                                                  Repository                                                                        Size
================================================================================================================================================================================================================================================================
Installing:
 oracleasm-support                                            x86_64                                            2.1.8-1.el6                                              /oracleasm-support-2.1.8-1.el6.x86_64                                            216 k

Transaction Summary
================================================================================================================================================================================================================================================================
Install       1 Package(s)

Total size: 216 k
Installed size: 216 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : oracleasm-support-2.1.8-1.el6.x86_64                                                                                                                                                                                                         1/1 
Installed products updated.
  Verifying  : oracleasm-support-2.1.8-1.el6.x86_64                                                                                                                                                                                                         1/1 

Installed:
  oracleasm-support.x86_64 0:2.1.8-1.el6                                                                                                                                                                                                                        

Complete!
[root@rac1 sf_vshare]# 
[root@rac1 sf_vshare]# 
[root@rac1 sf_vshare]# 
[root@rac1 sf_vshare]# 
[root@rac1 sf_vshare]# oracleasm configure -i
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver.  The following questions will determine whether the driver is
loaded on boot and what permissions it will have.  The current values
will be shown in brackets ('[]').  Hitting <ENTER> without typing an
answer will keep that current value.  Ctrl-C will abort.

Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
[root@rac1 sf_vshare]# 
[root@rac1 sf_vshare]# 
[root@rac1 sf_vshare]# oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": failed
Unable to load module "oracleasm"
[root@rac1 sf_vshare]# 
[root@rac1 sf_vshare]# 



This was fixed by doing yum update and updateing RHEL to 6.6 and this has fixed it.

Other way, bit strange as lib is 32bit and support is 64bit, but works:

# yum install oracleasm
# rpm -ivh oracleasm-support-2.1.8-1.el6.x86_64.rpm
# rpm -ivh oracleasmlib-2.0.4-1.el6.i686.rpm


[root@rac2 1]# oracleasm configure -i
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver.  The following questions will determine whether the driver is
loaded on boot and what permissions it will have.  The current values
will be shown in brackets ('[]').  Hitting <ENTER> without typing an
answer will keep that current value.  Ctrl-C will abort.

Default user to own the driver interface [oracle]: oracle
Default group to own the driver interface [dba]: dba
Start Oracle ASM library driver on boot (y/n) [y]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
[root@rac2 1]#

# shutdown -r now

# oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes
#

oracleasmlib-2.0.4-1.el6.i686.rpm was downloaded from  
http://www.oracle.com/technetwork/server-storage/linux/asmlib/ol6-1709075.html

oracleasm-support-2.1.8-1.el6.x86_64.rpm was downloaded from 
http://www.oracle.com/technetwork/server-storage/linux/asmlib/rhel6-1940776.html