Stillman Real Consulting Portal (Ultra)
Welcome, Guest. Please login or register.
September 05, 2010, 05:47:29 pm

Login with username, password and session length
Search:     Advanced search
November 17, 2006.  The Stillman Real Consulting, LLC SMF "Storm" Failover Site becomes operational.
345 Posts in 299 Topics by 13101 Members
Latest Member: andryshaukr
* Home Help Search Calendar Login Register
 1   Oracle Topics / Scripts / Interactive Script to Check for RPM Pkgs Required on RHEL5 for 64-bit Oracle  on: May 31, 2009, 09:20:10 pm 
Started by admin | Last post by admin
These scripts are also stored in db01.govex.thornwood.com in the /scripts directory.


------
# This is the script to check Requirements For Installing
#Oracle Server Enterprise Edition - Version: 10.2.0.1 to 10.2.0.1 Linux X86_64
#Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 10.2.0.1 Linux 32-bit
#on RHEL5/OEL5/CENTOS5 64-bit OS (x86_64)
# See Metalink document 421308.1
#
#v!/bin/ksh
function NumPkg
{
cat pkg-list-RHEL-x86_64 | wc -l
}
PkgCount=$(NumPkg)
function CreatePkgArray
{
more pkg-list | sed 's/$/:/' | tr -d '\012' | sed 's/$/:/' | sed 's/:://'
}
export PKG_ARRAY=$(CreatePkgArray)
echo $PKG_ARRAY
let i=1
while [ "$i" -le 26 ]
do
echo ' '
echo '---'
echo ' '
function GetPkgLongName
{
echo $PKG_ARRAY | cut -f"$i" -d':'
}
function FL
{
echo $PKG_ARRAY | cut -f"$i" -d':' | cut -c1
}
function GetPkgShortName
{
echo $PKG_ARRAY | cut -f"$i" -d':' | cut -f1 -d'(' | cut -f1 -d'.'
}
function GetBitType
{
echo $PKG_ARRAY | cut -f"$i" -d':' | cut -f2 -d'(' | sed 's/)//'
}
function CL
{
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep "$ShortPkgName" | cut -f1 -d"$Fl" | sort -u
}
Fl=$(FL)
LongPkgName=$(GetPkgLongName)
ShortPkgName=$(GetPkgShortName)
BitType=$(GetBitType)
Prefix=$(CL)
echo $ShortPkgName $BitType $Prefix
if [ -z "$Prefix" ]
then
function CkHavePkg1
{
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep "$ShortPkgName" | grep "$BitType"
}
HavePkgName=$(CkHavePkg1)
else
function CkHavePkg2
{
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep "$ShortPkgName" | grep "$BitType" | grep -v "$Prefix"
}
HavePkgName=$(CkHavePkg2)
fi
echo "Have: $HavePkgName"
echo "Need: $LongPkgName"
if [ -z "$HavePkgName" ]
then
echo "Enter the Yum package to be installed:"
read NAME
echo "Getting $NAME ..."
yum install "$NAME"
fi
let i=$i+1
done
------
This is thel pkg file which is called by the above script:
binutils-2.17.50 (x86_64)
compat-db-4.2.52 (x86_64)
compat-libstdc++-296(i386)
compat-libstdc++-33-3.2.3 (x86_64)
compat-libstdc++-33-3.2.3(i386)
control-center-2.16.0 (x86_64)
gcc-4.1.1 (x86_64)
gcc-c++-4.1.1 (x86_64)
glibc-2.5-12 (x86_64)
glibc-2.5-12 (i686)
glibc-common-2.5-12 (x86_64)
glibc-devel-2.5-12 (x86_64)
glibc-devel-2.5-12(i386)
glibc-headers-2.5-12 (x86_64)
ksh-20060214-1.4 (x86_64)
libaio-0.3.96 (x86_64)
libgcc-4.1.1(i386)
libgcc-4.1.1(x86_64)
libgnome-2.16.0 (x86_64)
libgnomeui-2.16.0 (x86_64)
libgomp-4.1.1 (x86_64)
libstdc++-4.1.1 (x86_64)
libstdc++-devel-4.1.1 (x86_64)
libXp-1.0.0-8 (i386)
make-3.81 (x86_64)
sysstat-7.0.0 (x86_64)
rsh-server

 2   Oracle Topics / Scripts / Script to Ck Pkgs for 10gR2 install on RHEL 5.3  on: May 29, 2009, 10:13:51 pm 
