SunE5500 Soalris7下Legato HA+环境的配置实例

发表于:2007-06-09来源:作者:点击数: 标签:
SunSoa lr is7下LegatoHA+环境的实例 (S7+Vxvm+Vxfs+LegatoHA+ Oracle 920+Informix921) 硬件环境: SunE5500两台,每台带两个18.2G的硬盘;1G内存 SunA5100两套,每套内带5个36.4G的光纤盘 软件环境: LegatoHA+2.2,VeritasVolumeManager3.1VeritasFileSy

Sun Soalris7下Legato HA+环境的实例
(S7+Vxvm +Vxfs+Legato HA+Oracle920+Informix921)
硬件环境:
Sun E5500 两台,每台带两个18.2G的硬盘;1G内存
Sun A5100 两套,每套内带5个36.4G的光纤盘
软件环境:
Legato HA+2.2,Veritas Volume Manager 3.1 Veritas File System 3.3.3 Solaris7

时间匆促,不对之处敬请指点,谢谢。

1, 首先安装的是操作系统
基本的安装细节这里应该不用再提,不过有一点要注意一下,在定制安装到详细分区这一步时,应预留一些空间给veritas使用,高手介绍至少要4个cylinder,10M的空间。
2, 安装完操作系统后的第一步是打Recommended包,具体细节也不详谈
3, 到这一步,可以安装veritas volume manager 3.1了,把安装光盘放进cdrom,系统会自动mount上设备的,
#cd /cdrom/cdrom0/Solarsi_7/pkgs
#pkgadd –d VRTSvmdev VRTSvmsa VRTSvxfs VRTSvxvm(也可全部选择安装)
一路按提示回车,选择缺省值即可。这里会有提示说明安装成功。
#sync;sync;reboot(这一步要不要呢,还不清楚,至少系统没有提示要重启)

安装上述软件后,就要打Veritas软件的补丁了,这里要打的补丁是如下几个:
109298-02.zip  Veritas FileSystem 3.3.3 :Veritas FileSystem multiple fixes patch

110438-01.zip  VxFS File System 3.3.3 patch01:fsck for file systems grown beyond 2Gb

110254-04.zip Volume Manager 3.1 DMP ,patch 110254-04,appears to have caused a system panic
至于还有没有其他的补丁,我也不知道,可能这几个就可以的,这些补丁要有帐号才能进去下载的,我也没有帐号。不过有已经下载好的了,如果谁有需要,请mail:stdxzclearcase/" target="_blank" >cc@21cn.com.
#for i in `ls *.zip`
>do
>unzip $i 
>done
#patchadd 109298-02 110438-01 110254-04

打完补丁后,要重启机器
#sync;sync;reboot

重启后,要输入Veritas Volume Manager的license:
#vxlicense –c
 89898989898989898989 (VXFS)
#vxlicense –c
 78787878787878787878   (VXVM)
#vxlicense –c
 67676767676767676767   (RAID)
每输入一个正确的license后,都会提示安装正确,或者运行
#vxlicense –p
如果提示没有过期的时间,也表示license正确。
输入正确的license号之后,要做的第一步工作是封装根系统盘,也即是要将根磁盘置于Volume Manager 控制之下,运行
#vxinstall

  VxVM uses license keys to control access.  If you have a SPARCstorage
  Array (SSA) controller or a Sun Enterprise Network Array (SENA) controller 
  attached to your system, then VxVM will grant you a limited use license 
  automatically.  The SSA and/or SENA license grants you unrestricted use 
  of disks attached to an SSA or SENA controller, but disallows striping,
  RAID-5, and DMP on non-SSA and non-SENA disks.  If you are not running an
  SSA or SENA controller, then you must obtain a license key to operate.

  Licensing information:
    System host ID: 80e1c72c
    Host type: SUNW,Ultra-Enterprise
    SPARCstorage Array or Sun Enterprise Network Array: No arrays found

Some licenses are already installed.  Do you wish to review them

Volume Manager Installation
Menu: VolumeManager/Install

  The Volume Manager names disks on your system using the controller
  and disk number of the disk, substituting them into the following
  pattern:

        c<controller>t<disk>d<disk>

  If the Multipathing driver is installed on the system then for the
  disk devices with multiple access paths, the controller number
  represents a multipath pseudo controller number. For example, if a
  disk has 2 paths from controllers c0 and c1, then the Volume Manager
  displays only one of them such as c0 to represent both the
  controllers.

  Some examples would be:

        c0t0d0  - first controller, first target, first disk
        c1t0d0  - second controller, first target, first disk
        c1t1d0  - second controller, second target, first disk

  The Volume Manager has detected the following controllers on your system:

        c1: 

