lower case or UPPER CASE hostname in RAC?

作者: Maclean Liu , post on October 28th, 2010 , English Version
【本站文章除注明转载外,均为本站原创编译】
转载请注明:文章转载自: Oracle Clinic – Maclean Liu的个人技术博客 [http://www.oracledatabase12g.com/]
本文标题: lower case or UPPER CASE hostname in RAC?
本文永久地址: http://www.oracledatabase12g.com/archives/lower-case-or-upper-case-hostname-in-rac.html

RAC中各节点的hostname是设成大写(UPPER CASE)形式还是小写(lower case)形式好呢?
一开始被这个问题问得有些莫名?之后觉得一切都有必要让事实说话,回顾一下我们使用RAC的惨痛经历便见分晓:

Bug 5168043If node names supplied in VIPCA silent mode are uppercase, VIPCA causes the following error:
Invalid node name "" entered in an input argument.
Workaround   Use VIPCA GUI mode.
Oracle Versions confirmed as being affected - 10203 ( fixed in 10.2.0.4)
PROBLEM:
--------
Env 3 node 10.2.0.1 AIX 5L 

During installation of CRS, root.sh gives "Invalid node name"
error if hostname is written in Capital letters in /etc/hosts.

 # root.sh
  WARNING: directory '/oracle' is not owned by root
  Checking to see if Oracle CRS stack is already configured

  clscfg: version 3 is 10G Release 2.
  Successfully accumulated necessary OCR keys.
  Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
  node : 

  clscfg: Arguments check out successfully.

  Expecting the CRS daemons to be up within 600 seconds.
  CSS is active on these nodes.
  CSS is active on all nodes.
  Waiting for the Oracle CRSD and EVMD to start
  Oracle CRS stack installed and running under init(1M)
  Running vipca(silent) for configuring nodeapps

DIAGNOSTIC ANALYSIS:
--------------------

We can reproduce the error if we issue vipca like below.

$ORA_CRS_HOME/bin/vipca -silent -nodelist {CAPITAL1},{CAPITAL2}  \
  -nodevips {CAPITAL1}/{CAPITALV1}/255.255.252.0/eth0, \
            {CAPITAL2}/{CAPITALV2}/255.255.252.0/eth0
 Invalid node name "{CAPITAL1}" entered in an input argument.
 Invalid node name "{CAPITAL1}" entered in an input argument.

WORKAROUND:
-----------
- do not write capital letters in /etc/hosts
- use vipca(GUI) and configure VIP resource afterwards.

RELATED BUGS:
-------------
BUG#4632899 solaris port specific bug regarding capital letters.
            May not be related with vipca.

REPRODUCIBILITY:
----------------
100% in 10.2.0.1 AIX
100% in 10.2.0.1 Linux

Bug 4632899 CSS does not start on Solaris if the hostname is in upper case.
 The following errors might be noticed when using CRS scripts:
  Failure at scls_scr_create with code 1
  Category: 1234
  Operation: scls_scr_create
  Location: mkdir
  Other: Unable to make user dir
  Dep: 2

Workaround
  Change the hostname to from uppercase to lower case.
Versions confirmed as being affected - 10203 ( Issue fixed in 11.1.0.6)
PROBLEM STATEMENT:
------------------
The localconfig script fails to startup the CSS in single instance
configuration if the hostname of the server contains capital letters.

Errors encountered :
===
Failure at scls_scr_create with code 1
Internal Error Information:
  Category: 1234
  Operation: scls_scr_create
  Location: mkdir
  Other: Unable to make user dir
  Dep: 2
===

Bug 6674075: RAC: PRKR-1078 FROM SRVCTL MODIFY DATABASE WITH UPPER CASE DB NAME

PROBLEM:
--------
Two Node RAC running 10.2.0.3 CRS,ASM and RDBMS.
Customer has installed another 10.2.0.3 home for RDBMS and trying to change
the oracle home for the existing database.

We ran the "srvctl modify" command from both existing and the new oracle
homes (both are 10.2.0.3) and got the same PRKR-1078 error.

The entry for the CONFIG_VERSION looks okay in the OCR.

DIAGNOSTIC ANALYSIS:
--------------------
The entries for the database JUNK and two instances in the OCR looks okay and
the DATABASE.DATABASES.JUNK.CONFIG_VERSION 10.2:

from the OCRDUMP:
=========================
[DATABASE.DATABASES.junk.CONFIG_VERSION]
ORATEXT : 10.2.0.0.0
========================

from the srvm_trace of srvctl modify :
==========================
[main] [12:55:59:677] [has.ClusterLockNative.Native]  prsr_trace: Native:
acquire: get mutext SRVM.DATABASE.DATABASES.junk

[main] [12:55:59:678] [has.ClusterLockNative.Native]  prsr_trace: Native:
acquire: ret=0

[main] [12:55:59:679] [ClusterLock.acquire:127]  Acquire returned nr=true
status=true
[main] [12:55:59:679] [OCR.keyExists:664]
OCR.keyExists(DATABASE.DATABASES.JUNK.CONFIG_VERSION)
[main] [12:55:59:679] [nativesystem.OCRNative.Native]  keyExists: calling
procr_open_key(DATABASE.DATABASES.JUNK.CONFIG_VERSION)

[main] [12:55:59:694] [nativesystem.OCRNative.Native]  keyExists:
procr_open_key retval = 4 

[main] [12:55:59:694] [OCRTree.setDBOracleHome:1572]  DATABASE.DATABASES.junk
incompatible version
[main] [12:55:59:729] [OCRTree.setDBOracleHome:1587]  Releasing exclusive
lock SRVM.DATABASE.DATABASES.junk
[main] [12:55:59:729] [has.ClusterLockNative.Native]  prsr_trace: Native:
unlock

PRKR-1078 : Database JUNK cannot be administered using current version of
srvctl. Instead run srvctl from /oracle/product/10.2.0/db0
=====================

Bug 7560908: CANN'T START SERVICES ,IF ITS INSTANCES REGISTERD WITH NODE NOME IN UPPER CASE
PROBLEM:
--------
- If we try to start service we got the following errors 

oracle@RZ-DB-44:~> srvctl start service -d db1 -s srv1
PRKP-1030 : Failed to start the service srv1.
CRS-1007: Failed after successful dependency consideration
CRS-0223: Resource 'ora.db.srv1.cs' has placement error.

As per Note 372145.1 - Service start fails with CRS-1030 Crs-1007 Crs-0223 

we delete the services and the database resource and its instances ,then we
add the database again but at this time we add the database instance node
name with lower case ,as it was in upper case ,

- after that we are able to start the database instance
.......................

答案很简单,lower case好于UPPER CASE!不仅仅是hostname,使用大写的rac资源(resource)在某些版本中也可能引发bug!当你在设计RAC系统是有必要把大小写这一问题考虑进去,事实上我相信大多数人和我一样喜欢使用小写字母加数字的形式,譬如我的rh1,rh2,rh3……….

© 2010, www.oracledatabase12g.com. 版权所有.文章允许转载,但必须以链接方式注明源地址,否则追究法律责任.

相关文章 | Related posts:

  1. Case Study: Analyzing 10053 Trace Files
  2. Lower Storage Costs by 10x with Oracle Database 11g
  3. Ignore gsd resource failed to start above 10g
  4. Know about RAC Clusterware Process OPROCD
  5. Creating a RAC Physical Standby for a RAC Primary
  6. Adding a Node To 10gR2 RAC cluster
  7. Data Gathering for Troubleshooting RAC Issues
  8. What’s preconnect.svc in 11g RAC?

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>