免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2269 | 回复: 1
打印 上一主题 下一主题

请教在HP-UX下如何做双机热备 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-07-13 20:43 |只看该作者 |倒序浏览
列位高手,请教在HP-UX下如何做双机热备?
可不可以写个热备的流程给小弟参考一下。

论坛徽章:
0
2 [报告]
发表于 2004-07-14 10:29 |只看该作者

请教在HP-UX下如何做双机热备

MC/ServiceGuard Installation
        MC/ServiceGuard Cluster configuration is based on two nodes machines (namely primary and standby), single LAN connection (data and heartbeat signals), single shared SCSI bus, one shared SCSI data disk as lock disk.  Appendix E shows sample MC/ServiceGuard configuration diagram.

        Full Installation on MC/ServiceGuard, including cluster and package manager.
        command swinstall on node primary and node standby

2        MC/ServiceGuard Configuration

        2.1        Basic System Configuration
                i        Update hosts table (on primary and standby)
                        Edit file /etc/hosts to include all configured network interfaces of all hosts

                ii        Setup trusted system (on primary and standby)
                        Edit file /.rhosts with examples:
                                primary root
                                standby root

                iii        Configure shared volume groups and logical volumes

                        On primary, create shared volume group(s) and export map file

                                primary# mkdir /dev/vgshare
                                primary# mknod /dev/vgshare/group c 64 0x090000
                                        * choose unused minor number eg 0x090000 as necessary
                                primay# pvcreate -f /dev/rdsk/cXtYd0
                                        * Lock disk controller number X and SCSI address Y
                                primary# vgcreate /dev/vgshare /dev/dsk/cXtYd0
                                primary# lvcreate -l 100 /dev/vgshare
                                primary# newfs -F vxfs /dev/vgshare/rlvol1
                                primary# mkdir /shared
                                primary# mount /dev/vgshare/lvol1 /shared
                                primary# bdf                       
                                        * checkpoint for filesystem mounting
                                primary# umount /shared
                                primary# vgchange -a n /dev/vgshare
                                primary# vgexport -p -m /tmp/vgshare.map /dev/vgshare
                                primary# rcp /tmp/vgshare.map standby:/tmp/vgshare.map

                        On standby, import shared volume group(s)

                                standby# mkdir /dev/vgshare
                                standby# mknod /dev/vgshare/group c 64 0x090000
                                        * choose unused minor number eg 0x090000 as necessary
                                standby# vgimport -m /tmp/vgshare.map /dev/vgshare /dev/dsk/cXtYd0
                                        * Lock disk controller number X and SCSI address Y
                                        ** may be different from the ones in primary
                                standby# vgchange -a y /dev/vgshare
                                standby# mkdir /shared
                                standby# mount /dev/vgshare/lvol1 /shared
                                standby# bdf                                # checkpoint
                                standby# vgcfgbackup /dev/vgshare
                                standby# umount /shared
                                standby# vgchange -a n /dev/vgshare

                        On both primary and standby, activate local volume group(s) only
                                Edit file /etc/lvmrc
                                a.        AUTO_VG_ACTIVATE=1 change to AUTO_VG_ACTIVATE=0
                                b.        under function custom_vg_activation, add local VGs
                                                /sbin/vgchange -a y -s /dev/vg00        # all local VGs

                        On primary, get ready for MC/ServiceGuard configuration
                                primary# vgchange -a y /dev/vgshare


        2.2        Cluster Configuration
                All time intervals, parameters are set as MC/ServiceGuard default. Please notice that the configuration is for functional test purpose only, not a HP supported configuration.

                i        Query existing hardware & system configuration (on primary)
                        primary# cd /etc/cmcluster
                        primary# cmquerycl -v -C /etc/cmcluster/cluster.cfg -n primary -n standby

                ii        Modify cluster configuration, check and apply (on primary)
                        primary# vi /etc/cmcluster/cluster.cfg
                                * refer to appendix A for sample cluster configuration file
                        primary# cmcheckconf -v -C /etc/cmcluster/cluster.cfg
                        primary# cmapplyconf -v -C /etc/cmcluster/cluster.cfg

                iii        Startup cluster (on primary)
                        primary# cmruncl -v
                        primary# cmviewcl -v                        # check point, cluster status is up

                iv        Auto Startup (on both primary and standby)
                        primary/standby# vi /etc/rc.config.d/cmcluster
                                AUTOSTART_CMCLD=0 changed to AUTOSTART_CMCLD=1

        2.3        Sample Package and Service Configuration
                A sample package (spkg) is configured with single service (ssvr).  The service is designed to run a sample service script (sscript, refer to appendix D) which is able to display current time and
hostname on console device every ten seconds.

                i        Configure package (on primary)
                        primary# mkdir /etc/cmcluster/spkg
                        primary# cmmakepkg -p /etc/cmcluster/spkg/spkg.cfg
                        primary# cmmakepkg -s /etc/cmcluster/spkg/spkg.ctl
                        primary# chmod 755 /etc/cmcluster/spkg/spkg.ctl

                ii        Modify package configuration (on primary)
                        primary# vi /etc/cmcluster/spkg/spkg.cfg
                                * refer to appendix B for sample package configuration file
                        primary# vi /etc/cmcluster/spkg/spkg.ctl
                                * refer to appendix C for sample package control file

                iii        Duplicate configuration and control files to other sites (on primary)
                        primary# cd /etc/cmcluster
                        primary# tar cvf - * | remsh standby '(cd /etc/cmcluster; tar xvpf -)'
                        primary# cmhaltcl -fv
                        primary# cmcheckconf -v -C /etc/cmcluster/cluster.cfg -P
                                /etc/cmcluster/spkg/spkg.cfg
                        primary# cmapplyconf -v -C /etc/cmcluster/cluster.cfg -P
                                /etc/cmcluster/spkg/spkg.cfg

                iv        Startup cluster (on either primary or standby)
                        primary/standby# cmruncl -v
                        primary/standby# cmviewcl -v                        # check point

3        MC/ServiceGuard Installation Acceptance Test

        3.1        MC/ServieGuard Package/Service Failure Scenarios

                By killing service script, service and causing package fail.  The package will be restarted at standby node.

                i        Startup MC/SG cluster and nodes (on either primary or standby)
                        primary/standby# cmruncl -v

                ii        Startup standard package and service on primary
                        automatically start with cluster, or
                        primary# cmrunpkg -v

                iii        Verify cluster, nodes, package and services status on primary
                        primary# cmviewcl -v
                        * make sure package auto-switch flag is enable.

                iv        Terminate service manually on primary
                        eg by killing process sscript

                v        Verify cluster, nodes, package and services status on standby
                        standby# cmviewcl -v

                vi        Transfer package from standby back to primary manually by shutting down on standby and restarting package on primary
                        standby# cmhaltpkg -v spkg
                        standby# cmmodpkg -e -n primary spkg
                        standby# cmrunpkg -v -n primary spkg
                        standby# cmmodpkg -e spkg
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP