Cluster/HA2011. 8. 4. 10:49

1. Cluster Design and Planning


o. cluster diagram

 ----------+----+-------------------------------------+----+-------------
                |      |         network name : ether1               |      |
                |      |                                                       |      |
 +---------+----+------------+             +----------+----+------------+
 |        en0  en1                     |             |         en0  en1           |
 |                                         |             |                            |
 |                                         |             |                            |
 |                                         |  rs232a    |                            |
 |                            /dev/tty0 +-------------+ /dev/tty0                  |
 |                                         |             |                            |
 |                                         |             |                            |
 |                                         |             |                            |
 |     rootvg                           |             |     rootvg                 |
 |      - hdisk0                       |             |      - hdisk0              |
 |      - hdisk1                       |             |      - hdisk1              |
 |                                         |             |                            |
 |                                         |             |                            |
 |     <halifax>               ssa0 |             | ssa0    <vancouver>        |
 +-------------------------+-+             +-+--------------------------+
                           |                                            |
                           |                                            |
                          +-+---------------------------+-+
                          |                                             |
                         |                    hdisk2                 |
                         |                    hdisk3                 |
                         |                    hdisk4                 |
                         |                                              |
                         +-------------------------------+




- cluster name : canada
- cluster id : 1
- cluster subnet : 255.255.255.0


o. halifax

- vg name : shared_vg_a
- logical volume : shared_jfslv_a
- file system name : /shared_fs_a
- jfslog : shared_jfslog_a

- service address : 192.168.42.1 (halifax_service)
- standby address : 192.168.142.1 (halifax_standby)
- boot address : 192.168.42.10 (halifax_boot)


o. vancouver

- vg name : shared_vg_b
- logical volume : shared_jfslv_b
- file system name : /shared_fs_b
- jfslog : shared_jfslog_b

- service address : 192.168.42.2 (vancouver_service)
- standby address : 192.168.142.2 (vancouver_standby)
- boot address : 192.168.42.20 (vancouver_boot)






2. Network Setup and Test


o. set hostname

   # hostname halifax
   # hostname vancouver


o. boot, standby adapter configuration

   halifax# smitty chinet

     en0 (boot)
     192.168.42.10
     255.255.255.0

     en1 (standby)
     192.168.142.1
     255.255.255.0

   vancouver# smitty chinet

     en0 (boot)
     192.168.42.20
     255.255.255.0

     en1 (standby)
     192.168.142.2
     255.255.255.0


o. verify network configuration on both node
  
   # netstat -in
   # ifconfig -a


   # cat /etc/hosts
   192.168.42.10 halifax_boot
   192.168.42.1 halifax_service
   192.168.142.1 halifax_standby
   192.168.42.20 vancouver_boot
   192.168.42.2 vancouver_service
   192.168.142.2 vancouver_standby

   # netstat -i

   # host halifax_boot
   # host halifax_service
   # host halifax_standby
   # host vancouver_boot
   # host vancouver_service
   # host vancouver_standby


o. create .rhosts file for root on both node

   # cat /.rhosts
   halifax_boot
   halifax_service
   halifax_standby
   vancouver_boot
   vancouver_service
   vancouver_standby


o. serial(rs-232) configuration on both node

   # smitty tty
   Enable login : disable
   baud rate = 9600
   parity = no
   bits = 8
   stop bits = 1


o. verify serial(rs-232) connection

   halifax# stty < /dev/tty0
   vancouver# stty < /dev/tty0





3. LVM Activities


o. check unused major number on both node

   # lvlstmajor


o. create vg, lv, fs on hdisk2 in halifax node

   halifax# smitty mkvg
   vg name = shared_vg_a
   autovaryon = no
   vg major# = 66

   halifax# smitty mklv
   lv name = shared_jfslog_a
   lv type = jfslog
   size = 1 pp

   halifax# logform /dev/shared_jfslog_a

   halifax# smitty mklv
   lv name = shared_jfslv_a
   lv type = jfs
   size = 40 pp

   halifax# smitty jfs
   mount point = /shared_fs_a
   mount automatically = no