Started by admin | Last post by admin
#!/bin/ksh
export PKG_ARRAY="binutils-2.17.50 (x86_64):compat-db-4.2.52 (x86_64):compat-libstdc++-296(i386):compat-libstdc++-33-3.2.3 (x86_64):compat-libstdc++-33-3.2.3(i386):control-center-2.16.0 (x86_64):gc
c-4.1.1 (x86_64):gcc-c++-4.1.1 (x86_64):glibc-2.5-12 (x86_64):glibc-2.5-12 (i686):glibc-common-2.5-12 (x86_64):glibc-devel-2.5-12 (x86_64):glibc-devel-2.5-12(i386):glibc-headers-2.5-12 (x86_64):ksh
-20060214-1.4 (x86_64):libaio-0.3.96 (x86_64):libgcc-4.1.1(i386):libgcc-4.1.1(x86_64):libgnome-2.16.0 (x86_64):libgnomeui-2.16.0 (x86_64):libgomp-4.1.1 (x86_64):libstdc++-4.1.1 (x86_64):libstdc++-d
evel-4.1.1 (x86_64):libXp-1.0.0-8 (i386):make-3.81 (x86_64):sysstat-7.0.0 (x86_64)"
let i=1
while [ "$i" -le 27 ]
do
function GetPkgName
{
echo $PKG_ARRAY | cut -f"$i" -d':'
}
PkgName=$(GetPkgName)
echo "'$PkgName'"
rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep "'$PkgName'"
if [ $? -eq 1 ]
then
echo "Package $GetPkgName is missing."
fi
let i=$i+1
done

 3   Oracle Real Application Clusters (RAC) / Clusterware Topics / GOVX Install Notes  on: May 27, 2009, 03:02:37 pm 
Started by admin | Last post by admin
This note is about the setup of /etc/udev/permissions.d/49-oracle-permissions file.  This is how I set up this file on PRET:

db01.pret():/etc/udev/permissions.d >

# ASM
raw/raw[6-9]:oracle:oinstall:0660
raw/raw10:oracle:oinstall:0660
# OCR
raw/raw[12]:oracle:oinstall:0660
# Voting
raw/raw[3-5]:oracle:oinstall:0660


Here are the raw device mappings in directory /dev/raw  (also PRET)

crw-rw----  1 root   oinstall 162, 1 Feb 28 03:21 raw1
crw-rw----  1 root   oinstall 162, 2 Feb 28 03:21 raw2
crw-rw----  1 oracle oinstall 162, 3 Feb 28 03:21 raw3
crw-rw----  1 oracle oinstall 162, 4 Feb 28 03:21 raw4
crw-rw----  1 oracle oinstall 162, 5 Feb 28 03:21 raw5
crw-rw----  1 oracle oinstall 162, 6 Feb 28 03:21 raw6
lrwxrwxrwx  1 root   root         13 Feb 28 03:21 ocr01.dat -> /dev/raw/raw1
lrwxrwxrwx  1 root   root         13 Feb 28 03:21 ocr02.dat -> /dev/raw/raw2
lrwxrwxrwx  1 root   root         13 Feb 28 03:21 css01.dat -> /dev/raw/raw3
lrwxrwxrwx  1 root   root         13 Feb 28 03:21 css02.dat -> /dev/raw/raw4
lrwxrwxrwx  1 root   root         13 Feb 28 03:21 spfile+ASM.ora -> /dev/raw/raw5


Settings in /etc/rc.local

db01.pret():/dev/raw > more /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
/sbin/modprobe hangcheck-timer

#ln -s /dev/raw/raw5 /dev/raw/css03.dat
#ln -s /dev/raw/raw10 /dev/raw/spfile+ASM.ora

ln -s /dev/raw/raw1 /dev/raw/ocr01.dat
ln -s /dev/raw/raw2 /dev/raw/ocr02.dat
ln -s /dev/raw/raw3 /dev/raw/css01.dat
ln -s /dev/raw/raw4 /dev/raw/css02.dat
ln -s /dev/raw/raw5 /dev/raw/spfile+ASM.ora
#ln -s /dev/raw/raw6 /dev/raw/spfile+ASM.ora

chown root:oinstall /dev/raw/raw[1-2]
chown oracle:oinstall /dev/raw/raw[3-6]

 4   Software Downloads (Public) / Toshiba A205-S5800 Ubuntu Linux 8.04 Drivers / Configuring AR242x (aka AR5700EG) in Centos 4.7 on Toshiba L305-S5944 Laptop  on: May 17, 2009, 06:04:02 pm 
Started by admin | Last post by admin
From URL:  http://www.redhat.com/archives/fedora-list/2006-June/msg00344.html

How to configure MADWIFI + WPA-SUPPLICANT [was Re: Howto configure Wireless Card in FC5]

    * From: Samuel Díaz García <samueldg arcoscom com>
    * To: For users of Fedora Core releases <fedora-list redhat com>
    * Subject: How to configure MADWIFI + WPA-SUPPLICANT [was Re: Howto configure Wireless Card in FC5]
    * Date: Sun, 04 Jun 2006 01:49:40 +0200

The first is to be sure that "madwifi" is your driver. The second is install it. I suppose that you are using the livna madwifi-ng package for FC5, in that case, when ath_pci is loaded it creates an "ath0" interface.

[ Note: I am actually using this:  4. Download the patched snapshot MadWifi's ticket 1192 has a link to the latest snapshot:
http://snapshots.madwifi-project.org/madwifi-hal-0.10.5.6/
that work with this card. Download it and save it somewhere. The snapshots are frequently updated, so always make sure you have the latest version].