Hit RETURN to continue.

Volume Manager Installation
Menu: VolumeManager/Install

  You will now be asked if you wish to use Quick Installation or
  Custom Installation.  Custom Installation allows you to select how
  the Volume Manager will handle the installation of each disk
  attached to your system.

  Quick Installation examines each disk attached to your system and
  attempts to create volumes to cover all disk partitions that might
  be used for file systems or for other similar purposes.

  If you do not wish to use some disks with the Volume Manager, or if
  you wish to reinitialize some disks, use the Custom Installation
  option Otherwise, we suggest that you use the Quick Installation
  option.
Hit RETURN to continue.

Volume Manager Installation Options
Menu: VolumeManager/Install

 1      Quick Installation
 2      Custom Installation

 ?      Display help about menu
 ??     Display help about the menuing system
 q      Exit from menus

Select an operation to perform: 2

这里选择定制安装,详细提示如下:

Volume Manager Custom Installation
Menu: VolumeManager/Install/Custom

  The c1t10d0 disk is your Boot Disk.  You can not add it as a new
  disk.  If you encapsulate it, you will make your root file system
  and other system areas on the Boot Disk into volumes.  This is
  required if you wish to mirror your root file system or system
  swap area.

Encapsulate Boot Disk [y,n,q,?] (default: n) y
这里选择封装系统盘,系统数据不会丢失,如果不选择封装的话,只能初始化,会破坏数据的,这样的知安装就没有意思了。
Enter disk name for  [<name>,q,?] (default: rootdisk) 
这里一般选择缺省的磁盘名

  The c1t10d0 disk has been configured for encapsulation.

Hit RETURN to continue.

Volume Manager Custom Installation
Menu: VolumeManager/Install/Custom/c1
Generating list of attached disks on c1....

<excluding root disk c1t10d0>
 
  The Volume Manager has detected the following disks on controller c1:

  c1t11d0

Hit RETURN to continue.

Installation options for controller c1
Menu: VolumeManager/Install/Custom/c1

 1      Install all disks as pre-existing disks. (encapsulate)
 2      Install all disks as new disks. (discards data on disks!)
 3      Install one disk at a time.
 4      Leave these disks alone.

 ?      Display help about menu
 ??     Display help about the menuing system
 q      Exit from menus

Select an operation to perform: 2
这里选择2,是把另一个系统盘封装到rootdg里

Volume Manager Custom Installation
Menu: VolumeManager/Install/Custom/c1/Init

Use default disk names for these disks? [y,n,q,?] (default: y) 
使用缺少的磁盘名。
  The c1t11d0 disk will be given disk name disk01

Hit RETURN to continue.

Volume Manager Custom Installation
Menu: VolumeManager/Install/Custom

  The following is a summary of your choices.

        c1t10d0 Encapsulate
        c1t11d0 New Disk


Is this correct [y,n,q,?] (default: y) y
The system now must be shut down and rebooted in order to continue
the reconfiguration.

Shutdown and reboot now [y,n,q,?] (default: n) y
提示重启,这里要重启一下。

注:如果你的磁盘阵列已经连接上主机,这一步会比较久,建议在安装完Veritas Volume Managers,并封装好系统盘,做好像后再连接上磁盘阵列,还有就是要注意,如果在安装操作系统时,所有的节点要么都接上磁盘阵列,要么都不接上磁盘阵列,因为如果不是这样的话,会导致磁盘阵列的控制器号将不一致。运行完这条命令后系统会提示重启,重启后还要做整个系统盘的镜像,有两条命令,运行
#/etc/vx/bin/vxrootmir disk01  (做root区)
   #/etc/vx/bin/vxmirror rootdisk disk01  (swap ,/usr, 等非root分区)
做完这一步后,重启一下机器,
#sync;sync;reboot
在重启时可把A5100等接上已安装好Volume Manager的主机,接着下来要做的是创建raid,diskgroup,volume和file system了,运行
#/opt/VRTSvmsa/bin/vmsa& 
进入Veritas Volume Manager Storage Administor图形管理界面,输入超级用户密码,进入图形管理界面,选择磁盘,做dg,具体做法这里也说不清,反正很容易做的。有些步骤也可用命令行进行,如下所示:
#vxdctl enable
#vxdg import datadg
#vxvol –g datadg startall
#mkfs –F vxfs –o largefiles /dev/vc/rdsk/dgname/volname
#mount –F vxfs /mountpoint
到此步,可在另一个终端运行以下命令,以查看磁盘读写速度
#iostat –xn 3 并能初步估算出做完此步大概的时间。

