Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5701838
  • 博文数量: 745
  • 博客积分: 10075
  • 博客等级: 上将
  • 技术积分: 7716
  • 用 户 组: 普通用户
  • 注册时间: 2005-04-29 12:09
文章分类

全部博文(745)

文章存档

2019年(1)

2016年(1)

2010年(31)

2009年(88)

2008年(129)

2007年(155)

2006年(197)

2005年(143)

分类:

2008-01-25 16:35:22

十三、对main.cf配置文件的修改
   VCS35软件安装完毕之后,需要对VCS配置脚本文件/etc/VRTSvcs/conf/config/main.cf进行修改,该文件的修改可以使用命令行(比如hagrp、hares等),也可以使用vi编辑器,这里选择直接使用vi编辑器对VCS配置脚本进行修改,原脚本文件内容为:
# cat /etc/VRTSvcs/conf/config/main.cf.bak
include "types.cf"
include "OracleTypes.cf"
cluster ly_cluster (
        UserNames = { admin = "cDRpdxPmHpzS." }
        Administrators = { admin }
        CounterInterval = 5
        )
system solarisa (
        )
system solarisb (
        )
group ClusterService (
        SystemList = { solarisa = 0, solarisb = 1 }
        AutoStartList = { solarisa, solarisb }
        OnlineRetryLimit = 3
        )
        IP webip (
                Device = hme0
                Address = "192.168.1.184"
                NetMask = "255.255.255.0"
                )
        NIC csgnic (
                Device = hme0
                )
        VRTSWebApp VCSweb (
                Critical = 0
                AppName = vcs
                InstallDir = "/opt/VRTSweb/VERITAS"
                TimeForOnline = 5
                )
        VCSweb requires webip
        webip requires csgnic

        // resource dependency tree
        //
        //      group ClusterService
        //      {
        //      VRTSWebApp VCSweb
        //          {
        //          IP webip
        //              {
        //              NIC csgnic
        //              }
        //          }
        //      }
修改后的脚本文件内容为:
# cat /etc/VRTSvcs/conf/config/main.cf
include "types.cf"
include "OracleTypes.cf"
cluster ly_cluster (
        UserNames = { admin = "cDRpdxPmHpzS." }
        Administrators = { admin }
        CounterInterval = 5
        )
system solarisa (
        )
system solarisb (
        )
group oracle (
        SystemList = { solarisa = 1, solarisb = 2 }
        AutoStartList = { solarisa }
        )
        IP ip (
                Critical = 0
                Device = hme0
                Address = "192.168.1.185"
                NetMask = "255.255.255.0"
                )
        Mount mount (
                Critical = 0
                MountPoint = "/oradata"
                BlockDevice @solarisa = "/dev/vx/dsk/datadg/vol01"
                BlockDevice @solarisb = "/dev/vx/dsk/datadg/vol01"
                FSType = ufs
                FsckOpt = "-n"
                )
        NIC nic (
                Device = hme0
                NetworkType = ether
                )
        Oracle oracle (
                Critical = 0
                Sid @solarisa = ora
                Sid @solarisb = ora
                Owner @solarisa = oracle
                Owner @solarisb = oracle
                Home @solarisa = "/oracle/product/9.2.0"
                Home @solarisb = "/oracle/product/9.2.0"
                Pfile @solarisa = "/oracle/product/9.2.0/dbs/initora.ora"
                Pfile @solarisb = "/oracle/product/9.2.0/dbs/initora.ora"
                )
        Sqlnet sqlnet (
                Critical = 0
                Owner @solarisa = oracle
                Owner @solarisb = oracle
                Home @solarisa = "/oracle/product/9.2.0"
                Home @solarisb = "/oracle/product/9.2.0"
                TnsAdmin @solarisa = "/oracle/product/9.2.0/network/admin"
                TnsAdmin @solarisb = "/oracle/product/9.2.0/network/admin"
                Listener @solarisa = LISTENER
                Listener @solarisb = LISTENER
                )
        ip requires nic
        oracle requires ip
        oracle requires mount
        sqlnet requires oracle

        // resource dependency tree
        //
        //      group oracle
        //      {
        //      Sqlnet sqlnet
        //          {
        //          Oracle oracle
        //              {
        //              IP ip
        //                  {
        //                  NIC nic
        //                  }
        //              Mount mount
        //              }
        //          }
        //      }
这个脚本的配置实际很简单.从注释掉的脚本样本可知,各资源的调用关系非常明确,ip调用nic,oracle调用ip跟mount,sqlnet调用oracle,只要根据样本的范例一步步做就ok.
脚本配置完成之后通过命令hacf -verify /etc/VRTSvcs/conf/config进行检查,如果没有错误提示,说明脚本修改成功.
 
阅读(2542) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~