Sun Cluster 3.0 12/01 시스템 관리 안내서

8.1.5 볼륨을 온라인으로 백업하는 방법(VERITAS Volume Manager)

VERITAS Volume Manager는 이중화된 볼륨을 플렉스로 인식합니다. 플렉스는 전체 볼륨을 마운트 해제하거나 오프라인으로 전환하지 않고 백업할 수 있습니다. 이 백업은 시스템을 중지시키거나 데이터에 대한 사용자의 액세스를 거부하지 않고 볼륨의 스냅샷 사본을 만들고 이 임시 볼륨을 백업하는 방법으로 수행합니다.

백업 절차를 수행하기 전에 클러스터가 문제 없이 실행되는지 확인하십시오.

  1. 클러스터의 노드에 로그온한 다음 클러스터에 있는 디스크 그룹의 현재 1차 노드에 대해 수퍼유저가 되십시오.

  2. 디스크 그룹 정보를 표시하십시오.


    # vxprint -g diskgroup
    

  3. scstat(1M) 명령을 실행하여 현재 가져온 디스크 그룹이 어느 노드에 있는지 확인하십시오. 이 노드가 디스크 그룹에 대한 1차 노드입니다.


    # scstat -D
    

    -D

    모든 디스크 장치 그룹의 상태를 표시합니다.

  4. vxassist(1M) 명령을 사용하여 볼륨에 대한 스냅샷을 만드십시오.


    # vxassist -g diskgroup snapstart volume
    


    주 -

    볼륨 크기에 따라 스냅샷을 만드는 시간이 오래 걸릴 수 있습니다.


  5. 새 볼륨이 만들어졌는지 확인하십시오.


    # vxprint -g diskgroup
    

    스냅샷이 완성되면 선택한 디스크 그룹에 대한 State 필드에 Snapdone이라고 표시됩니다.

  6. 파일 시스템에 액세스하는 데이터 서비스를 중지시키십시오.


    # scswitch -z -g resource-group -h ""
    


    주 -

    데이터 파일 시스템이 제대로 백업되려면 모든 데이터 서비스를 중지시켜야 합니다. 데이터 서비스가 실행되지 않는 경우에는 단계 6단계 8을 수행할 필요가 없습니다.


  7. bkup-vol이라는 백업 볼륨을 만들고 vxassist 명령을 사용하여 만든 볼륨에 스냅샷 볼륨을 연결하십시오.


    # vxassist -g diskgroup snapshot volume bkup-vol
    

  8. scswitch 명령을 사용하여 단계 6에서 중단된 데이터 서비스를 다시 시작하십시오.


    # scswitch -z -g resource-group -h nodelist
    

  9. vxprint 명령을 사용하여 볼륨이 새 볼륨 bkup-vol에 연결되었는지 확인하십시오.


    # vxprint -g diskgroup
    

  10. 디스크 그룹 구성의 변경 사항을 등록하십시오.


    # scconf -c -D name=diskgroup,sync
    

  11. fsck 명령을 사용하여 백업 볼륨을 확인하십시오.


    # fsck -y /dev/vx/rdsk/diskgroup/bkup-vol
    

  12. 테이프 또는 다른 매체에 볼륨 bkup-vol을 복사하는 백업을 수행하십시오.

    ufsdump(1M) 명령이나 일반적으로 사용하는 백업 유틸리티를 사용하십시오.


    # ufsdump 0ucf dump-device /dev/vx/dsk/diskgroup/bkup-vol
    

  13. vxedit(1M) 명령을 사용하여 임시 볼륨을 제거하십시오.


    # vxedit -rf rm bkup-vol
    

  14. scconf 명령을 사용하여 디스크 그룹 구성의 변경 사항을 등록하십시오.


    # scconf -c -D name=diskgroup,sync
    

8.1.5.1 예: 볼륨에 대한 온라인 백업 수행(VERITAS Volume Manager)

다음 예에서 클러스터 노드 phys-schost-2가 메타 세트 디스크 그룹 schost-1의 1차 소유자입니다. 따라서 백업 절차는 phys-schost-2에서 수행됩니다. 볼륨 /vo101이 복사된 다음 새 볼륨 bkup-vol에 연결됩니다.


[Become superuser on the primary node.]
[Identify the current primary node for the disk group:]
# scstat -D
-- Device Group Servers --
                         Device Group     Primary           Secondary
                         ------------     -------           ---------
 Device group servers:   rmt/1            -                 -
 Device group servers:   schost-1         phys-schost-2     phys-schost-1

-- Device Group Status --
                             Device Group        Status              
                             ------------        ------              
 Device group status:        rmt/1               Offline
 Device group status:        schost-1            Online
[List the disk group information:]
# vxprint -g schost-1
TY NAME            ASSOC     KSTATE   LENGTH   PLOFFS STATE   TUTIL0  PUTIL0
dg schost-1       schost-1   -        -        -      -        -      -
  
dm schost-101     c1t1d0s2   -        17678493 -      -        -      -
dm schost-102     c1t2d0s2   -        17678493 -      -        -      -
dm schost-103     c2t1d0s2   -        8378640  -      -        -      -
dm schost-104     c2t2d0s2   -        17678493 -      -        -      -
dm schost-105     c1t3d0s2   -        17678493 -      -        -      -
dm schost-106     c2t3d0s2   -        17678493 -      -        -      -
 