(这一步,一般都要比较长的时间,这时可以重装另一台机的操作系统,打补丁,安装Volume Manager等,跟第一台机的步骤一样,至少要做到这一步,但是做raid,dg,volume,fs等步骤却不用做了,因为第一台机已经做好了,这里只用deport,import等命令就可以了。)

做完上面哪步后,可选择安装数据库或者是双机热备份软件了,这里选择先安装数据库,
首先是安装Informix
具体步骤如下:
#groupadd -g 100 informix
  #useradd -g informix -m -d /usr/informix -u 100 informix
  #passwd informix/informix
  #su - informix
  $cat .profile
   INFORMIXDIR=/usr/informix/software/9.2/
   INFORMIXSERVER=online         //database_instance-name
   PATH=$INFORMIXDIR/bin:$PATH
   export INFORMIXDIR INFORMIXSERVER PATH
  
   $cd $INFORMIXDIR
   $tar xvf /cdrom/informix/ICONNECT/SUN/CONNECT.TAR
   $./installconn
   
   Your existing INFORMIX shared libraries. if any,will be replaced and 
   upgraded . Are you sure? [yes/no]  yes
   
   Is I-connect being installed alogn with informix database server v9.x
   (required to be run as user "informix")? (yes or no) yes
   
Installation Script
 
Installation Script Requirements:
- A user "informix" and a group "informix" must be known to the system.
- The product source files must have been loaded by user informix
- This installation procedure must be run by user informix.
- You must also set INFORMIXDIR to where you would like to install
- the product on and make INFORMIXDIR as your current working directory.
 
This script will change the owner, group, and mode of
many of the files of this package in this directory.

Extracting files from conncontent file...

Installing I-Connect as user "informix"...

