Saturday, June 16, 2007

Unistall Oracle Clusterware+ASM+ASMLib+Database 10.2.0.2

Hi,
This week I've installed Oracle RAC + ASM + ASMLib on RHEL4 (update 5), and it was exhausting!
I've done the linux administration part of the installation, but I also participated in the Oracle aspect.
Well, the first thing that I would like to talk about is the oracle Clusterware voting & CRS disks,
Oracle Clusterware needs raw access to the disks, also, specific privileges on the raw devices.
Linux raw devices are deprecated! The other way to do this job is that the application will open the devices with O_DIRECT. Oracle database supports O_DIRECT by using OCFS or ASM with ASMLib but not for the Clusterware disks.

So we will need to use raw devices if we are using RAC with Oracle Clusterware.
The problem with the raw devices is:
- It's deprecated
- Need to create the devices on every boot and change the devices permissions for oracle usage
- depends on the device name (sda, sdb...)

Why depending on the device name is a problem? Because there is no way to assure that the device sda will still be sda after reboot or after storage changes (Ex. adding a new disk).

Well, the way to do all of this and assure that the Clusterware will load and start the instances is:
- Use Udev to map the devices name to be something like /dev/vote1, /dev/ocr1
- Use Udev to change the raw device privileges on boot
- Use /etc/sysconfig/rawdevices file to create the raw devices when the server starts

One more thing is the cluvfy script in the Clusterware installation disk, the script is good for RHEL3 and partially for RHEL4, the last step of the script is to check the rpms needed by the installation, the rpm list is for RHEL3 and not for RHEL4 so you can ignore this check and start the installation.

The other thing is the uninstall of the Oracle Clusterware, the way to fully uninstall oracle is:
- Run the universal installer to uninstall the software for the database, ASM and Clusterware.
- Manually remove the files remains in the installation directories ($ORACLE_HOME, $ASM_HOME & $CRS_HOME).
- remove /etc/oracle directory.
- remove "/etc/oratab".
- remove "/etc/oraInst.loc".
- remove "/etc/crstab*".
- remove "/etc/init.d/init.*".
- edit /etc/inittab and remove the lines oracle added (usually 3 lines at the end).
- remove the ASM disks using "/etc/init.d/oracleasm deletedisk".
- For the finale dd the first 50MB of the voting disks and the crs disks (Without this the cluster will use the old configuration!!).
- Just to make sure also dd the first 50MB of the ASM disks.

After that you can start the installation again...

Oded.

2 comments:

Axel Paratre said...

Hi,

could you just print an example of dd commands because I can't find some example. I try to reinstall clusterware and I need to clean disks.

Thanks for help.

Anonymous said...

you have a nice site. thanks for sharing this valuable resources. keep it up. anyway, various kinds of ebooks are available here

http://feboook.blogspot.com