playing around with oracle 10.2, RAC with VMWare Server and Suse 10.1

  • From: Tony Adolph <tony.adolph.dba@xxxxxxxxx>
  • To: Oracle Discussion List <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 28 Jan 2009 13:16:38 +1300

Hi folks,

I am playing around with oracle 10.2, RAC with VMWare Server and Suse 10.1

My goal is to convert an single instance DB running on guest OS "rac1" to a
2 node RAC.
when asked "can we turn our database into a RAC cluster?"
I want to be able to answer "its a piece of cake"

I cloned a Suse 10.1 guest OS that I had already built with Oracle 10.2
installed, to 2 new guests: rac1 and rac2.

I created database: DB1 on rac1 (no ASM)

Here's where my virtual manager comes in and asks me to "RAC" database DB1

so far, I've...

1) created some shared raw devices
2) installed clusterware and got crs up and running (raw devices rather than
ocfs2)
3) created an ASM instance on rac1 using raw devices (rather than asmlib)
4) created an ASM instance on rac2
5) migrated DB1 to use ASM
6) configured listeners

All good so far:

Output from crs_stat -t

oracle@rac1:~> crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora....ASM.asm application    ONLINE    ONLINE    rac1
ora....C1.lsnr application    ONLINE    ONLINE    rac1
ora.rac1.gsd   application    ONLINE    ONLINE    rac1
ora.rac1.ons   application    ONLINE    ONLINE    rac1
ora.rac1.vip   application    ONLINE    ONLINE    rac1
ora....ASM.asm application    ONLINE    ONLINE    rac2
ora....C2.lsnr application    ONLINE    ONLINE    rac2
ora.rac2.gsd   application    ONLINE    ONLINE    rac2
ora.rac2.ons   application    ONLINE    ONLINE    rac2
ora.rac2.vip   application    ONLINE    ONLINE    rac2

The last step as far as I understand it, is to create a second instance on
rac2, where this 2nd instance is based on the pfile of the first.

Here's where my knowledge lets me down.

I need to have 2 differently named instance connecting to the one database.
So I could have instance N1 on rac1 and instance N2 on rac2 connect to
database DB1.

But the instance is the ORACLE_SID, and my database/instance is(are) called
DB1.

What I'm trying to do is change the instance name to N1 (on rac1) as
follows:

oracle@rac1> export ORACLE_SID=DB1
oracle@rac1> sqlplus /nolog
SQL> conn / as sysdba
SQL> create pfile=/tmp/pfile_4_RAC.ora from spfile;
SQL> alter database backup controlfile to trace;
SQL> shutdown;

I've added the following lines to the pfile as follows:

*.local_listener='LISTENERS_RAC'
N1.undo_tablespace='UNDOTBS1'
N2.undo_tablespace='UNDOTBS2'
N1.instance_number=1
N2.instance_number=2
N1.thread=1
N2.thread=2
#*.cluster_database=true
*.cluster_database_instances=2
*.fal_server=DB1
*.fal_client=DB1

I've create the 2 undo tablespaces.

Now I want to start up an N1 instance and to do so am going to recreate the
control file (without this step I get ORA-00205: error in identifying
control file, check alert log for more info)

oracle@rac1> export ORACLE_SID=N1
oracle@rac1> sqlplus /nolog
SQL> conn / as sysdba
SQL> startup nomount pfile=/tmp/pfile_4_RAC.ora
ORACLE instance started.
.
.

From the trace file earlier:

SQL> CREATE CONTROLFILE REUSE DATABASE "DB1" RESETLOGS  ARCHIVELOG
  2      MAXLOGFILES 16
  3      MAXLOGMEMBERS 3
  4      MAXDATAFILES 100
  5      MAXINSTANCES 8
  6      MAXLOGHISTORY 292
  7  LOGFILE
  8    GROUP 4 (
  9      '+DG1/db1/onlinelog/group_4.277.677247919',
 10      '+DG2/db1/onlinelog/group_4.256.677247921'
 11    ) SIZE 50M,
 12    GROUP 5 (
 13      '+DG1/db1/onlinelog/group_5.278.677247939',
 14      '+DG2/db1/onlinelog/group_5.257.677247939'
 15    ) SIZE 50M
 16  -- STANDBY LOGFILE
 17  DATAFILE
 18    '+DG1/db1/datafile/system.270.677244991',
 19    '+DG1/db1/datafile/undotbs1.271.677245007',
 20    '+DG1/db1/datafile/sysaux.272.677245021',
 21    '+DG1/db1/datafile/users.273.677245029'
 22  CHARACTER SET WE8ISO8859P1
 23  ;
CREATE CONTROLFILE REUSE DATABASE "DB1" RESETLOGS  ARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01565: error in identifying file
'+DG1/db1/datafile/system.270.677244991'
ORA-17503: ksfdopn:2 Failed to open file
+DG1/db1/datafile/system.270.677244991
ORA-15001: diskgroup "DG1" does not exist or is not mounted
ORA-15055: unable to connect to ASM instance
ORA-03113: end-of-file on communication channel

I reckon I'm going way off the mark here by trying to change the instance
name, but shouldn't it be possible this way?

And how *should* it be done?

Any pointers would be appreciated (in the meantime I'll carry on hacking)

Thanks for any help
Tony

PS: I've found dozens of guides/white papers on setting up RAC from scratch,
but can't find one that converts an existing single instance to RAC,.. that
*works*,.. inc the oracle docs.

Other related posts: