Pages

Wednesday, April 21, 2010

11gR2: Migrating Oracle Cluster Registry from Oracle ASM to Other Types of Storage

The following are the steps to migrate OCR from Oracle ASM to OCFS2. According to "Clusterware Administration and Deployment Guide" (e10717.pdf) run /u01/app/11.2.0/grid/bin/ocrcheck to see the status of cluster registry. Then create a file (just touch it) under the preferred directory and set the right permissions. This is what I did as root user:

touch /u02/ocfs2/ocr/OCRFile
chown root.oinstall /u02/ocfs2/ocr/OCRFile
chmod 640 /u02/ocfs2/ocr/OCRFile

Then add your new OCR file to the final directory:

/u01/app/11.2.0/grid/bin/ocrconfig -add /u02/ocfs2/ocr/OCRFile

and check again the OCR status:

/uo1/app/11.2.0./grid/bin/ocrcheck






Now it's time to remove OCR file from ASM.

Nothing to do on second node.
That's all.

11gR2: Migrating Voting Disks from Oracle ASM to Other Types of Storage

The following are the steps to migrate voting disk from Oracle ASM to OCFS2. During these steps I found a problem already documented on metalink as a documentation bug, that is documentation is missing some informations.

Run

/u01/app/11.2.0/grid/bin/crsctl query css votedisk

to see the status and location of voting disk (in the following image it's the second command displayed just after ocrcheck command)


Create on the shared OCFS2 file system a directory where relocate the voting disk and set the right permissions. I've created ocr (useful for me for relocate also OCR file on OCFS2 file system) and css directories, owned by oracle:

chown -R oracle.oinstall css


Now it's time to run the following command (on the image below just look at the second command issued. On the first one I've missed to write the voting disk file name):

/u01/app/11.2.0/grid/bin/crsctl replace votedisk /u02/ocfs2/css/vdisk
but I received the following errors:
CRS-4256: Updating the profile
Failed to update the profile with the new discovery string
CRS-4000: Command Replace failed, or completed with errors.



And indeed the voting disk is still on Oracle ASM


Under css directory, a file was created. Having a look on permissions granted on that vdisk file... we can see it's owned by oracle.root.



Delete that file, create a new empty one (just touch it) and grant the following permissions:

chown oracle.oinstall vdisk



Using the previous command it's finally able to replace the voting disk.


Now you can see that the new voting disk is relocated on file system


That's all.