HP双机(转自chinaunix)

1.安装好A机和B机的操作系统后,安装相应的软件MC/SG等 
 软件安装完后在安装GOLDENPATCH和最新的megaPATCH 

2.在配置双机前必须使A机和B机能够相互信任 
使用VI 编辑文件根目录下的.rhosts,如没有,自己就建立一个 
#vi .rhosts 
A  root  #A为A机的主机名 
B  root  #B为B机的主机名 

3.在A机和B机上重复上面的步骤或将此文件直接拷贝至B机的根目录, 
然后使用"rlogin 主机名"在两台主机间切换,验证信任关系是否成立。 
如不需要密码认证则表示成功。 

4.编辑/etc/hosts文件,将所有的(这里为两台主机)IP地址 
(包括心跳地址、网卡地址等)加到此文件中,以备解析时使用。 

5.创建需要共享的VG,这里VG的创建就不详细说明了。 

6.为双机创建锁卷组和锁磁盘 
目前比较流行的方式是利用共享的卷组作为锁卷组 
利用共享卷组中的磁盘作为锁磁盘 
举例说明如下: 
我建立了一个共享的VG名字叫VGSYB,上安装SYBASE 
在下面将要讲的如何配置群集ASCII文件的时候,里面将会碰到下面的配置 
FIRST_CLUSTER_LOCK_VG /dev/vgsyb 
FIRST_CLUSTER_LOCK_PV /dev/dsk/c4t1d2 

这里的VGSYB就是我建立的共享卷组,同时我将其也作为了锁卷组。 
这个共享卷组中的c4t1d2磁盘被我用来当作锁磁盘,这样的好处是,不用单独建立VGLOCK和锁磁盘 


7. #vgchange -a e /dev/vgsyb   使此VG只能由一台主机接管 

8. #vgchange -a y /dev/vgsyb   激活此锁卷组 

9. 在其中的一台机器上执行此命令,在此我选择在A机上生成双机的配置模板 

  #cmquerycl -v  -n A机名  -n B机名  -C /etc/cmcluster/cmclconfig.ascii 
  
如没有错误的话,将生成上面的模板文件,并用vi编辑它 

10. #cmcheckconf -v -C /etc/cmcluster/cmclconfig.ascii 让系统检查模板 

11.执行下面的命令前必须使锁卷组为激活状态 
#cmapplyconf -v -C  /etc/cmcluster/cmclconfig.ascii 分发二进制文件到所有的节点 

12.#vgchange -a n  /dev/vgsyb  停用此锁卷组,等待由双机软件来激活锁卷组 

13.#cmruncl  启动双机 
   cmhaltcl -f  停双机 
   cmviewcl -v  查看双机的状态 
   cmrunnode    启动一个节点 
   cmhaltnode   停一个节点 

14.注明:/etc/fstab中不能出现被双机共享的卷组 

15.注明:以下为一个cmclconfig.ascii的文件内容,大家可以看一看里面的英文注释,及以下相关的配置参数 

# ********************************************************************** 
# ********* HIGH AVAILABILITY CLUSTER CONFIGURATION FILE *************** 
# ***** For complete details about cluster parameters and how to    **** 
# ***** set them, consult the cmquerycl(1m) manpage or your manual. **** 
# ********************************************************************** 

# Enter a name for this cluster.  This name will be used to identify the 
# cluster when viewing or manipulating it. 

CLUSTER_NAME cl_db 


# Cluster Lock Device Parameters.  This is the volume group that 
# holds the cluster lock which is used to break a cluster formation 
# tie.  This volume group should not be used by any other cluster 
# as cluster lock device. 


# Warning: No volume groups were found on all nodes. 
# A cluster lock volume group is required for clusters of only two nodes. 
FIRST_CLUSTER_LOCK_VG /dev/vgsyb 


# Definition of nodes in the cluster. 
# Repeat node definitions as necessary for additional nodes. 

NODE_NAME JSta 
 NETWORK_INTERFACE lan2 
   HEARTBEAT_IP 192.9.200.2 
 NETWORK_INTERFACE lan3 
 NETWORK_INTERFACE lan1 
   STATIONARY_IP 132.228.39.2 

# Warning: No volume groups were found on all nodes. 
# A cluster lock device is required for clusters of only two nodes. 
 FIRST_CLUSTER_LOCK_PV /dev/dsk/c4t1d2 
# List of serial device file names 
# For example: 
# SERIAL_DEVICE_FILE /dev/tty0p0 

# Possible standby Network Interfaces for lan1: lan3. 
# Warning: There are no standby network interfaces for lan2. 

NODE_NAME JStb 
 NETWORK_INTERFACE lan2 
   HEARTBEAT_IP 192.9.200.3 
 NETWORK_INTERFACE lan3 
 NETWORK_INTERFACE lan1 
   STATIONARY_IP 132.228.39.3 

# Warning: No volume groups were found on all nodes. 
# A cluster lock device is required for clusters of only two nodes. 
 FIRST_CLUSTER_LOCK_PV /dev/dsk/c4t1d2 
# List of serial device file names 
# For example: 
# SERIAL_DEVICE_FILE /dev/tty0p0 

# Possible standby Network Interfaces for lan1: lan3. 
# Warning: There are no standby network interfaces for lan2. 


# Cluster Timing Parmeters (microseconds). 

HEARTBEAT_INTERVAL 1000000 
NODE_TIMEOUT 2000000 


# Configuration/Reconfiguration Timing Parameters (microseconds). 

AUTO_START_TIMEOUT 600000000 
NETWORK_POLLING_INTERVAL 2000000 

# Package Configuration Parameters. 
# Enter the maximum number of packages which will be configured in the cluster. 
# You can not add packages beyond this limit. 
# This parameter is required. 
MAX_CONFIGURED_PACKAGES 4 



# List of cluster aware Volume Groups. These volume groups will 
# be used by package applications via the vgchange -a e command. 
# For example: 
# VOLUME_GROUP /dev/vgdatabase. 
# VOLUME_GROUP /dev/vg02. 

VOLUME_GROUP /dev/vgsyb

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值