Oracle/RAC

RAC 구성하기(solaris 10, oracle 10g) #3 ; 스토리지설정 및 node2 설정, equivalance 설정

에몽이ㅋ 2012. 4. 30. 17:57
0. openfiler는 계속 켜져있어야합니다.
1. node1(rac1)을 부팅합니다.
2. 스토리지 설정
# svcs *iscsi*
# svcadm enable svc:/network/iscsi_initiator
# iscsiadm modify discovery --sendtargets enable
# iscsiadm list discovery
# iscsiadm add discovery-address 192.168.0.30
# iscsiadm list discovery-address
# iscsiadm list target
# devfsadm -C -i iscsi
# svcs *iscsi*
STATE          STIME    FMRI
disabled       17:43:14 svc:/network/iscsi_initiator:default
disabled       17:43:16 svc:/system/iscsitgt:default
# svcadm enable svc:/network/iscsi_initiator
# svcs *iscsi*
STATE          STIME    FMRI
disabled       17:43:16 svc:/system/iscsitgt:default
online         17:46:42 svc:/network/iscsi_initiator:default
# iscsiadm modify discovery --sendtargets enable
# iscsiadm list discovery
Discovery:
        Static: disabled
        Send Targets: enabled
        iSNS: disabled
# iscsiadm add discovery-address 192.168.0.30
# iscsiadm list discovery-address
Discovery Address: 192.168.0.30:3260
# iscsiadm list target
Target: iqn.2006-01.com.openfiler:tsn.c6aa462d63b9
        Alias: -
        TPGT: 1
        ISID: 4000002a0000
        Connections: 1
.... 중략 ....
Target: iqn.2006-01.com.openfiler:tsn.274a422a163c
        Alias: -
        TPGT: 1
        ISID: 4000002a0000
        Connections: 1
# devfsadm -C -i iscsi


3. 디스크세팅
# format
Specify disk (enter its number): 디스크선택
(경로에 openfiler가 있는 디스크는 모두 작업해야합니다.)

디스크 선택 후
format> fdisk


y 입력

format> part
partition> 0

Enter partition id tag[unassigned]: 엔터
Enter partition permission flags[wm]: 엔터
Enter new starting cyl[0]: 3  (0이나 엔터를 입력하게 되면, clusterware설치가 불가능합니다.)
Enter partition size[0b, 0c, 3e, 0.00mb, 0.00gb]: $
partition> label
Ready to label disk, continue? y
partition> quit
format> disk
디스크 선택
이후 모든 openfiler가 있는 디스크를 동일하게 작업하세요

# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c1t0d0 
          /pci@0,0/pci15ad,1976@10/sd@0,0
.... 중략 ....
          /iscsi/disk@0000iqn.2006-01.com.openfiler%3Atsn.274a422a163c0001,0
Specify disk (enter its number): 1
selecting c2t2d0
[disk formatted]


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
.... 중략 ....
        !     - execute , then return
        quit
format> fdisk
No fdisk table exists. The default partition for the disk is:

  a 100% "SOLARIS System" partition

Type "y" to accept the default partition,  otherwise type "n" to edit the
 partition table.
y
format> part


PARTITION MENU:
        0      - change `0' partition
        1      - change `1' partition
.... 중략 ....
        ! - execute , then return
        quit
partition> 0
Part      Tag    Flag     Cylinders       Size            Blocks
  0 unassigned    wm       0              0         (0/0/0)        0

Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]: 3
Enter partition size[0b, 0c, 3e, 0.00mb, 0.00gb]: $
partition> label
Ready to label disk, continue? y

partition> quit


FORMAT MENU:
        disk       - select a disk
.... 중략 ....
        !     - execute , then return
        quit
format> disk


AVAILABLE DISK SELECTIONS:
       0. c1t0d0 
          /pci@0,0/pci15ad,1976@10/sd@0,0
       1. c2t2d0 
          /iscsi/disk@0000iqn.2006-01.com.openfiler%3Atsn.c6aa462d63b90001,0
.... 중략 ....
       8. c2t9d0 
          /iscsi/disk@0000iqn.2006-01.com.openfiler%3Atsn.274a422a163c0001,0
Specify disk (enter its number)[1]:



4. power off 하고 노드2 만들기
# init 0 (셧다운)
이후 


이후 노드2를 부팅합니다. 추가적으로 뜨는 메시지에서는 I copied it.을 선택하세요.


5. 노드2 셋팅
5.1 IP재설정
5.1.1 이전상태확인
# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=4001000842 mtu 1500 i ndex 2
inet 192.168.0.20 netmask ffffff00 broadcast 192.168.0.255
ether 0:c:29:5d:f8:1b
e1000g1: flags=1000842 mtu 1500 index 3
inet 0.0.0.0 netmask 0
ether 0:c:29:5d:f8:25

e1000g0, e1000g1을 변경합니다.

5.1.2 hostname 변경 및 네크워크카드설정
vi /etc/nodename
rac2

vi /etc/hostname.e1000g0
rac2

vi /etc/hostname.e1000g1
rac2-priv

5.1.3 네트워크카드 IP 설정
for host IP
ifconfig e1000g0 down
ifconfig e1000g0 unplumb
ifconfig e1000g0 plumb 192.168.0.21 up
ifconfig e1000g0 netmask 255.255.255.0 broadcast + up

for private IP
ifconfig e1000g1 down
ifconfig e1000g1 unplumb
ifconfig e1000g1 plumb 192.168.79.151 up
ifconfig e1000g1 netmask 255.255.255.0 broadcast + up

5.1.4 리붓 후 변경확인
# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843 mtu 1500 index 2
inet 192.168.0.21 netmask ffffff00 broadcast 192.168.0.255
ether 0:c:29:4e:e5:c7
e1000g1: flags=1000843 mtu 1500 index 3
inet 192.168.79.151 netmask ffffff00 broadcast 192.168.79.255
ether 0:c:29:4e:e5:d1

5.2 oracle의 .profile 수정
export ORACLE_SID=rac2
$ hostname
rac2
$ vi .profile
export ORACLE_SID=rac2


5.3 iSCSI에 접근가능한지 확인하기
(따로 안해도 됩니다. list를 살펴보고 안되면 2.스토리지설정 부분을 다시 해주세요)


6. equivalance 설정
두 노드 모두 킨 후 oracle 유저에서 작업하세요.
한행씩 실행하세요


모든노드
mkdir .ssh
ssh-keygen -t rsa (실행 후 엔터3번)
ssh-keygen -t dsa  (실행 후 엔터3번) 

노드1에서만
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
ssh rac2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh rac2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
scp ~/.ssh/authorized_keys rac2:~/.ssh/authorized_keys

모든노드
exec ssh-agent $SHELL   << ./runInstaller 설치하기 전에 한번 실행해주세요.
ssh-add  
ssh rac1 date
ssh rac1-priv date
ssh rac2 date
ssh rac2-priv date
(위 date명령들을 실행했을때, 비밀번호를 묻지않아야 합니다. known list관련 메시지는 상관없음)