The ath_pci module, at load time, creates a "ficticious" driver called "wifi0", you don't need to touch it, then using madwifi tools you creates as many "athN" interfaces as you want in the mode as you want. [ Note: yes, this happens for me when I follow the instructions at:  http://wiki.centos.org/HowTos/Laptops/WirelessAR5007EG.  And yes I saw how the driver called wifi0 gets created and wondered about that.  Ok, so I don't touch that one and I work with the athN interface].

By default, in modprobe.conf you can see that ath0 is created when ath_pci loads as "station mode" interface. In your case, will be at all. [Check this].

The next is configure your wireless access. In FC5 you have 4 methods:

1) Traditional method using wireless tools (use "man iwconfig" and use it).  Now use this URL:  http://www.pantz.org/software/wpa_supplicant/wirelesswpa2andlinux.html and use the iwconfig method.  [This tutorial includes the wpa_supplicant part].

[ Note:  Skip this...
2) Using system-config-network (or gnome version), it is very limited tool for wifi configuration, but could be the necesary. 3) I remember somebody says something about a "KWifiManager" usually used under KDE (I don't tried it).

4) Using wpa_supplicant.

Not sure from here on down...

To install without problems, I recomend you add the livna repository (it is compatible with FC5 repositories).

Then install these packages:
   kmod-madwifi
   madwifi
   wpa_supplicant


The first is for your kernel modules, the second the madwifi utils (I don't need it for usual operations).

About configuration, I use gnome-config-network (or how it is named) to put the IP config and the basic wireless params. The wireless params leave all in auto or only putting the correct essid.

Then configure your /etc/sysconfig/wpa_supplicant to say the interface and the driver to use.

Then configure your /etc/wpa_supplicant.conf file to put your wifi network parameters.

Then activate the wpa_supplicant service to run at boot and start the service.

That's all.

The summary (you must be root to run many of next commands) :

1) Install livna repository:
   wget http://rpm.livna.org/livna-release-5.rpm
   rpm -ivh livna-release-5.rpm

2) Install madwifi driver, madwifi utils and:
   yum -y install kmod-madwifi madwifi wpa_supplicant


3) Perhaps you will need to reboot your system at this point to allow the load of madwifi driver, but instead, you can try to use:

   modprobe ath_pci

4) Using any tool, configure your IP options in your ath0 driver.

5) Configure your /etc/sysconfig/wpa_supplicant file: Be sure the lines are:

INTERFACES="-iath0"
DRIVERS="-Dmadwifi"

The old lines, use coments to disable them.


6) Configure your /etc/wpa_supplicant.conf file for your network. Sorry, no help, this file is very personal, but default file contains many examples for many configurations.

7) Be sure you run your wpa_supplicant service when system boot:

   chkconfig --level 345 wpa_supplicant on

Cool Run the wpa_service to enable the wifi link:

   service wpa_supplicant start


This step is only to force the wpa_supplicant start now, you don't need it every system start.

ADITIONAL NOTES:
   1) These steps could be general for many drivers.

2) Use madwifi and wpa_supplicant official web pages to search about config options and troubleshooting.

   3) NDISWRAPPER I think you use as the "last" resource.
   4) Say us if this help you when you have your wifi card running.
   5) Sorry for my english.

Regards


 5   VirtualBox / VirtualBox VM / Cloning the Oracle Financials VM Centos-4.7-A  on: May 16, 2009, 01:58:30 pm 
Started by admin | Last post by admin
All attempts to clone this failed.  I tried cloning on the SAME host using both "clonehd" and "clonevdi" but when I would try to start up the host I would get many strange errors - although it would start - indicating that the machine was in an inconsistent state of some kind.  I think this had to do with the incident where the discard of snapshot operation ran out of space.

So then I tried copying the file to another host machine, and startup that way.  Still had same errors as above.  So that proved that the working image was making use of a snapshot to provide a consistent working machine because the errors were in the .vdi datafile itself.

So then I decided to take another snapshot.  Now there is a link to a snapshot I several days ago in the /home/gstanden/.VirtualBox/Machines/centos-4.7-A/Snapshots directory.  It points to the snapshot which never got applied, at least I think it's the one that did not get fully applied (disk ran out of space).  Well so I took another snapshot, and lo, it did not create a new snapshot; moreover, when I went to discard the newly "created" snapshot, it began applying the one mentioned above - the one that had never applied.

So I'm hoping that VirtualBox "knew" that that snapshot had not been applied and is reaccessing it and reapplying it.  I don't think there can be any other explanation.  That snapshot is the only one that is softlinked in the /Snapshots directory so it's the only one the system could "see" and it's the one it is applying now.  That snapshot is the only explanation for why the original machine is starting up ok.  The original .vdi file has this defect which is causing the error - probably caused when the snapshot did not finish applying correctly.  So I guess when you click "create snapshot" the software somehow checks to see if the current .vdi has already applied all previously-taken snapshots fully - and if not - it assigns the snapshot which has not yet been fully applied to be the "new" snapshot.  So when you discard that snapshot again, it hopefully re-applies it again - maybe starting from where it left off when the disk filled.  Anyway, I will find out soon today...

 6   VirtualBox / VirtualBox VM / How to Clone a VirtualBox VM  on: May 12, 2009, 01:46:23 am 
