ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • x86서버 리눅스 oracle 19c HA(Active-Standby) HBA 가용성테스트
    IT이야기 2022. 12. 9. 18:42

    신규서버 구축 후에 가용성테스트의 경우는 필수 항목 중 하나라는 걸 아실텐데요. 장애상황을 대비한 HBA 항목을 진행했을때 일어난 상황들을 정리하여 보았습니다. 필요하신 분들은 참고해보시면 좋을 것 같습니다

     

    1. 서버 정보

    서버 : DellEMC R750

    OS : Redhat Enterprise Linux 8.4

    클러스터 : VCS(Veritas)

    서버구성 : DB+AP(A-S)

     

    2. 클러스터 상태 확인

    # hastatus -sum

     

    -- SYSTEM STATE

    -- System                      State                          Frozen

     

    A hrda1                         RUNNING                 0

    A hrda2                         RUNNING                 0

     

    -- GROUP STATE

    -- Group                        System                  Probed                AutoDisabled            State

     

    B host_hr                      hosthrda1              Y                         N                               ONLINE

    B host_hr                      hosthrda2              Y                         N                               OFFLINE

     

    3. Active(#1) 서버 HBA 케이블 2EA 모두 절체 

     -> 아시겠지만, HBA Card 2개가 모두 Fault 장애 발생한 상황을 재현하는 케이스 입니다.

     

    3-1) 절체한 HBA 케이블 링크 연결상태를 확인했을때 결과 입니다.

    # /sys/class/fc_host/host12/port_state

    Linkdown

    # /sys/class/fc_host/host13/port_state

    Linkdown

     

    3-2) HBA와 연결되어 있는 스토리지 디스크 연결 상태를 확인합니다(EMC 기준)

    # vxdmpadm listctlr all

    CTLR_NAME         ENCLR_TYPE           STATE            ENCLR_NAME              PATH_COUNT

    c0                           Disk                            ENABLED      disk                                2

    c20                         EMC                           DISABLED     pmax_250                      30

    c30                         EMC                           DISABLED     pmax_250                      30

    c20                         EMC                           DISABLED     pmax_251                      30

    c30                         EMC                           DISABLED     pmax_251                      30

     

    3-3) 클러스터인 VCS 상태를 확인합니다

    # hastatus -sum

     

    -- SYSTEM STATE

    -- System                      State                          Frozen

     

    A hrda1                         RUNNING                 0

    A hrda2                         RUNNING                 0

     

    -- GROUP STATE

    -- Group                        System                  Probed                AutoDisabled            State

     

    B host_hr                      hosthrda1              Y                         N                              OFFLINE|FAULTED

    B host_hr                      hosthrda2              Y                         N                              ONLINE 

     

    Active(#1)서버가 Standby(#2)로 failover가 잘 된 것을 확인할 수 있습니다.

     

    4. Active(#1) 서버의 절체된 HBA 케이블 2EA 모두 연결 후, 클러스터(VCS)명령으로 원복(failback) 수행

    # hagrp -switch host_hr -to hosthrda1

     

    4-1) 클러스터인 VCS 상태를 확인합니다

    # hastatus -sum

     

    -- SYSTEM STATE

    -- System                      State                          Frozen

     

    A hrda1                         RUNNING                 0

    A hrda2                         RUNNING                 0

     

    -- GROUP STATE

    -- Group                        System                  Probed                AutoDisabled            State

     

    B host_hr                      hosthrda1              Y                         N                              STARTING|PARTIAL

    B host_hr                      hosthrda2              Y                         N                              OFFLINE 

     

    -> Active(#1)서버가 Online 상태가 안되는 걸 확인할 수가 있습니다

     

    -- RESOURCES FAILED

    -- Group            Type                Resource                  System                

    B host_hr          Mount              mnt_engn001           hosthrda2         

    B host_hr          Mount              mnt_logs001             hosthrda2         

     

    -> 실제로 스토리지에 연결된 공유파일시스템은 Active(#1)서버에 마운트 되었으나, 에러 상태로 표시됩니다

     

    -- RESOURCES ONLINING

    -- Group            Type                Resource                  System                    Istate

    F host_hr          Oracle             ora_newhr1               hosthrda2                W_ONLINE

     

    -> 결과적으로 Active(#1) 서버로 Oracle DB가 원복 기동이 되지 않습니다

     

    5. 분석결과(Active#1서버에서 명령 수행)

    # ipcs

    ----------------- Shared Memory Segments -------------------------

    key                 shmid         owner          perms          bytes           nattch          status

    0x00000000   20              orasvc01      640             15223565 

    0x00000000   21              orasvc01      640             253265623

    0x00000000   22              orasvc01      640             40584214

    0x93254ef0    23              orasvc01      640             1054215

     

    ------- Semaphore Arrays --------------

    key                 shmid         owner          perms          nsems

    0x22085870   390425      orasvc01     600               250

    0x22085871   390426      orasvc01     600               250

    0x22085872   390427      orasvc01     600               250

    0x22085873   390428      orasvc01     600               250

    0x22085874   390429      orasvc01     600               250

    0x22085875   390430      orasvc01     600               250

     

    -> 최초 Active(#1)서버의 HBA 케이블 2EA 모두를 절체 후 Standby(#2)서버로 failover가 잘 되어 DB가 넘어가긴 했지만, Active(#1)서버의 DB가 정상 종료가 되지 않았기 때문에 Shared Memory와 Semaphore가 클리어 되지 않아 원복이 되지 않았습니다. 1개의 인스턴스의 용량을 잡고 있는 상태에서 DB기동을 하려고 하니, 메모리가 부족한겁니다.

     

    # ipcs -lm

    max number of segments = 

    max seg size (kbytes) =

    max total shared memory (kbytes) =

    min seg size (bytyes) =

     

    -> 공유메모리의 설정 값들을 확인하실때 수행해주시면 됩니다.

     

    6. 조치방법

    6-1) Oracle DB user로 떠 있는 Shared memory 및 Semaphore 삭제 후 원복 수행

    # ipcrm -m shmid(390425)

     

    6-2) 클러스터(vcs) 리소스 재기동

    # hagrp -clear host_hr -sys hosthrda1

    # hagrp -offline host_hr -sys hosthrda1

    # hagrp -online host_hr -sys hosthrda1

     

    6-3) 클러스터 서비스 재기동

    # hastop -local

    # hastart

     

    6-4) 서버 재기동

    # reboot

Designed by Tistory.