Press RETURN to continue,
or the interrupt key (usually CTRL-C or DEL) to abort.
Enter your serial number (for example, INF#X999999) > AAC#J931133
Enter your serial number KEY (uppercase letters only) >ATQKJJ

WARNING!
         This software, and its authorized use and number of users, are
subject to the applicable license agreement with Informix Software, Inc.
If the number of users exceeds the licensed number, the excess users may
be prevented from using the software.  UNAUTHORIZED USE OR COPYING MAY
SUBJECT YOU AND YOUR COMPANY TO SEVERE CIVIL AND CRIMINAL LIABILITIES.

Press RETURN to continue,
or the interrupt key (usually CTRL-C or DEL) to abort.

Installing directory .
Installing directory etc
........................
Installing directory gls/lc11/zh_cn
Installing directory gls/lc11/zh_tw

**************************************************************
To complete the installation of INFORMIX-Connect,
run /export/home/informix/software/9.2/RUN_AS_ROOT.conn as root.
**************************************************************

Informix user portion of installation of INFORMIX-Connect complete.

# ./RUN_AS_ROOT.conn

Informix Product:       INFORMIX-Connect
Installation Directory: /export/home/informix/software/9.2

Performing root portion of installation of INFORMIX-Connect...

Installation of INFORMIX-Connect complete.

$./installserver
informix Dynamic Server 2000 Version 9.21.UC1 Copyright (C) 1986-2000 Informix Software, Inc.

Installation Script

Installation Script Requirements:
- A user "informix" and a group "informix" must be known to the system.
- The product source files must have been loaded by user informix.
- This installation procedure must be run by user informix.
 
This script will change the owner, group, and mode of
many of the files of this package in this directory.

Press RETURN to continue,
or the interrupt key (usually CTRL-C or DEL) to abort.


Enter your serial number (for example, INF#X999999) > AAC#J931133
Enter your serial number KEY (uppercase letters only) > ATQKJJ
 
WARNING!
         This software, and its authorized use and number of users, are
subject to the applicable license agreement with Informix Software, Inc.
If the number of users exceeds the licensed number, the excess users may
be prevented from using the software.  UNAUTHORIZED USE OR COPYING MAY
SUBJECT YOU AND YOUR COMPANY TO SEVERE CIVIL AND CRIMINAL LIABILITIES.


Press RETURN to continue,
or the interrupt key (usually CTRL-C or DEL) to abort.
Installing directory .
Installing directory aaodir
Installing directory bin
.......................
Installing directory release/en_us/0333/onpladm/images
注:如果在安装过程中提示不能访问etc/sqlhosts.demo文件而中止安装过程,如
mv:cannot access etc/sqlhosts.demo,可这样解决
$touch $INFORMIXDID/etc/slhosts.demo
再运行./installserver,这样安装过程就可进行下去了,这跟linux版本的informix921安装是一样的解决方法,这样的出错提示在S7,S8上会出现,但在S7上如果没有打上Recommended上不会出现,这也是做实验得出的结论,正确的原因不清楚,希望能人提示一下,谢谢。
**************************************************************
To complete the installation of Informix Dynamic Server 2000,
run /export/home/informix/software/9.2/RUN_AS_ROOT.server as root.
**************************************************************

Informix user portion of installation of Informix Dynamic Server 2000 complete.


# ./RUN_AS_ROOT.server  (由于这里的安装方法是把数据库软件及数据库库文件都是安装在共享磁盘阵列上,这个命令在另一台机上要再运行一次,因为此文件是设置库连接的,否则在另一台机上是没法启动informx 数据库的,会提示出错,oracle也是一样,只不过换成root.sh,具体在安装oracle一节有说明)

Informix Product:       Informix Dynamic Server 2000
Installation Directory: /export/home/informix/software/9.2
Performing root portion of installation of Informix Dynamic Server 2000...

...Linking /usr/lib/ismdd09a.so from lib/ismdd09a.so...

...Linking /usr/lib/iosm09a.so from lib/iosm09a.so...

...Linking /usr/lib/ipldd09a.so from lib/ipldd09a.so...

Installation of Informix Dynamic Server 2000 complete.

到此安装基本上结束,现在要做的就是配置参数
按INFORMIXDIR/release/en_US/0333/IDS_9.21所说修改文件:/etc/system
修改后的文件部分如下:
set enable_sm_wa = 1
set shmsys:shminfo_shmmax=268435456  //这里最好设置大一点,大10倍如2684354560
set semsys:seminfo_semmap=64           //否则安装oracle会提示说内存不够,
set semsys:seminfo_semmni=4096
set semsys:seminfo_semmns=4096
set semsys:seminfo_semmnu=4096
set semsys:seminfo_semume=64
set semsys:seminfo_semmsl=100
set shmsys:shminfo_shmmin=100
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=100
然后重启服务器
#sync;sync;sync;reboot

以informix用户登录,然后创建数据库空间,在一个比较大的目录下创建一个目录
如mkdir ifxdata
$cd ifxdata
#chown -R informix:informix ifxdata
$touch rootchk
$touch datachk
$touch online.bak
$chmod 660 *

然后修改
1./etc/services
增加一行,如
ifmx  1526/tcp     #Informix

修改IFNROMXIDIR/etc/sqlhosts文件,把前面的demo行注释,加上下面这行
database_name   protocol    server_ip      port
如:online        ontlitcp    19.22.128.2    ifmx  //直接填写1526也可以

再修改IFNROMXIDIR/etc/onconfig.std文件(最好先备份,当要安装多Instance有用,不过如果理解了备不备份都一样),修改如下(谨为参考)
# Root Dbspace Configuration
ROOTNAME  rootdbs
ROOTPATH  /sharedisk/informix/ifxdata/rootchk
ROOTOFFSET  0
ROOTSIZE    100000  //这里不用太大,是因为在以后的数据库会创建在其它的表空间上
#Logical Log Configuration
LOGFILES 10    //这里的日志文件数最好相应改大一点,如10
LOGSIZE  5000  //这里也要增大一下,这个如果比较小,在export,import大表时会出现日志文件已经满的出错提示, 

#Diagnostics
MAGPATH           /sharedisk/informix/ifxdata/online.log
ALARMPROGRAM      $INFORMIXDIR/etc/log_full.sh

# System Archive Tape Device
TAPEDEV   /sharedisk/informix/ifxdata/online.bak
TAPEBLK   16K
TAPESIZE   2048000K (max)

# System Configuration

SERVERNUM      0
DBSERVERNAME   online

到此,基本上的参数就配置好了,此时可以初始化数据库了,但如果想优化数据库,可看
优化数据库一节,这里不详细讨论。对于多CPU的机器,还要修改下面的参数为1
修改完参数后,可以进入数据库的初始化了
$oninit -iy
...........
$onstat -
看是否已经起动了数据库服务器,如果启动了,先运行onmonitor创建新的表空间,如datadbs
$onmonitor/Dbspace/Create(info,Add_chunk)
 Dbspace Name  :datadbs
 Full Pathname :/sharedisk/informix/ifxdata/data.chk
 Size          :2048000000K //这里最好这么大就可以了,如果以后空间不够了,再增加chunk就行了
按ESC创建。

创建会再用info菜单,看是否已经创建好了,注意看NUMBERS OF CHUNKS。

到这一步,要创建我们平时所说的数据库了,运行dbaccess
$dbaccess/Create/
输入数据库名,如sddb,再选择dbspace空间,这里选择新增加的表空间如datadbs,这里不要选择rootdbs,再选择日志模式,这里选择log形式。最后选择Create-new-database至此已经有一个可以用的数据库sddb了。(注要区分实例名与数据库名)


再次是安装oracle9201:
#su – oracle
$cat .profile
ORACLE_BASE=/sharedisk/disk.net/oracle
ORACLE_HOME=$ORACLE_BASE/product/920
ORACLE_SID=ORCL
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data 
NLS_LANG=american_america.zhs16gbk
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID ORA_NLS33 NLS_LANG PATH
DISPLAY=:0.0
export DISPLAY

oracle的安装只要其.profile文件正确,操作系统打上Recommended后,安装一般不出现问题的.不过要注意一点是,在安装过程的最后一步,以root身份运行$ORACLE_HOME/root.sh文件时,先备份root.sh,(由于这里是在双机的环境下安装,)此文件等安装完双机软件后切换到另一台机上运行一下。


最后是安装leagto HA+2.2这个双机软件了,
#cd /cdrom/cdrom0/HAPLUS/SOLARIS/SPARC
#pkgadd –d HAP.PDS
此过程一般是按缺省提示安装就行的,缺省目录为/etc/opt,跟/opt
安装完后,最好重启一下机器,配置可分两步进行:
一、 图形管理界面的配置,这种比较适合初次用户的配置
1、#/opt/QLIXcmc/ca &
输入超级用户密码,连接到本地主机,在machine标签选项输入machine.key:
E9CE E2C7 D5PF X8E8 CFX6 I3JF, 到这一步止,先不要在其它的标签选项里输入如心跳网络等,这都等后面再做,按提交,再按done键。会提示没法创建sg,叫你手工创建,这不用管他。
2、#/opt/QLIXcmc/ca &
这次是配置心跳网络,服务组跟服务等详细细节,这里没有配置虚拟机器,也不知道有什么用处,怎么用等。书还没有看下去。这里选择四口网卡中的qfe0,qfe1做为心跳网络。
创建服务组时,要注意,在A机上的创建Service Group时,其Group.Priority 值与B机上的不能相同,而且如果A机上的Priority 值为1,应复选OK to Server on Startup这一选项。缺省如果A机为1,则B机为大于1的值。组ID里输入的应是以后提供服务的IP地址。按提交与done后,会在/etc/opt/QUALha/sg/目录下生成以组ID号命名的目录,里面有相关的脚本,及服务目录等。
3.启动双机服务器进程
#/etc/rc3.d/S99qhadp start
上面几步也可通过修改/etc/opt/QUALha/etc/machine.conf文件进行。

二、 手工配置
修改/etc/opt/QHALha/etc下的machine.conf文件,本人两台机的配置文件如下:
servera:
machine.key:  E9CE E2C7 D5PF X8E8 CFX6 I3JF
machine.customer_name:  shunde.gov.cn
machine.ok_to_lock_memory:  1
machine.ok_to_run_in_realtime:  1
service_manager.timeout:  7
role_manager.timeout:  5
heartbeat.cast_type:  multicast
heartbeat.ok_to_test:  1

heartbeat.interface:  qfe0
heartbeat.test_interval:  1
heartbeat.test_timeout:  2
heartbeat.interface:  qfe1
heartbeat.test_interval:  1
heartbeat.test_timeout:  2

group.name:  www
group.id:  19.22.128.3
group.priority:  1
group.ok_to_serve_on_startup:  1
group.ok_to_serve_delay:  600
group.ok_to_serve_automatically:  1
group.panic_when_server_is_hung:  0
group.panic_when_server_is_hung_timeout:  600
group.monitor_only:  0
group.disable_at_boot:  0
group.script_timeout:  300
group.current_server_timeout:  3
group.election_timeout:  10

service.name:  oracle
service.grace_period_before_starting_tests:  0
service.test_interval:  20
service.test_timeout:  40
service.failed_test_count_threshold:  3
service.failed_test_count_reset_interval:  300
service.restart_timeout:  40
service.restart_attempt_count_threshold:  1
service.restart_attempt_count_reset_interval:  3600
service.critical:  1
service.stop_even_if_failed:  1

group.name:  dbserver
group.id:  19.22.128.4
group.priority:  2
group.ok_to_serve_on_startup:  0
group.ok_to_serve_delay:  600
group.ok_to_serve_automatically:  1
group.panic_when_server_is_hung:  0
group.panic_when_server_is_hung_timeout:  600
group.monitor_only:  0
group.disable_at_boot:  0
group.script_timeout:  300
group.current_server_timeout:  3
group.election_timeout:  10

service.name:  informix
service.grace_period_before_starting_tests:  0
service.test_interval:  20
service.test_timeout:  40
service.failed_test_count_threshold:  3
service.failed_test_count_reset_interval:  300
service.restart_timeout:  40
service.restart_attempt_count_threshold:  1
service.restart_attempt_count_reset_interval:  3600
service.critical:  1
service.stop_even_if_failed:  1

serverb:

machine.key:  E9CE E2C7 M2GD HAPC HBM6 K3HF
machine.customer_name:  shunde.gov.cn
machine.ok_to_lock_memory:  1
machine.ok_to_run_in_realtime:  1
service_manager.timeout:  7
role_manager.timeout:  5
heartbeat.cast_type:  multicast
heartbeat.ok_to_test:  1

heartbeat.interface:  qfe0
heartbeat.test_interval:  1
heartbeat.test_timeout:  2
heartbeat.interface:  qfe1
heartbeat.test_interval:  1
heartbeat.test_timeout:  2

group.name:  www
group.id:  19.22.128.3
group.priority:  2
group.ok_to_serve_on_startup:  0
group.ok_to_serve_delay:  600
group.ok_to_serve_automatically:  1
group.panic_when_server_is_hung:  0
group.panic_when_server_is_hung_timeout:  600
group.monitor_only:  0
group.disable_at_boot:  0
group.script_timeout:  300
group.current_server_timeout:  3
group.election_timeout:  10

service.name:  oracle
service.grace_period_before_starting_tests:  0
service.test_interval:  20
service.test_timeout:  40
service.failed_test_count_threshold:  3
service.failed_test_count_reset_interval:  300
service.restart_timeout:  40
service.restart_attempt_count_threshold:  1
service.restart_attempt_count_reset_interval:  3600
service.critical:  1
service.stop_even_if_failed:  1

group.name:  dbserver
group.id:  19.22.128.4
group.priority:  1
group.ok_to_serve_on_startup:  1
group.ok_to_serve_delay:  600
group.ok_to_serve_automatically:  1
group.panic_when_server_is_hung:  0
group.panic_when_server_is_hung_timeout:  600
group.monitor_only:  0
group.disable_at_boot:  0
group.script_timeout:  300
group.current_server_timeout:  3
group.election_timeout:  10

service.name:  informix
service.grace_period_before_starting_tests:  0
service.test_interval:  20
service.test_timeout:  40
service.failed_test_count_threshold:  3
service.failed_test_count_reset_interval:  300
service.restart_timeout:  40
service.restart_attempt_count_threshold:  1
service.restart_attempt_count_reset_interval:  3600
service.critical:  1
service.stop_even_if_failed:  1


上面如果有什么参数还可以优化的话,请高手们指点一二,不胜感激。

完成上面所说的两步后,接下来的还要手式配置sg里的if.tab,fs.tab,vxvm.dg.tab等文件了。
#cp /etc/hostsname.hme0 /etc/hostsname.qfe0
#cat /etc/hostname.qfe0
100.1.1.1
#ifconfig qfe0 plumb
#ifconfig qfe0 100.1.1.1 up
#ifconfig qfe0 down  //因为下面要进行if.tab文件的测试

#cat if.tab  
…………………….
qfe3  19.22.128.4 - - - - - -

#cat fs.tab
……………………..
/dev/vx/dsk/datadg/vol01        /dev/vx/rdsk/datadg/vol01       /sharedisk/diskdata vxfs vxvm - -

#cat vxvm.dg.tab
……………………..
datadg              //这里填入的是dg-name

到这一步止,跟HA+相关的步骤都完成的,现在要测试一下上面的配置是否正确,先进入要测试的服务组的目录,如cd /etc/opt/QUALha/sg/19.22.128.3/
#/etc/opt/QUALha/bin/if.sh start
如果提示说心跳网卡qfe0启动成功,则说明if.tab文件格式正确。否则不正确,具体原因还不能只看if.tab文件;

#/etc/opt/QUALha/bin/fs.sh start
如果提示文件系统mount成功,则说明fs.tab文件格式正确。否则不正确,此时应仔细检查fs.tab文件的格式是否有写错。

最后是启动服务的简单脚本的编辑了。
#cat Informix.d/start
在倒数第二行里添加这一行:
su – informix –c “oninit”

#cat Informix.d/stop
在倒数第二行里添加这一行:
su – informix –c “onmode –ky”


#cat oracle.d/start
在倒数第二行里添加这几行:
su – oracle –c “sqlplus /nolog”<<EOF
connect / as sysdba
startup
EOF
su – oracle –c “lsnrctl start”


#cat oracle.d/stop
在倒数第二行里添加这几行:
su – oracle –c “sqlplus /nolog”<<EOF
connect / as sysdba
shutdown immediate
EOF
su – oracle –c “lsnrctl stop”


至于为什么没有用光盘上各个数据库的module呢,是因为这些module都比较老了,不适合这些版本的数据库用了。至于oracle的启动关闭脚本,也可引用dbstat,dbshut等其本身的启动与关闭脚本,但由于涉及比较多的设置过程,这里不详细说明。


后话:关于双机的测试问题,有谁有相关的验收文档,共享一下。谢谢!

在cmc管理界面里,互相切换没有问题,但是关闭一台机器测试时,另一台机没有接管另一个磁盘阵列,出错信息如下:
Apr  7 14:37:01 servera.shunde.gov.cn unix: /sbus@3,0/SUNW,socal@d,10000/sf@0,0/ses@w5080020000097862,0 (ses35) offline
Apr  7 15:09:03 servera.shunde.gov.cn unix: NOTICE: vxvm:vxdmp: disabled path 118/0x28 belonging to the dmpnode 155/0x10
Apr  7 15:09:03 servera.shunde.gov.cn unix: NOTICE: vxvm:vxdmp: disabled dmpnode 155/0x10
Apr  7 15:09:03 servera.shunde.gov.cn unix: NOTICE: vxvm:vxdmp: disabled path 118/0x30 belonging to the dmpnode 155/0x18
Apr  7 15:09:03 servera.shunde.gov.cn unix: NOTICE: vxvm:vxdmp: disabled dmpnode 155/0x18
Apr  7 15:09:03 servera.shunde.gov.cn unix: NOTICE: vxvm:vxdmp: disabled path 118/0x38 belonging to the dmpnode 155/0x20
Apr  7 15:09:03 servera.shunde.gov.cn unix: NOTICE: vxvm:vxdmp: disabled dmpnode 155/0x20
Apr  7 15:09:03 servera.shunde.gov.cn unix: NOTICE: vxvm:vxdmp: disabled path 118/0x40 belonging to the dmpnode 155/0x28
Apr  7 15:09:03 servera.shunde.gov.cn unix: NOTICE: vxvm:vxdmp: disabled dmpnode 155/0x28
Apr  7 15:09:03 servera.shunde.gov.cn unix: NOTICE: vxvm:vxdmp: disabled path 118/0x48 belonging to the dmpnode 155/0x30
Apr  7 15:09:03 servera.shunde.gov.cn unix: NOTICE: vxvm:vxdmp: disabled dmpnode 155/0x30
{QUALha} Apr  7, 03 15:09:05 - servera.shunde.gov.cn - group 19.22.128.4
 SM local state changed from SM_STARTING to SM_RUNNING_FAILED_TO_START
 best server: servera.shunde.gov.cn - best standby: NONE
 offline's: 0 - standby's: 0
{QUALha} Apr  7, 03 15:09:05 - servera.shunde.gov.cn - group 19.22.128.4
 SG local state changed from SG_SERVER_STARTING to SG_SERVER_HUNG
 best server: servera.shunde.gov.cn - best standby: NONE
 offline's: 0 - standby's: 0
Apr  7 15:10:17 servera.shunde.gov.cn unix: ID[SUNWssa.socal.link.5010] socal0: port 0: Fibre Channel is OFFLINE
Apr  7 15:10:17 servera.shunde.gov.cn unix: ID[SUNWssa.socal.link.6010] socal0: port 0: Fibre Channel Loop is ONLINE
Apr  7 15:10:28 servera.shunde.gov.cn unix: /sbus@3,0/SUNW,socal@d,10000/sf@0,0 (sf0):
Apr  7 15:10:28 servera.shunde.gov.cn  REPORT_LUNS to target 0x7d retrying
Apr  7 15:10:28 servera.shunde.gov.cn unix: ses34 at sf0:
Apr  7 15:10:28 servera.shunde.gov.cn unix:  name w5080020000097861,0, bus address 29
Apr  7 15:10:28 servera.shunde.gov.cn unix: ses34 is /sbus@3,0/SUNW,socal@d,10000/sf@0,0/ses@w5080020000097861,0
Apr  7 15:10:28 servera.shunde.gov.cn unix: /sbus@3,0/SUNW,socal@d,10000/sf@0,0/ses@w5080020000097861,0 (ses34) online
Apr  7 15:10:28 servera.shunde.gov.cn unix: ses35 at sf0:
Apr  7 15:10:28 servera.shunde.gov.cn unix:  name w5080020000097862,0, bus address 1
Apr  7 15:10:28 servera.shunde.gov.cn unix: ses35 is /sbus@3,0/SUNW,socal@d,10000/sf@0,0/ses@w5080020000097862,0
Apr  7 15:10:28 servera.shunde.gov.cn unix: /sbus@3,0/SUNW,socal@d,10000/sf@0,0/ses@w5080020000097862,0 (ses35) online
Apr  7 15:12:20 servera.shunde.gov.cn unix: NOTICE: vxvm:vxdmp: enabled path 118/0x28 belonging to the dmpnode 155/0x10
Apr  7 15:12:20 servera.shunde.gov.cn unix: NOTICE: vxvm:vxdmp: enabled dmpnode 155/0x10
Apr  7 15:12:20 servera.shunde.gov.cn unix: NOTICE: vxvm:vxdmp: enabled path 118/0x30 belonging to the dmpnode 155/0x18
Apr  7 15:12:20 servera.shunde.gov.cn unix: NOTICE: vxvm:vxdmp: enabled dmpnode 155/0x18
Apr  7 15:12:20 servera.shunde.gov.cn unix: NOTICE: vxvm:vxdmp: enabled path 118/0x38 belonging to the dmpnode 155/0x20
Apr  7 15:12:20 servera.shunde.gov.cn unix: NOTICE: vxvm:vxdmp: enabled dmpnode 155/0x20
Apr  7 15:12:20 servera.shunde.gov.cn unix: NOTICE: vxvm:vxdmp: enabled path 118/0x40 belonging to the dmpnode 155/0x28
Apr  7 15:12:20 servera.shunde.gov.cn unix: NOTICE: vxvm:vxdmp: enabled dmpnode 155/0x28
Apr  7 15:12:20 servera.shunde.gov.cn unix: NOTICE: vxvm:vxdmp: enabled path 118/0x48 belonging to the dmpnode 155/0x30
Apr  7 15:12:20 servera.shunde.gov.cn unix: NOTICE: vxvm:vxdmp: enabled dmpnode 155/0x30
{QUALha} Apr  7, 03 16:08:18 - servera.shunde.gov.cn - group 19.22.128.4
 SM local state changed from SM_STOPPING to SM_OFFLINE
 best server: servera.shunde.gov.cn - best standby: serverb.shunde.gov.cn
 offline's: 0 - standby's: 0
{QUALha} Apr  7, 03 16:08:18 - servera.shunde.gov.cn - group 19.22.128.4
 ROLEM local state changed from HBM_ATTEMPT_SERVICE to HBM_OFFLINE
 best server: servera.shunde.gov.cn - best standby: serverb.shunde.gov.cn
 offline's: 0 - standby's: 0

 风起云飞扬 回复于:2003-04-11 11:18:51
很好的经验,感谢共享。

 iamark 回复于:2003-04-11 12:56:45
干什么要把根盘封装,把rootdg建在分区里不好么?

 czc9 回复于:2003-04-13 21:11:34
怎样建呢,有没有示例呢?

 havelq 回复于:2003-04-14 14:52:57
在boot盘中选一个未使用的分区,挤30M空间,把它放在rootdg下

 havelq 回复于:2003-04-16 10:00:32
能否解释一下
#/etc/vx/bin/vxrootmir disk01  (做root区) 
#/etc/vx/bin/vxmirror rootdisk disk01 (swap ,/usr, 等非root分区)

 havelq 回复于:2003-04-16 10:01:20
能否解释一下
#/etc/vx/bin/vxrootmir disk01  (做root区) 
#/etc/vx/bin/vxmirror rootdisk disk01 (swap ,/usr, 等非root分区)

 zlc158 回复于:2003-04-16 13:50:57
恩。不错~~~ 保留

 david5337 回复于:2003-05-12 08:57:06
很好的资料!
与其看一大堆资料文档,不如看实际的安装手册实在!

 lix1216 回复于:2003-05-13 09:09:28
不如说是做镜像盘:
RAID1

 Diego 回复于:2003-05-14 20:44:27
VERITAS公司倒是不推荐在一个分区上建rootdg的。如果条件限制一定要这样做,也要在另外一块磁盘上再找一个分区加到rootdg中。不罗嗦了,方法如下:
-------------------------------
 node0# vxconfigd -m disable

 node0# vxdctl init
 
 node0# vxdg init rootdg
 
 node0# vxdctl add disk c0t1d0s7 type=simple
 vxvm:vxdctl: WARNING: Device c0t1d0s7: Not currently in the configuration
 
 (注意,这个提示没问题的)

 node0# vxdisk -f init c0t1d0s7 type=simple
 
 node0# vxdg adddisk c0t1d0s7
 
 node0# vxdctl enable
 
 node0# rm -f /etc/vx/reconfig.d/state.d/install-db

原文转自:http://www.ltesting.net