Showing posts with label RHEL. Show all posts
Showing posts with label RHEL. Show all posts

Tuesday, 12 August 2014

Setting up slewing NTP option in Linux for Oracle Database

Many times while installing/configuring Oracle Cluster, DBA’s  receive the following error message.
Checking NTP daemon command line for slewing option “-x”Check: NTP daemon command line
Node Name                     Slewing Option Set?  ————————————  ————————
vcsnode1                         no
vcsnode2                         no
Result:NTP daemon slewing option check failed on some nodes PRVF-5436 : The NTP daemon running on one or more nodes lacks the slewing option “-x”Result: Clock synchronization check using Network Time Protocol(NTP) failed
To fix this error, slewing needs to be configured.
Follow the below steps to configure slewing in Linux.
  • Stop ntpd daemon using the following command.
[root@vcsnode1 ~]# service ntpd stop
Shutting down ntpd:                                        [  OK  ]
[root@vcsnode1 ~]#
  • Edit /etc/sysconfig/ntpd file.  Usually the file looks as given below.
[root@vcsnode1 sysconfig]# cat ntpd
# Drop root to id ‘ntp:ntp’ by default.
OPTIONS=”-u ntp:ntp -p /var/run/ntpd.pid”
# Set to ‘yes’ to sync hw clock after successful ntpdate
SYNC_HWCLOCK=no
[root@vcsnode1 sysconfig]#
  • Edit the file and add “-x” to  ”OPTIONS=”-u ntp:ntp -p /var/run/ntpd.pid”" line befor e”-u”
  • After editing the file, the contents should look like given below
[root@vcsnode1 sysconfig]# cat ntpd
# Drop root to id ‘ntp:ntp’ by default.
OPTIONS=”-x -u ntp:ntp -p /var/run/ntpd.pid”
# Set to ‘yes’ to sync hw clock after successful ntpdate
SYNC_HWCLOCK=no
[root@vcsnode1 sysconfig]#
  • Start ntpd daemon using the following command
[root@VCSNode2 ~]# service ntpd start
Starting ntpd:                                             [  OK  ]
[root@VCSNode2 ~]#

  • Ask the DBA to install/proceed to configure Oracle Cluster

Thursday, 7 August 2014

How to configure Raw Disks in RHEL 5 for Oracle11g udev

The following is to change the owner, group and permissions for raw devices used for Oracle RAC.
Create a file called /etc/udev/rules.d/65-raw-permissions.rules with these contents:
#Set permissions of raw bindings to Oracle Clusterware devices
KERNEL=="raw1", OWNER="root", GROUP="oinstall", MODE="640"
KERNEL=="raw2", OWNER="root", GROUP="oinstall", MODE="640"
KERNEL=="raw3", OWNER="oracle", GROUP="oinstall", MODE="640"
KERNEL=="raw4", OWNER="oracle", GROUP="oinstall", MODE="640"
KERNEL=="raw5", OWNER="oracle", GROUP="oinstall", MODE="640"

Test executing:
udevtest /class/raw/raw1
It should show something like:
udevtest /class/raw/raw1
main: looking at device '/class/raw/raw1' from subsystem 'raw'
udev_rules_get_name: rule applied, 'raw1' becomes 'raw/raw1'
udev_device_event: device '/class/raw/raw1' already in database, validate currently present symlinks
udev_node_add: creating device node '/dev/raw/raw1', major = '162', minor = '1', mode = '0640', uid = '0', gid = '600'
main: run: 'socket:/org/kernel/udev/monitor'
main: run: '/lib/udev/udev_run_devd'
main: run: 'socket:/org/freedesktop/hal/udev_event'
main: run: '/sbin/pam_console_apply /dev/raw/raw1 '

To apply the rules run:
# start_udev
Starting udev:                           [  OK  ]

References:
http://www.oracleflash.com/7/How-to-configure-Raw-Disks-in-RHEL-5.html
http://www.ardentperf.com/2008/02/13/oracle-clusterware-on-rhel5oel5-with-udev-and-multipath/

Saturday, 1 March 2014

Procedure to upgrade Linux 6.1 to 6.4 without CD from a local repository

We are doing an upgrade of RHEL 6.1 to 6.4. It is applicable to other versions and distributions like CentOS.
1) Create a local repository to have all the packages of the new version available.
Create a file called /etc/yum.repos.d/server64.repo with the following contents:
[server64x64]
name=Red Hat Enterprise Linux 6.4 x64
baseurl=ftp://ftprepo.domain.local/RHEL/rhel64x64/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

2) Verify what is the current running version and kernel.
# uname -a
Linux SERVER1.domain.local 2.6.32-131.0.15.el6.x86_64 #1 SMP Tue May 10 15:42:40 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.1 (Santiago)

3) List the available packages and specially the kernel version. Limit yum to use the new repository only.
yum --disablerepo="*" --enablerepo="server64x64" list available
yum --disablerepo="*" --enablerepo="server64x64" list kernel

4) Run the update command and wait it for completion.
For interactive mode, when questions have to be answered to proceed with the update, use:
yum --disablerepo="*" --enablerepo="server64x64" update
For automated mode, assuming all questions will be answered as “yes”, use:
yum –y --disablerepo="*" --enablerepo="server64x64" update

Example of what will be presented on the screen:
Transaction Summary
================================================================================
Install      21 Package(s)
Upgrade     278 Package(s)

Total download size: 224 M
Is this ok [y/N]:

Replaced:
  abrt-plugin-logger.x86_64 0:1.1.16-3.el6
  abrt-plugin-mailx.x86_64 0:1.1.16-3.el6
  abrt-plugin-rhtsupport.x86_64 0:1.1.16-3.el6
  abrt-plugin-sosreport.x86_64 0:1.1.16-3.el6
  libjpeg.x86_64 0:6b-46.el6

Complete!

5) Verify the new version of the OS
# uname -a
Linux SERVER1.domain.local 2.6.32-131.0.15.el6.x86_64 #1 SMP Tue May 10 15:42:40 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
#cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.4 (Santiago)

6) Reboot to finish the process and to allow the new kernel and configuration be activated.

PS: RHEL 6.4 ships samba version 3.6. It has different configuration parameters in /etc/samba/smb.conf file when doing authentication thru AD.
Below are the required changes:

Before:

;    idmap uid = 10000-20000
;    idmap gid = 10000-20000
;    idmap backend = rid:DOMAIN=10000-20000

After:

    idmap config * : backend = tdb
    idmap config * : range = 20001-30000
    idmap config DOMAIN : backend = rid
    idmap config DOMAIN : range = 10000-20000
    idmap config DOMAIN : base_rid = 0

(Replace DOMAIN with the short name of your domain name)

7) End