Started by admin | Last post by admin
It turns out you can clone a VirtualBox VM even to an external USB 2.0 hard disk.  I've just cloned my VirtualBox VM from the internal hard disk of my laptop to my 1Tb Western Digital external USB hd.  Then I started it up after cloning it.  It ran just great.  Here's how to do it.

Go to the command line terminal and go to where the .vdi file (the VM hard disk) is located.  On my machine (ubuntu) this is:

/home/gstanden/.VirtualBox/HardDisks

Then run this command at the prompt:

VBoxManage clonevdi /home/gstanden/.VirtualBox/HardDisks/centos-4.7-A.vdi /media/VMLIB2/VirtualBox/HardDisks/centos-4.7-A-clone-1.vdi

This creates a clone of your VM in the new location.  Note that you cannot just copy it manually.  You have to use this utility because it gives the clone a new UUID.

When you start up the clone (in Centos anyway this happens) it will start Kudzu the hardware manager and ask you to confirm deletion of the virtual network card.  Go ahead and accept deletion.  Next Kudzu will ask you to add a new network card and configure it.  Give it the new ip address (different from the original VM) so that it has a unique network ip.  Then continue with bootup.  You are basically done at this point.

However, you'll need to do some reconfig on your machine though.  Go into /etc/hosts and all that and make the required changes, change the hostname, etc.  Once you've fixed all that you should be good.

 7   Oracle Topics / Scripts / Read output of SQL into a variable on bash (using function)  on: April 24, 2009, 08:07:58 pm 
Started by admin | Last post by admin
See also:  http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1328829

Example:


#!/bin/ksh
# Program Notes
# Author:  G. Standen i
# Date: April, 2009
# Script ships unapplied archived redo logs from db11.prod (aka prod-db6) to prod-db4 (aka the reporting standby DB host).
# Logs are gzipped with max compress (gzip -9) before shipping across network and unzipped at destination.

export ORACLE_BASE=/home/app/oracle
export ORACLE_HOME=/home/app/oracle/product/10g
export ORACLE_SID=FXPROD1
export PATH=/usr/bin:/usr/sbin:.:/home/app/oracle/product/10g/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
export LD_LIBRARY_PATH=/usr/lib:/home/app/oracle/product/10g/lib:/home/app/oracle/product/crs/lib:

