February 14, 2009

ASM Discovery String in Linux plus Database Compatibility and Setting up OCR and Voting Disk with OCFS2

Having trouble finding the ASM disks that you have previously added but neither DBCA nor the ASM disk finder can't dough them out of wherever they are? And do you use Linux?

If you are using ASMlib disks properly and previously added just use as a Discovery String for your new Disk Group the following string:
/dev/oracleasm/disks/*

Just like that: no quoting. If this doesn't find your disks probably you haven't added the disks correctly. Search for another post in this site about how to add a ASMlib disk in Linux.

As for Database Compatibility you may also find the next lines very useful.

Scenario:
You have two 10g databases in two different Oracle Homes and only one ASM 10g instance (in its own Oracle Home).

You need to:
Upgrade one of the databases to 11g keeping the same ASM

Follow the instructions on this simple document to make sure you don't blow your storage to pieces:

ASM and Oracle11g version support

When upgrading a 10.2.0.1 to 10.2.0.4 and you have ASM you might need to know that if ASM and RDBMS are on different ORACLE HOMEs, you must first upgrade the RDBMS Oracle Home and then the ASM Oracle Home.

Now for Setting up OCR and Voting Disk with OCFS2

Many people use ASM for database common storage on a RAC but preffer OCFS for OCR and Voting disk instead of raw devices. For those people here's the steps needed to take on setting up this scenario on a Linux box (all commands ran as root):

1) Install OCFS2 (get it from the OCFS2 Site) on each node and set it up acording to this manual.

2) Create the mount point directory on each node:
mkdir /OCFS2_mountpoint/

3) From one node format the partition "/dev/sdb1" with this FS format:
mkfs.ocfs2 -b 4K -C 32K -N 4 -L /OCFS2_mountpoint /dev/sdb1

4) On each node mount the partition and edit the "/etc/fstab" file so it can mount on boot:
mount -t ocfs2 -o datavolume,nointr /dev/sdb1 /OCFS2_mountpoint

in /etc/fstab file add the following line:


/dev/sdb1   /OCFS2_mountpoint    ocfs2 _netdev,datavolume,nointr 0 0

5) From one node create the common directory for the CRS files:
mkdir /OCFS2_mountpoint/oracrs

6) From one node set up permissions:
chown oracle:oinstall /OCFS2_mountpoint/oracrs
chmod 775 /OCFS2_mountpoint/oracrs

7) Fill on the files with 100MB for OCR and 20MB for voting disk (do this command as "oracle" user):
dd if=/dev/zero of=/OCFS2_mountpoint/oracrs/votingdisk bs=8192 count=2560
dd if=/dev/zero of=/OCFS2_mountpoint/oracrs/ocrfile bs=8192 count=12800

On Linux 5.x (Tikanga) the key point of doing it for 10g engine is the "nointr" flag used when mounting.

No comments:

Post a Comment