o. verify vg, lv, fs in halifax node

   halifax# varyonvg shared_vg_a
   halifax# mount /shared_fs_a
   halifax# lsvg -l shared_vg_a

   halifax# umount /shared_fs_a
   halifax# varyoffvg shared_vg_a


o. import vg in vancouver node

   vancouver# importvg -V66 -y shared_vg_a hdisk2

   vancouver# chvg -an shared_vg_a


o. verify vg, lv, fs in vancouver node

   vancouver# varyonvg shared_vg_a
   vancouver# mount /shared_fs_a
   vancouver# lsvg -l shared_vg_a

   vancouver# umount /shared_fs_a
   vancouver# varyoffvg shared_vg_a





4. HACMP/ES Fileset Install


o. install hacmp/es fileset on both node

   halifax# smitty installp
    - cluster.adt.es
    - cluster.es
    - cluster.es.clvm
    - cluster.es.cspoc
    - cluster.es.plugins
    - cluster.license
    - cluster.man.en_US.es
    - cluster.doc.en_US.es

   vancouver# smitty installp
    - cluster.adt.es
    - cluster.es
    - cluster.es.clvm
    - cluster.es.cspoc
    - cluster.es.plugins
    - cluster.license
    - cluster.man.en_US.es
    - cluster.doc.en_US.es


o. if hacmp/es patch is available, install it

   halifax# smitty installp
   vancouver# smitty installp


o. reboot the system

   halifax# shutdown -Fr
   vancouver# shutdown -Fr


o. verify the hacmp/es smitty menu

   halifax# smitty hacmp
   vancouver# smitty hacmp


o. insert hacmp/es path to the PATH env.

   - /usr/es/sbin/cluster/utilities
   - /usr/es/sbin/cluster/diag
   - /usr/es/sbin/cluster





5. Configure Cluster Topology


o. define the cluster

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster topology 
   -> configure cluster 
   -> add cluster definition 

   cluster name : canada
   cluster id : 1


o. add cluster nodes

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster topology 
   -> configure nodes
   -> add cluster nodes

   halifax vancouver 


o. define initial adapter for each node

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster topology 
   -> configure adapters
   -> configure ip-based interface / ip labels
   -> add initial interfaces
   -> add an adapter on a new network
   
   add halifax_boot as the initial interface for the halifax node
   network type = ether
   network name = ether1

   add vancouver_boot as the initial interface for the vancouver node
   network type = ether
   network name = ether1


o. discover ip topology

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster topology 
   -> configure adapters
   -> configure ip-based interface / ip labels
   -> discover ip topology


o. add multiple ip-based interfaces

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster topology 
   -> configure adapters
   -> configure ip-based interface / ip labels
   -> add multiple ip-based interface

   standby
    - halifax_standby
    - vancouver_standby


o. add service interface

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster topology 
   -> configure adapters
   -> configure ip-based interface / ip labels
   -> add ip labels requiring indivisual configuration

   halifax_service
    mac : 00:04:00:00:00:01
   vancouver_service
    mac : 00:04:00:00:00:02


o. configure non-ip adapter

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster topology 
   -> configure adapters
   -> configure adapters on non ip-based network
   -> add an adapter
   -> add an adapter on a new network

   label : halifax_tty
   network type : rs232
   network name : rs232a
   device : /dev/tty0

   label : vancouver_tty
   network type : rs232
   network name : rs232a
   device : /dev/tty0


o. synchronize the topology

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster topology 
   -> synchronize topology


o. verify the synchronization on both node

   halifax# /usr/es/sbin/cluster/utilities/cllsif
   vancouver# /usr/es/sbin/cluster/utilities/cllsif





6. Configure Cluster Resource


o. add resource group

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster resources
   -> define resource groups
   -> add a resource group

   rg name = shared_res_grp_a
   node names = halifax vancouver


o. discover current volume group configuration

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster resources
   -> discover current volume group configuration
   -> cluster wide configuration


o. change/show resources/attributes for a resource group

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster resources
   -> change/show resources/attributes for a resource group
   -> shared_res_grp_a

   service ip label : halifax_service
   filesystems : default
   volume group : shared_vg_a


o. synchronize the resource

   halifax# smitty hacmp
   -> cluster configuration 
   -> cluster resources
   -> synchronize the resources


