Oracle RAC and the NTP process

If you are installing Oracle Clusterware on a Linux or UNIX machine, the following error may occur if you have not turned on Slewing:

PRVF-5439: NTP daemon does not have slewing option “-x” set on the node

The following procedure will remedy this problem, as demonstrated in a RHEL 5.4 environment.

1. Logon to your Oracle cluster node as the root user

2. Open the file /etc/sysconfig/ntpd and ensuring that the line


OPTIONS=”-u ntp:ntp -p /var/run/ntpd.pid -x”

3. If the line does not contain the –x option, edit the file so it reads as above.

4. Then stop the service as below, with the command /sbin/service ntpd stop


[root@mylinux1 ~]# /sbin/service ntpd stop
Shutting down ntpd: [ OK ]

5. Restart the service as below, with the command /sbin/service ntpd start


[root@mylinux1 ~]# /sbin/service ntpd start
ntpd: Synchronizing with time server: [ OK ]
Starting ntpd: [ OK ]
[root@mylinux1 ~]#

6. Verify that the –x option has been implemented, with the command ps –ef|grep ntp


[root@mylinux1 ~]# ps -ef|grep ntp
ntp 8301 1 0 20:33 ? 00:00:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -x
root 8792 28965 0 20:34 pts/1 00:00:00 grep ntp
[root@mylinux1 ~]#

This completes turning the NTPD slewing option on for Oracle clusteware.

Larry J. Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com

Formatting of OCFS2 Shared Storage

The Oracle OCFS2 file system can be used to format shared storage for multiple node access. To accomplish this task, OCFS2 rpm must be installed and configured. Below is the procedure for preparing the shared disks for use, once OCFS2 has been installed and configured.

1. Logon to one of your Oracle servers as the root user.

2. Locate the shared storage presented in the directory /dev/mapper on both nodes.

-mylinux1
[root@mylinux1 ~]# ll /dev/mapper
total 0
crw——- 1 root root 10, 63 Jan 22 17:44 control
brw-rw—- 1 root disk 253, 3 Jan 22 17:45 DATA-50GB-02
brw-rw—- 1 root disk 253, 8 Jan 22 17:45 DATA-50GB-03
brw-rw—- 1 root disk 253, 1 Jan 22 17:45 VOTE-1GB-05
brw-rw—- 1 root disk 253, 2 Jan 22 17:45 VOTE-1GB-06
brw-rw—- 1 root disk 253, 4 Jan 22 17:45 HOME-50GB-02
[root@mylinux1 ~]#

-mylinux2
[root@mylinux2 ~]# ll /dev/mapper
total 0
crw——- 1 root root 10, 63 Jan 22 17:44 control
brw-rw—- 1 root disk 253, 3 Jan 22 17:45 DATA-50GB-02
brw-rw—- 1 root disk 253, 8 Jan 22 17:45 DATA-50GB-03
brw-rw—- 1 root disk 253, 1 Jan 22 17:45 VOTE-1GB-05
brw-rw—- 1 root disk 253, 2 Jan 22 17:45 VOTE-1GB-06
brw-rw—- 1 root disk 253, 4 Jan 22 17:45 HOME-50GB-03
[root@mylinux2 ~]#

3. The shared storage will be mounted on each node of the RAC. In this example our shared storage includes the following:


/dev/mapper/DATA-50GB-02
/dev/mapper/DATA-50GB-03
/dev/mapper/VOTE-1GB-05
/dev/mapper/VOTE-1GB-06

4. As the root user, format each shared storage device with the following command: NOTE: formatting of the share disks is only performed on a single node, repeating on additional nodes will destroy all information.

Example:

/sbin/mkfs.ocfs2 /dev/mapper/DATA-50GB-02

[root@mylinux1 ~]# /sbin/mkfs.ocfs2 /dev/mapper/DATA-50GB-02
mkfs.ocfs2 1.4.4
Cluster stack: classic o2cb
Overwriting existing ocfs2 partition.
Proceed (y/N): y
Label:
Features: sparse backup-super unwritten inline-data strict-journal-super
Block size: 2048 (11 bits)
Cluster size: 4096 (12 bits)
Volume size: 1069252608 (261048 clusters) (522096 blocks)
Cluster groups: 17 (tail covers 7096 clusters, rest cover 15872 clusters)
Extent allocator size: 4194304 (1 groups)
Journal size: 33554432
Node slots: 2
Creating bitmaps: done
Initializing superblock: done
Writing system files: done
Writing superblock: done
Writing backup superblock: 0 block(s)
Formatting Journals: done
Growing extent allocator: done
Formatting slot map: done
Writing lost+found: done
mkfs.ocfs2 successful