function GetLogDest
{
echo "set linesize 200 heading off echo off verify off feedback off pagesize 0
      select value from v\$parameter where name = 'log_archive_dest_1';
      quit
      "  | sqlplus -s / as sysdba | sed 's/^[ \t]*//;s/[ \t]*$//' | perl -pe 's/^\s*$//' | cut -f2 -d'='
}
logdest=$(GetLogDest)
function GetDBIncarnation
{
echo "set linesize 200 heading off echo off verify off feedback off pagesize 0
      select resetlogs_id from v\$database_incarnation;
      quit
      "  | sqlplus -s / as sysdba | sed 's/^[ \t]*//;s/[ \t]*$//' | perl -pe 's/^\s*$//'
}
incarnation=$(GetDBIncarnation)
function GetThreads
{
echo "set linesize 200 heading off echo off verify off feedback off pagesize 0
      select distinct thread# from v\$log_history;
      quit
      "  | sqlplus -s / as sysdba | sed 's/^[ \t]*//;s/[ \t]*$//' | perl -pe 's/^\s*$//' | sed 's/$/ /' | tr -d '\012'
}
threads=$(GetThreads)
for i in ${threads}
do
      function GetMaxSeq
      {
      echo "set linesize 200 heading off echo off verify off feedback off pagesize 0
            select max(sequence#) from v\$log_history where thread#="$i";
      quit
      "  | sqlplus -s / as sysdba | sed 's/^[ \t]*//;s/[ \t]*$//' | perl -pe 's/^\s*$//' | sed 's/$/ /' | tr -d '\012' | sed 's/^[ \t]*//;s/[ \t]*$//'
      }
      let maxseq=$(GetMaxSeq)
      ssh db11.prod ls -l $logdest"/arch_FXPROD_"$i"_"$maxseq"_"$incarnation".arc" >/dev/null 2>&1
      let sw0=$?
      ls -l /oracle/archive/FXPROD | grep "arch_FXPROD_"$i"_"$maxseq"_"$incarnation".arc" >/dev/null 2>&1
      let sw1=$?
           while [ "$sw0" -eq 0 ]
           do
           function CopyCmd
           {
           echo "ssh db11.prod gzip -9 -c ${logdest}/arch_FXPROD_${i}_${maxseq}_${incarnation}.arc"
           }
           copycmd=$(CopyCmd)
           if [ "$sw1" -eq 1 ]
           then
           $copycmd | gunzip > ${logdest}/arch_FXPROD_${i}_${maxseq}_${incarnation}.arc
           fi
           let maxseq=$maxseq+1
           ssh db11.prod ls -l $logdest"/arch_FXPROD_"$i"_"$maxseq"_"$incarnation".arc" >/dev/null 2>&1
           sw0=$?
           ls -l /oracle/archive/FXPROD | grep "arch_FXPROD_"$i"_"$maxseq"_"$incarnation".arc" >/dev/null 2>&1
           sw1=$?
           done
done
for i in ${threads}
do
      function GetMaxSeq
      {
      echo "set linesize 200 heading off echo off verify off feedback off pagesize 0
            select max(sequence#) from v\$log_history where thread#="$i";
      quit
      "  | sqlplus -s / as sysdba | sed 's/^[ \t]*//;s/[ \t]*$//' | perl -pe 's/^\s*$//' | sed 's/$/ /' | tr -d '\012' | sed 's/^[ \t]*//;s/[ \t]*$//'
      }
      maxseq=$(GetMaxSeq)
      let maxseq=$maxseq-1
      let j=1
           while [ "$j" -le 100 ]
           do
           rm "/oracle/archive/FXPROD/arch_FXPROD_"$i"_"$maxseq"_"$incarnation".arc" > /home/app/oracle/admin/DBA/scripts/deletelogs.log 2>&1
           let maxseq=$maxseq-1
           let j=$j+1
           done
done

See also this HP ITRC forum thread:


 8   Oracle Topics / Scripts / Run Unsuccessful Logins Report from Oracle Applications  on: April 24, 2009, 07:44:46 pm 
Started by admin | Last post by admin
CONCSUB apps/<AppsPwd> SYSADMIN "System Administrator" SYSADMIN wait=N CONCURRENT FND FNDSCSRL '"Attempt_Time"' '""' '"01-APR-09"' '"24-APR-09"'

See also OTN Thread:  http://forums.oracle.com/forums/thread.jspa?messageID=3426335#3426335

 9   Oracle Topics / Scripts / Extract all DDL of Objects in a Tablespace  on: April 17, 2009, 07:12:31 pm 
Started by admin | Last post by admin
This scripts uses dbms_metatdata.get_ddl to obtain all of the DDL for all of the objects in a specified tablespace.

----- Script -----

set echo off
set feedback off
set heading off
set pagesize 0

set long 160000
set linesize 1000
set trimspool on
set termout off

-- Ensure clean output and suppress storage parameters.
begin
DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM, 'PRETTY', true);
DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM, 'SQLTERMINATOR', true);
end;
/

-- We need to format the output clob column otherwise it will simply wrap at 80 chars no
-- matter what the linesize is set to.

column ddl_output format a1000

spool trade_idx_1.ddl.sql

select dbms_metadata.get_ddl(object_type, object_name, owner) as ddl_output
from dba_objects
where object_name in (select distinct segment_name from dba_segments where tablespace_name = 'INDEX_TS_NAME');

----- Script -----

References
http://it.toolbox.com/blogs/database-solutions/ddl-generationoracles-answer-to-save-you-time-and-money-7590
http://forums.oracle.com/forums/thread.jspa?messageID=3409519&#3409519
http://www.biochemfusion.com/downloads/oracle_dump_ddl.sql

 10   Oracle Real Application Clusters (RAC) / Clusterware Topics / Clusterware Install Notes -11g "type" enviro install (but used 10g binaries)  on: February 12, 2009, 11:21:08 pm 
Started by admin | Last post by admin
0.  OFA considerations

The 11g OFA standard is "/u01/app/crs,   /u01/app/oracle,   /u01/app/asm,   etc...
This installation had previously used:  /home/app/oracle/product/10g

I used for my crs install as $ORA_CRS_HOME:  /home/app/crs/product       (I did not want to use  /home/app/crs/product/crs  which is redundant)
when I finished I created this link:

ln -s /home/app/crs/product /home/app/crs/product/10g
ln -s /home/app/crs/product /home/app/oracle/product/crs10g

Then you end up with valid homes of:

/home/app/oracle/product/crs10g
/home/app/oracle/product/asm10g
/home/app/oracle/product/10g

and

/home/app/crs/product/10g
/home/app/asm/product/10g
/home/app/oracle/product/10g

At upgrade time you keep the same home and just upgrade the links.  This should work.  Any issues?

1.  On RedHat/CentOS the name of the file in /etc/udev/permissions.d with the oracle related raw device setups is "49-oracle.permissions".  Tested and works.

2.  On RedHat/CentOs the contents of the file which worked for me were not "0640" settings, but rather instead were as follows "0660" and this installed great:

# ASM
raw/raw[67]:asm:asmdba:0660
# OCR
raw/raw[12]:root:oinstall:0660
# Voting
raw/raw[3-5]:crs:oinstall:0660