o. verify the synchronization on both node

   halifax# /usr/es/sbin/cluster/utilities/clshowres
   vancouver# /usr/es/sbin/cluster/utilities/clshowres





7. Cluster Administration


o. start & stop the cluster

   # smitty clstart
   # smitty clstop


o. log

   /tmp/hacmp.out
   /usr/es/adm/cluster.log


o. cluster statistics

   # clstat -a -r 1


o. cluster resource

   # clshowres
   # clfindres


   
#
# EoF
#

Posted by [TheWon]
HW/OS2011. 8. 4. 10:22

1. 일반 명령어

calc (계산기)
charmap 문자표
cleanmgr 디스크정리
clipbrd (클립보드에 복사된 내용 표시)
cmd(도스명령프롬프트 실행) 단, 윈98은 command
control (제어판)
dfrg.msc 디스크 조각모음
dxdiag (다이렉트X 진단도구 및 그래픽과 사운드의 세부정보를 보여줌)
eudcedit 사용자 정의 문자 편집기
explorer 탐색기
magnify 돋보기
mobsync 동기화
msconfig(시작프로그램 제어등 많은기능 제공)
msinfo32 시스템정보
mstsc 원격 데스크톱 연결
netstat -na(현재 열린포트와 TCP/IP 프로토콜정보를 보여줌)
         열린포트로 트라이목마형 바이러스 침투 유무확인가능
notepad 메모장
ntbackup 백업 및 복원 마법사
osk 화상키보드
pbrush 또는 mspaint (그림판)
ping 사이트주소(핑테스트 해당 사이트의 인터넷연결 유무 확인)
regedit(레지스트리 편집기)
sfc(시스템 파일 검사기)
   - 시스템 파일을 검사한후 깨지거난 손실된 파일을 원본 압축파일에서 찾아서 복원시켜줌
     단, 윈2000에서는 cmd실행 후 sfc사용 - 마지막 설정된 값을 다음 윈도우부팅시 곧바로 실행됨[수정]
sndrec32 녹음기
sndvol32 (시스템 사운드 등록정보,볼륨조절)
sysedit(autoexec.bat, config.sys, win.ini, system.ini 시스템구성편집기)
systray(사운드 볼륨설정 노란색 스피커 아이콘을 트라이목록에 띄움)
telnet open 사이트주소(텔넷접속명령어)
tourstart (윈도우 기능안내 html 문서표시)
wab 주소록
winipcfg(인터넷에 접속된 자신의 아이피 주소를 보여줌) 단, 윈2000은 ipconfig로 변경됨
winmine (지뢰찾기)
winver (윈도우 버전확인)
wmplayer (윈도우 미디어 플레이어)
wordpad 워드패드
wscui.cpl 보안센터
wupdmgr 윈도우업데이트
 
2. MSC 명령어
certmgr.msc : 인증서 관리
ciadv.msc : 인덱싱 서비스
compmgmt.msc : 컴퓨터 관리
devmgmt.msc : 장치관리자
dfrg.msc : 디스크 조각 모음
diskmgmt.msc : 디스크 관리
eventvwr.msc : 이벤트 뷰어 (이벤트 로그)
fsmgmt.msc : 공유 폴더 (공유 폴더 관리)
gpedit.msc : 그룹 정책
lusrmgr.msc : 로컬 사용자 및 그룹
ntmsmgr.msc : Removable Storage
ntmsoprq.msc : 이동식 저장소 운영자 요청
perfmon.msc : 성능
rsop.msc : 정책의 결과 집합
secpol.msc : 로컬 보안 설정
services.msc : 서비스
wmimgmt.msc : WMI 서비스 구성
comexp.msc : comexp 구성 요소 서비스
control userpasswords2 : 사용자 계정 
Posted by [TheWon]
HW/OS2011. 8. 4. 09:21
Posted by [TheWon]
HW/OS2011. 8. 3. 10:33
1. HP-UX

타임서버 시간 즉시 적용
ntpdate -u time.kriss.re.kr

타임서버 목록
time server list
time.bora.net
time.kriss.re.kr

HP-UX 에서 시간을 동기화 시키기 위한 xntpd 설정