v  vol01          gen        ENABLED  204800   -      ACTIVE   -      -
pl vol01-01       vol01      ENABLED  208331   -      ACTIVE   -      -
sd schost-101-01  vol01-01   ENABLED  104139   0      -        -      -
sd schost-102-01  vol01-01   ENABLED  104139   0      -        -      -
pl vol01-02       vol01      ENABLED  208331   -      ACTIVE   -      -
sd schost-103-01  vol01-02   ENABLED  103680   0      -        -      -
sd schost-104-01  vol01-02   ENABLED  104139   0      -        -      -
pl vol01-03       vol01      ENABLED  LOGONLY  -      ACTIVE   -      -
sd schost-103-02  vol01-03   ENABLED  5        LOG    -        -      -
[Start the snapshot operation:]
# vxassist -g schost-1 snapstart vol01
[Verify the new volume was created:]
# vxprint -g schost-1
TY NAME            ASSOC    KSTATE    LENGTH   PLOFFS STATE   TUTIL0  PUTIL0
dg schost-1       schost-1   -        -        -      -        -      -
  
dm schost-101     c1t1d0s2   -        17678493 -      -        -      -
dm schost-102     c1t2d0s2   -        17678493 -      -        -      -
dm schost-103     c2t1d0s2   -        8378640  -      -        -      -
dm schost-104     c2t2d0s2   -        17678493 -      -        -      -
dm schost-105     c1t3d0s2   -        17678493 -      -        -      -
dm schost-106     c2t3d0s2   -        17678493 -      -        -      -
  
v  vol01          gen        ENABLED  204800   -      ACTIVE   -      -
pl vol01-01       vol01      ENABLED  208331   -      ACTIVE   -      -
sd schost-101-01  vol01-01   ENABLED  104139   0      -        -      -
sd schost-102-01  vol01-01   ENABLED  104139   0      -        -      -
pl vol01-02       vol01      ENABLED  208331   -      ACTIVE   -      -
sd schost-103-01  vol01-02   ENABLED  103680   0      -        -      -
sd schost-104-01  vol01-02   ENABLED  104139   0      -        -      -
pl vol01-03       vol01      ENABLED  LOGONLY  -      ACTIVE   -      -
sd schost-103-02  vol01-03   ENABLED  5        LOG    -        -      -
pl vol01-04       vol01      ENABLED  208331   -      SNAPDONE -      -
sd schost-105-01  vol01-04   ENABLED  104139   0      -        -      -
sd schost-106-01  vol01-04   ENABLED  104139   0      -        -      -
[Stop data services, if necessary:]
# scswitch -z -g nfs-rg -h ""
[Create a copy of the volume:]
# vxassist -g schost-1 snapshot vol01 bkup-vol
[Restart data services, if necessary:]
# scswitch -z -g nfs-rg -h phys-schost-1
[Verify bkup-vol was created:]
# vxprint -g schost-1
TY NAME           ASSOC       KSTATE   LENGTH   PLOFFS STATE   TUTIL0  PUTIL0
dg schost-1       schost-1    -        -        -      -        -      -
 
dm schost-101     c1t1d0s2    -        17678493 -      -        -      -
...
 
v  bkup-vol       gen         ENABLED  204800   -      ACTIVE   -      -
pl bkup-vol-01    bkup-vol    ENABLED  208331   -      ACTIVE   -      -
sd schost-105-01  bkup-vol-01 ENABLED  104139   0      -        -      -
sd schost-106-01  bkup-vol-01 ENABLED  104139   0      -        -      -
 
v  vol01          gen         ENABLED  204800   -      ACTIVE   -      -
pl vol01-01       vol01       ENABLED  208331   -      ACTIVE   -      -
sd schost-101-01  vol01-01    ENABLED  104139   0      -        -      -
sd schost-102-01  vol01-01    ENABLED  104139   0      -        -      -
pl vol01-02       vol01       ENABLED  208331   -      ACTIVE   -      -
sd schost-103-01  vol01-02    ENABLED  103680   0      -        -      -
sd schost-104-01  vol01-02    ENABLED  104139   0      -        -      -
pl vol01-03       vol01       ENABLED  LOGONLY  -      ACTIVE   -      -
sd schost-103-02  vol01-03    ENABLED  5        LOG    -        -      -
[Synchronize the disk group with cluster framework:]
# scconf -c -D name=schost-1,sync
[Check the file systems:]
# fsck -y /dev/vx/rdsk/schost-1/bkup-vol
[Copy bkup-vol to the backup device:]
# ufsdump 0ucf /dev/rmt/0 /dev/vx/rdsk/schost-1/bkup-vol
  DUMP: Writing 63 Kilobyte records
  DUMP: Date of this level 0 dump: Tue Apr 25 16:15:51 2000
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/vx/dsk/schost-2/bkup-vol to /dev/rmt/0.
  ...
  DUMP: DUMP IS DONE
[Remove the bkup-volume:]
# vxedit -rf rm bkup-vol
[Synchronize the disk group:]
# scconf -c -D name=schost-1,sync