KEBI BLOG

IT,PC,모바일,스마트폰 정보와 팁 그리고 제품리뷰와 생활정보

HP-UX MC/SG Cluster 구성하기

1. Cluster 대상 VG 생성 및 vglock 생성

대상 VG 생성후 아래 처럼 vglock 을 생성합니다.    
# mkdir /dev/vglock
# mknod /dev/vglock c 64 0x100000
# vgcreate /dev/vglock /dev/dsk/cxtxdx

2. cmnodelist 생성

/ .rhosts 에도 구성 하는동안 + 를 추가해줍니다.
# vi /etc/cmcluster/cmclnodelist
node1         root
node2         root

3. .asc (cluster configration information) file 생성

-C 뒤에 .asc file name 을 주고 -n 에 cluster 구성할 node 들을 써줍니다.
정보를 수집한후에 .asc file 이 생성됩니다.
# cmquerycl -v -C mcsg_db_cluster.asc -n node1 -n node2

Begin checking the nodes...

Warning: Unable to determine local domain name for node1

Looking for other clusters ... Done

Gathering configuration information ..

Gathering storage information ..

Found 93 devices on node node1

Found 93 devices on node node2

Analysis of 186 devices should take approximately 10 seconds

0%----10%----20%----30%----40%----50%----60%----70%----80%----90%----100%

Found 3 volume groups on node node1

Found 3 volume groups on node node2

Analysis of 6 volume groups should take approximately 1 seconds

0%----10%----20%----30%----40%----50%----60%----70%----80%----90%----100%

.....

Gathering Network Configuration ....... Done

.

.

Writing cluster data to test_pa_db_cluster.asc.


4. .asc file 수정
필요한 정보를 수정 합니다.. .asc file 에 대해서는 추후에.. 급하신분들 리플 달아 주시면 알려 드릴께요 ^^;;

5. pkg templete 생성
# mkdir -p /etc/cmcluster/node1_pkg1
# cd /etc/cmcluster/node1_pkg1
# cmmakepkg -s node1_pkg1.cntl
# cmmakepkg -p node1_pkg1.conf

6. pkg file 수정

수정할 내용은 아래 정도 입니다.. 환경에 맞게 하시면 됩니다.
.conf

# grep -Ev "^$|^#" *.conf

PACKAGE_NAME    node1_pkg1                     

PACKAGE_TYPE                    FAILOVER

FAILOVER_POLICY                 CONFIGURED_NODE

FAILBACK_POLICY                 MANUAL

NODE_NAME       node1

NODE_NAME       node2

AUTO_RUN                        YES

LOCAL_LAN_FAILOVER_ALLOWED      YES

NODE_FAIL_FAST_ENABLED          NO

RUN_SCRIPT                  /etc/cmcluster/node1_pkg1/node1_pkg1.cntl                            

RUN_SCRIPT_TIMEOUT              NO_TIMEOUT

HALT_SCRIPT                  /etc/cmcluster/node1_pkg1/node1_pkg1.cntl                           

HALT_SCRIPT_TIMEOUT             NO_TIMEOUT

SUBNET  192.168.0.1


.cntl
# cat *.cntl |grep -Ev "^$|^#"
. ${SGCONFFILE:=/etc/cmcluster.conf}
PATH=$SGSBIN:/usr/bin:/usr/sbin:/etc:/bin
VGCHANGE="vgchange -a s"                # Default
CVM_ACTIVATION_CMD="vxdg -g \$DiskGroup set activation=exclusivewrite" 
               
VG[0]="vg01"
VG[1]="vg02"
VG[2]="vg03"
VXVM_DG_RETRY="NO"
DEACTIVATION_RETRY_COUNT=2
KILL_PROCESSES_ACCESSING_RAW_DEVICES="YES"
VXVOL="vxvol -g \$DiskGroup startall"      # Default
FS_UMOUNT_COUNT=1
FS_MOUNT_RETRY_COUNT=0
CONCURRENT_VGCHANGE_OPERATIONS=1
ENABLE_THREADED_VGCHANGE=0
CONCURRENT_FSCK_OPERATIONS=1
CONCURRENT_MOUNT_AND_UMOUNT_OPERATIONS=1
       
       
 
log_file=${SG_SCRIPT_LOG_FILE:-$0.log}
function customer_defined_run_cmds
{
: # do nothing instruction, because a function must contain some command.
        test_return 51
}
       
function customer_defined_halt_cmds
{
: # do nothing instruction, because a function must contain some command.
        test_return 52
}

5. configration check 및 cluster apply
# cmcheckconf -v -C mcsg_db_cluster.asc -P ./node1_pkg1/node1_pkg1.conf -P ./node2_pkg1/node2_pkg1.conf
# cmapply -C mcsg_db_cluster.asc -P ./node1_pkg1/node1_pkg1.conf -P ./node2_pkg1/node2_pkg1.conf
# cmviewcl
CLUSTER            STATUS       
mcsg_db_cluster   down         

  NODE         STATUS       STATE                     
  node1         down         unknown      
  node2         down         unknown      

UNOWNED_PACKAGES

    PACKAGE      STATUS       STATE        AUTO_RUN     NODE         
    node1_pkg1     down                                   unowned      
    node2_pkg1     down                                   unowned 

0

Comment *

댓글 달기

6,572,646

전체

3,475

오늘

7,125

어제

Skin By KEBIBLOG Ver 1.0 Copyright ⓒ KEBI BLOG. All rights reserved.