Note:  It would be useful to know if you can get a successful install with OCR set to 0640 and Voting set to 0640.  Try it out sometime!

3.  Partitions on the MSA's were set up as follows.  Note that
(a) I skipped the "first" cylinder on partition #1 (as there were some notes about this on the net)
(b) The size of the voting and ocr were set to starting-cylinder & +280M which worked fine.


[root@db01.pret ~]# fdisk -l

Disk /dev/sda: 437.0 GB, 437031665664 bytes
255 heads, 63 sectors/track, 53132 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               2          36      281137+  83  Linux
/dev/sda2              37          71      281137+  83  Linux
/dev/sda3              72         106      281137+  83  Linux
/dev/sda4             107       53132   425931345    5  Extended
/dev/sda5             108         108        8032+  83  Linux
/dev/sda6             109       24921   199310391   83  Linux
/dev/sda7           24922       53132   226604826   83  Linux

Disk /dev/sdb: 437.0 GB, 437031665664 bytes
255 heads, 63 sectors/track, 53132 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               2          36      281137+  83  Linux
/dev/sdb2              37          71      281137+  83  Linux
/dev/sdb3              72          72        8032+  83  Linux
/dev/sdb4              73       53132   426204450    5  Extended
/dev/sdb5              73       24885   199310391   83  Linux
/dev/sdb6           24886       53132   226893996   83  Linux

Disk /dev/cciss/c0d0: 73.3 GB, 73372631040 bytes
255 heads, 63 sectors/track, 8920 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

           Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d0p1   *           1          13      104391   83  Linux
/dev/cciss/c0d0p2              14        8920    71545477+  8e  Linux LVM

Disk /dev/cciss/c0d1: 146.7 GB, 146778685440 bytes
255 heads, 32 sectors/track, 35132 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

           Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d1p1               1       35132   143338544   83  Linux
[root@db01.pret ~]#

4.  My users and groups that have been setup (preparing for RAC install) are as follows:

(a)  Note that I added "dba" group to "crs" user (not sure if this is actually necessary or even advisable)
(b) All users get "oinstall" as primary group
[root@db01.pret ~]# id oracle
uid=301(oracle) gid=300(oinstall) groups=300(oinstall),301(dba),302(oper),506(asmdba)
[root@db01.pret ~]# id crs
uid=401(crs) gid=300(oinstall) groups=300(oinstall),301(dba),502(crs)
[root@db01.pret ~]# id asm
uid=504(asm) gid=300(oinstall) groups=300(oinstall),504(asm)
[root@db01.pret ~]# id nobody
uid=99(nobody) gid=99(nobody) groups=99(nobody)

Groups

[root@db01.pret ~]# more /etc/group | egrep 'oinstall|asm|crs|oracle|nobody'
nobody:x:99:
nfsnobody:x:65534:
oinstall:x:300:
dba:x:301:oracle,crs
oper:x:302:oracle
asmdba:x:506:oracle
asm:x:504:asm
crs:x:502:crs

Users

[root@db01.pret ~]# more /etc/passwd | egrep 'oinstall|asm|crs|oracle|nobody'
nobody:x:99:99:Nobody:/:/sbin/nologin
nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
oracle:x:301:300:Oracle10g:/home/oracle:/bin/bash
crs:x:401:300::/home/crs:/bin/bash
asm:x:504:300::/home/asm:/bin/bash

5.  /etc/sysconfig/rawdevices file:

[root@db01.pret ~]# more /etc/sysconfig/rawdevices
# This file and interface are deprecated.
# Applications needing raw device access should open regular
# block devices with O_DIRECT.
# raw device bindings
# format:  <rawdev> <major> <minor>
#          <rawdev> <blockdev>
# example: /dev/raw/raw1 /dev/sda1
#          /dev/raw/raw2 8 5

# ocr
/dev/raw/raw1 /dev/sda1
/dev/raw/raw2 /dev/sdb1

# css
/dev/raw/raw3 /dev/sda2
/dev/raw/raw4 /dev/sdb2
/dev/raw/raw5 /dev/sda3

# +asm spfile
/dev/raw/raw6 /dev/sda5
/dev/raw/raw7 /dev/sdb3

6.  /etc/rc.local file

[root@db01.pret ~]# more /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
/sbin/modprobe hangcheck-timer

ln -s /dev/raw/raw1 /dev/raw/ocr01.dat
ln -s /dev/raw/raw2 /dev/raw/ocr02.dat
ln -s /dev/raw/raw3 /dev/raw/css01.dat
ln -s /dev/raw/raw4 /dev/raw/css02.dat
ln -s /dev/raw/raw5 /dev/raw/css03.dat
ln -s /dev/raw/raw6 /dev/raw/spfile+ASM1.ora
ln -s /dev/raw/raw7 /dev/raw/spfile+ASM2.ora
chown -h root:oinstall /dev/raw/ocr*.dat
chown -h crs:oinstall /dev/raw/css*.dat
chown -h asm:asmdba /dev/raw/spfile*

