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.

About these ads