1) "vi /etc/rc.config.d/netdaemons"
XNTPD=0 으로 되어있는 부분을
XNTPD=1 로 변경

2) "vi /etc/ntp.conf"
파일에 타임서버를 server <SERVER1> 형식으로 추가

server time.kriss.re.kr
server time.bora.net

3) "/sbin/init.d/xntpd start" 실행

4) /var/adm/syslog/syslog.log 에서 실행 로그 확인


원문 : http://www.linuxquestions.org/questions/other-*nix-55/time-synchronization-on-hpux11-376621/


적용 후 상태확인
root:ezenfos:/var/adm/syslog>ntpq -c rv
status=c011 sync_alarm, sync_unspec, 1 event, event_restart
system="UNIX/HPUX", leap=11, stratum=16, rootdelay=0.00,
rootdispersion=0.00, peer=0, refid=0.0.0.0,
reftime=00000000.00000000  Thu, Feb  7 2036 15:28:16.000, poll=4,
clock=cfdd99b8.11723000  Tue, Jul  6 2010 21:02:00.068, phase=0.000,
freq=0.00, error=0.00
root:ezenfos:/var/adm/syslog>
root:ezenfos:/var/adm/syslog>ntpq -p 
     remote           refid      st t when poll reach   delay   offset    disp
==============================================================================
 210.98.16.100   .PPS.            1 u   43   64    1    24.80   23.794 15875.0
 time.bora.net   clepsydra.dec.c  2 u   44   64    7     1.30   12.243 3875.06
root:ezenfos:/var/adm/syslog>

2. Linux

1. 운영중인 서버 ntp 패키지 설치 여부 확인
[root@reyad etc]# rpm -qa | grep ntp
ntp-4.2.0.a.20040617-4
[root@reyad etc]#

 Ntp 패키지가 설치 되어 있지 않으면 해당 버전에 맞는 CD 에서 패키지 설치 할수 있음.
  패키지 설치 방법
  #rpm ?ivh ntp~~~~~

2. 서버 부팅시 ntp 활성화 여부 확인
[root@reyad etc]# chkconfig --list | grep ntp
ntpd            0:off   1:off   2:off   3:off   4:off   5:off   6:off
[root@reyad etc]#

 Chkconfig 이용하여 서버 부팅시 ntpd 데몬 활성화 여부 확인 3,5 level 에 off 가 되어 있으면 자동 활성화
되지 않음. 자동 활성화 하기 위해서는 3,4 에 on 으로 변경

[root@reyad etc]# chkconfig --level 3 ntpd on
[root@reyad etc]# chkconfig --level 5 ntpd on
[root@reyad etc]# chkconfig --list | grep ntp
ntpd            0:off   1:off   2:off   3:on    4:off   5:on    6:off
[root@reyad etc]#

3. ntpd.conf 파일 설정
[root@reyad etc]#vi /etc/ntpd.conf
restrict default nomodify notrap noquery 부분에
server kr.pool.ntp.org
server asia.pool.ntp.org
server pool.ntp.org
추가

4. ntpd 데몬 실행
[root@reyad etc]#/etc/rc.d/init.d/ntp start

5. ntpd 시간 확인
[root@reyad etc]# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 58.73.137.250   .INIT.          16 u    -   64    0    0.000    0.000 4000.00
 58.73.137.250   .INIT.          16 u    -   64    0    0.000    0.000 4000.00
 218.234.23.44   .INIT.          16 u    -   64    0    0.000    0.000 4000.00
+218.234.23.44   211.115.194.21   3 u    4   64  377    6.229   18.609   5.512
 58.73.137.250   .INIT.          16 u    -   64    0    0.000    0.000 4000.00
*58.73.137.250   .GPS.            1 u   60   64  377   11.497   13.709   7.218
 LOCAL(0)        LOCAL(0)        10 l   53   64  377    0.000    0.000   0.001
[root@reyad etc]#
 위 * 가 현재 가져오고 있는 타임 서버임

