lower case or UPPER CASE hostname in RAC?

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……….

关注dbDao.com的新浪微博

扫码关注dbDao.com 微信公众号:

Speak Your Mind

TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569