[root@mylinux1 ~]#

This procedure is repeated for each shared storage device.

Larry J. Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com

CRS-4640 and CRS-4000 during execution of root.sh

The following procedure will help in resolving error CRS-4640 and CRS-4000 during the execution of root.sh script in the installation of Oracle 11g clusteware.

ERROR:
Adding daemon to inittab
CRS-4640: Oracle High Availability Services is already active
CRS-4000: Command Start failed, or completed with errors.
ohasd failed to start: Inappropriate ioctl for device
ohasd failed to start at /u01/app/11.2.0/grid/crs/install/rootcrs.pl line 443.
[root@mylinux1 grid]#

CAUSE: Previous install of clusterware not properly removed.

FIX:

1. Execute the script $CRS_HOME/crs/install/rootcrs.pl -deconfig -force

[root@mylinux1 install]# ./rootcrs.pl -deconfig -force
2010-04-1515:43:23: Parsing the host name
2010-04-1515:43:23: Checking for super user privileges
2010-04-1515:43:23: User has super user privileges
Using configuration parameter file: ./crsconfig_params
PRCR-1035 : Failed to look up CRS resource ora.cluster_vip.type for 1
PRCR-1068 : Failed to query resources
Cannot communicate with crsd
PRCR-1070 : Failed to check if resource ora.gsd is registered
Cannot communicate with crsd
PRCR-1070 : Failed to check if resource ora.ons is registered
Cannot communicate with crsd
PRCR-1070 : Failed to check if resource ora.eons is registered
Cannot communicate with crsd

ACFS-9200: Supported
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4000: Command Stop failed, or completed with errors.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘mylinux1’
CRS-2673: Attempting to stop ‘ora.cssdmonitor’ on ‘mylinux1’
CRS-2673: Attempting to stop ‘ora.evmd’ on ‘mylinux1’
CRS-2673: Attempting to stop ‘ora.mdnsd’ on ‘mylinux1’
CRS-2673: Attempting to stop ‘ora.gpnpd’ on ‘mylinux1’
CRS-2677: Stop of ‘ora.cssdmonitor’ on ‘mylinux1’ succeeded
CRS-2677: Stop of ‘ora.mdnsd’ on ‘mylinux1’ succeeded
CRS-2677: Stop of ‘ora.evmd’ on ‘mylinux1’ succeeded
CRS-2677: Stop of ‘ora.gpnpd’ on ‘mylinux1’ succeeded
CRS-2673: Attempting to stop ‘ora.gipcd’ on ‘mylinux1’
CRS-2677: Stop of ‘ora.gipcd’ on ‘mylinux1’ succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘mylinux1’ has completed
CRS-4133: Oracle High Availability Services has been stopped.
Successfully deconfigured Oracle clusterware stack on this node
[root@mylinux1 install]#

2. Once you have received the message “Successfully deconfigured Oracle clusterware”, then you can re-execute the shell script $CRS_HOME/root.sh

[root@mylinux1 grid]# ./root.sh
…
…
…
…
Configure Oracle Grid Infrastructure for a Cluster … succeeded
Updating inventory properties for clusterware
Starting Oracle Universal Installer…

Checking swap space: must be greater than 500 MB. Actual 17625 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
‘UpdateNodeList’ was successful.
[root@mylinux1 grid]#

This completes the resolution to Oracle clusterware errors CRS-4640 and CRS-4000 during the execution of root.sh.

Larry J. Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com

Creation of Oracle OS accounts for 11g RAC install on Linux

Deployment of Oracle software requires the creation of multiple groups and users on UNIX and Linux servers to properly configure and administrate. This procedure covers the basic creation of Oracle groups and users for a standard 11g RAC implementation.

1. Create group accounts on all nodes: NOTE: id must be exactly the same

/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 504 asmadmin
/usr/sbin/groupadd -g 506 asmdba
/usr/sbin/groupadd -g 507 asmoper

2. Create user accounts on all nodes: NOTE: id must be exactly the same

/usr/sbin/useradd -u 501 -g oinstall -G asmadmin,asmdba,asmoper grid
/usr/sbin/useradd -u 502 -g oinstall -G dba,asmdba oracle

3. Set password for GRID and ORACLE account to be the same on every node.

passwd oracle
Changing password for user oracle.
New UNIX password: password
retype new UNIX password: password
passwd: all authentication tokens updated successfully.
passwd grid
Changing password for user oracle.
New UNIX password: password
retype new UNIX password: password
passwd: all authentication tokens updated successfully.

This completes the standard configuration creation of Oracle groups and users on Linux.

Larry Catt, OCP 9i, 10g
oracle@allcompute.com
www.allcompute.com