(a) Note the "-h" on the "chown" is needed to change permissions on the links

7.  Script to clean up failed clusterware install:

(a) Note: run the "dd" commands on only 1 node.  So far, I don't think the dd commands worked for cleaning up my voting and ocr but I would have to retry them.

[root@db01.pret crs]# more uninstall_crs.sh
#!/bin/bash
clear
echo
echo "Remove the Oracle Clusterware Service ?"
echo
echo "Start to Shutdown and Remove Oracle Clusterware ..."
echo
/etc/init.d/init.evmd stop
/etc/init.d/init.evmd disable
/etc/init.d/init.cssd stop
/etc/init.d/init.cssd disable
/etc/init.d/init.crsd stop
/etc/init.d/init.crsd disable
/etc/init.d/init.crs stop
/etc/init.d/init.crs disable
rm -rf /etc/oracle /etc/oraInst.loc /etc/oratab
rm -rf /etc/init.d/init.crsd /etc/init.d/init.crs /etc/init.d/init.cssd /etc/init.d/init.evmd
rm -rf /etc/rc2.d/K96init.crs /etc/rc2.d/S96init.crs etc/rc3.d/K96init.crs \
/etc/rc3.d/S96init.crs /etc/rc4.d/K96init.crs /etc/rc4.d/S96init.crs \
/etc/rc5.d/K96init.crs /etc/rc5.d/S96init.crs /etc/rc.d/rc0.d/K96init.crs \
/etc/rc.d/rc1.d/K96init.crs /etc/rc.d/rc6.d/K96init.crs /etc/rc.d/rc4.d/K96init.crs
cp /etc/inittab.no_crs /etc/inittab
rm -rf /tmp/*
rm -rf /tmp/.oracle
rm -rf /usr/local/bin/dbhome /usr/local/bin/oraenv /usr/local/bin/coraenv
rm -rf /var/tmp/.oracle
rm -rf /opt/oracle/*
cd /home/app/oracle
rm -Rf oraInventory
cd /home/app/crs
rm -Rf product
echo
echo "Remove on one Node the Shared Devices"
dd if=/dev/zero of=/dev/sda1 bs=287884800 count=1
dd if=/dev/zero of=/dev/sdb1 bs=287884800 count=1
dd if=/dev/zero of=/dev/sda2 bs=287884800 count=1
dd if=/dev/zero of=/dev/sdb1 bs=287884800 count=1
dd if=/dev/zero of=/dev/sda3 bs=287884800 count=1
dd if=/dev/zero of=/dev/sdb3 bs=287884800 count=1
service rawdevices restart
/etc/rc.local
clear
ls -l /dev/raw
ls -l /home/app/oracle
ls -l /home/app/crs

8.  Easiest way to figure out what dd command you need:

first run:  dd if=/dev/zero of=/dev/sdb

it will give some output about running out of space on device
take the lower of the two numbers it spits out and then multiply by 512 (os block size) and then use that number as follows:

dd if=/dev/zero of=/dev/sdb3 count=562275      (this will write 512 byte empty blocks onto /dev/sdb3 on a formatted +280M device (from fdisk)
dd if=/dev/zero of=/dev/sda1 bs=287884800 count=1    (this does the same thing, but is 1 block of size 562275 x 512 = 287884800 bytes)

Use the second command.  However, I am not sure this actually satisfies the clusterware installer. the command does whatever it does, but it seemed the installer was really only happiest with freshly 'fdisked" raw partitions.  It wasn't as happy with the "dd"'d raw partitions. I should retry this at home on the VMware linux cluster to see how it works.

These are the messages you get about the OCR's (and this was an install which ended successfully):

2009-02-12 22:34:42.730: [ OCRCONF][4143883968]ocrconfig starts...
2009-02-12 22:34:42.731: [ OCRCONF][4143883968]Upgrading OCR data
2009-02-12 22:34:42.771: [  OCRRAW][4143883968]propriogid:1: INVALID FORMAT
2009-02-12 22:34:42.771: [  OCRRAW][4143883968]propriogid:1: INVALID FORMAT
2009-02-12 22:34:42.771: [  OCRRAW][4143883968]proprioini: both disks are not OCR formatted
2009-02-12 22:34:42.771: [  OCRRAW][4143883968]proprinit: Could not open raw device
2009-02-12 22:34:42.771: [ default][4143883968]a_init:7!: Backend init unsuccessful : [26]
2009-02-12 22:34:42.772: [ OCRCONF][4143883968]Exporting OCR data to [OCRUPGRADEFILE]
2009-02-12 22:34:42.772: [  OCRAPI][4143883968]a_init:7!: Backend init unsuccessful : [33]
2009-02-12 22:34:42.772: [ OCRCONF][4143883968]There was no previous version of OCR. error:[PROC-33: Oracle Cluster Registry is not configured]
2009-02-12 22:34:42.784: [  OCRRAW][4143883968]propriogid:1: INVALID FORMAT
2009-02-12 22:34:42.784: [  OCRRAW][4143883968]propriogid:1: INVALID FORMAT
2009-02-12 22:34:42.784: [  OCRRAW][4143883968]proprioini: both disks are not OCR formatted
2009-02-12 22:34:42.785: [  OCRRAW][4143883968]proprinit: Could not open raw device
2009-02-12 22:34:42.785: [ default][4143883968]a_init:7!: Backend init unsuccessful : [26]
2009-02-12 22:34:42.796: [  OCRRAW][4143883968]propriogid:1: INVALID FORMAT
2009-02-12 22:34:42.797: [  OCRRAW][4143883968]propriogid:1: INVALID FORMAT
2009-02-12 22:34:42.797: [  OCRRAW][4143883968]ibctx:1:ERROR: INVALID FORMAT
2009-02-12 22:34:42.797: [  OCRRAW][4143883968]proprinit:problem reading the bootblock or superbloc 22

2009-02-12 22:34:42.809: [  OCRRAW][4143883968]propriogid:1: INVALID FORMAT
2009-02-12 22:34:42.809: [  OCRRAW][4143883968]propriogid:1: INVALID FORMAT
2009-02-12 22:34:42.820: [  OCRRAW][4143883968]propriowv: Vote information on disk 0 [/dev/raw/ocr01.dat] is adjusted from [0/0] to [1/2]
2009-02-12 22:34:42.820: [  OCRRAW][4143883968]propriowv: Vote information on disk 1 [/dev/raw/ocr02.dat] is adjusted from [0/0] to [1/2]
2009-02-12 22:34:42.839: [  OCRRAW][4143883968]propriniconfig:No 92 configuration
2009-02-12 22:34:42.839: [  OCRAPI][4143883968]a_init:6a: Backend init successful
2009-02-12 22:34:42.921: [ OCRCONF][4143883968]Initialized DATABASE keys in OCR
2009-02-12 22:34:43.038: [ OCRCONF][4143883968]Successfully set skgfr block 0
2009-02-12 22:34:43.038: [ OCRCONF][4143883968]Exiting [status=success]...

This install of clusterware completed successfully in spite of these messages.

9.  On the installer:

Use the softlink names, eg. /dev/raw/ocr01.dat, /dev/raw/css01.dat, etc.
Be sure to run the installer as "crs" if you are going to use a separate "crs" user to install clusterware.

10.  I didn't have any luck with the NFS mounted 3rd voting disk.  More work is needed in this area.  Why did it not work - it should have according to documentation.

11.  Setting up user equivalence (ssh without passwd)

Perms of /home/crs, asm, oracle, etc.  (must be 755 at top) :

-bash-3.00$ ls -al | egrep 'asm|oracle|crs'
drwxrwxr-x   8 crs        oinstall    4096 Feb 11 23:36 app
drwxr-xr-x   3 asm        oinstall    4096 Feb 11 22:04 asm
drwxr-xr-x   3 crs        oinstall    4096 Feb 12 23:56 crs  (used 755 up at this level.  worked.  775 will NOT work)
drwxr-xr-x   3 oracle     oinstall    4096 Feb 12 15:58 oracle
-bash-3.00$ pwd
/home
-bash-3.00$

Perms of .ssh directory and contents:

-bash-3.00$ ls -al
total 40
drwxr-xr-x   3 crs  oinstall 4096 Feb 12 23:56 .
drwxr-xr-x  14 root root     4096 Feb 11 21:27 ..
-rw-------   1 crs  oinstall 2806 Feb 12 23:56 .bash_history
-rw-r--r--   1 crs  oinstall  900 Feb 12 23:56 .bash_profile
-rwxr-xr--   1 root root      129 Feb 12 22:27 preinst_ck.sh
drwx------   2 crs  oinstall 4096 Feb 11 21:46 .ssh  (I used 700 for .ssh directory and that worked)
-rwxr-xr-x   1 crs  oinstall  155 Feb 11 22:14 test-cons.sh
-rwxr-xr-x   1 crs  oinstall 1532 Feb 12 21:42 uninstall_crs.sh
-rw-------   1 crs  oinstall  110 Feb 12 22:28 .Xauthority
-bash-3.00$ pwd
/home/crs

-bash-3.00$ ls -al
total 24
drwx------  2 crs oinstall 4096 Feb 11 21:46 .
drwxr-xr-x  3 crs oinstall 4096 Feb 12 23:56 ..
-rw-------  1 crs oinstall  446 Feb 11 21:47 authorized_keys
-rw-------  1 crs oinstall  883 Feb 11 21:45 id_rsa
-rw-------  1 crs oinstall  223 Feb 11 21:45 id_rsa.pub
-rw-r--r--  1 crs oinstall 1350 Feb 11 22:13 known_hosts
-bash-3.00$ pwd
/home/crs/.ssh  (all of these files have to be 600 I guess - anyway - it works at that setting)




Return to the board index.
Powered by MySQL Powered by PHP Stillman Real Consulting Portal (Ultra) | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!