6. /var/log/messages 확인
[root@reyad etc]# tail -f /var/log/messages
Mar 18 09:40:18 reyad ntpd: ntpd shutdown succeeded
Mar 18 09:40:20 reyad ntpd[12506]: ntpd 4.2.0a@1.1190-r Mon Oct 11 09:10:20 EDT 2004 (1)
Mar 18 09:40:20 reyad ntpd[12506]: precision = 1.000 usec
Mar 18 09:40:20 reyad ntpd[12506]: Listening on interface wildcard, 0.0.0.0#123
Mar 18 09:40:20 reyad ntpd[12506]: Listening on interface wildcard, ::#123
Mar 18 09:40:20 reyad ntpd[12506]: Listening on interface lo, 127.0.0.1#123
Mar 18 09:40:20 reyad ntpd[12506]: Listening on interface eth0, 192.168.0.222#123
Mar 18 09:40:20 reyad ntpd[12506]: kernel time sync status 0040
Mar 18 09:40:20 reyad ntpd: ntpd startup succeeded
Mar 18 09:40:24 reyad ntpd[12506]: frequency initialized 0.000 PPM from /var/lib/ntp/drift

3. AIX
   1. Verify that you have a suitable NTP server. Enter:
      # lssrc -ls xntpd
      NOTE: Sys peer should show a valid server or 127.127.1.0.
      If the server is "insane", you will need to correct it by adding a server line to /etc/ntp.conf and restarting xntpd. This can be done by following these steps:
      # vi /etc/ntp.conf
      Add:
      server 127.127.1.0
      Double check that "broadcast client" is commented out.
      # stopsrc -s xntpd
      # startsrc -s xntpd
      NOTE: If the server runs databases, use the -x flag to prevent the clock from changing in a negative direction. Enter the following:
      # startsrc -s xntpd -a "-x"
   2. Repeat Step 1 to verify that the server is synched. This process can take up to 12 minutes. 

AIX On client
   1. Verify that you have a server suitable for synchronization. Enter:
      # ntpdate -d ip.address.of.server
      The offset must be less than 1000 seconds for xntpd to synch. If the offset is greater than 1000 seconds, change the time manually on the client and run the ntpdate -d again.
      If you get the message, "no server suitable for synchronization found", verify xntpd is running on the server (see above) and that no firewalls are blocking port 123.
   2. Specify your xntp server in /etc/ntp.conf, enter:
      # vi /etc/ntp.conf
      (Comment out the "broadcastclient" line and add server ip.address.of.server prefer.)
      Leave the driftfile and tracefile at their defaults.
   3. Start the xntpd daemon:
      # startsrc -s xntpd
      (Use the -x flag if it is appropriate for your environment.)
   4. Uncomment xntpd from /etc/rc.tcpip so it will start on a reboot.
      # vi /etc/rc.tcpip
      Uncomment the following line:
      start /usr/sbin/xntpd "$src_running"
      If using the -x flag, add "-x" to the end of the line. You must include the quotes around the -x.
   5. Verify that the client is synched.
      # lssrc -ls xntpd
      NOTE: Sys peer should display the IP address or name of your xntp server. This process may take up to 12 minutes. 

Posted by [TheWon]
HW/OS2011. 8. 3. 10:27
cp 명령어 옵션
-a : 가능한 한 원 파일의 구조와 속성을 그래로 복사한다.
-b : 복사할 때 덮어쓰게 되는 파일은 백업을 만든다.
-d : 심볼릭 링크는 심볼릭 링크로 복사한다. 그리고 원본 파일과의 하드링크 관계를 유지한다.
-f : 복사 위치에 존재하는 파일을 제거하고 복사한다.
-i : 복사 시 같은 이름의 파일이 존재한다면 덮어쓸것인가 확인한다.
-P : 원본 파일의 소유자, 그룹, 권한 시간 기록을 그대로 복사한다.
-R,-r : 파일과 하위 디렉토리에 포함된 파일 모두를 복사한다.
-s : 디렉토리가 아닌 파일의 심볼릭 링크를 만든다. 소스 파일의 이름은 전체 경로 이름으로 한다       목적지 파일 이름은 전체 결오를 주지 않아도 현재 디렉토리로 간주 되므로 상관 없다.
-u : 새로 수정된 파일만 복사 한다.
-x : 다른 파일 시스템인 하위 디렉토리는 무시한다.


cp -dRP /oracle /mnt
Posted by [TheWon]