탐색 링크 건너뛰기 | |
인쇄 보기 종료 | |
![]() |
Oracle Solaris Cluster 시스템 관리 설명서 Oracle Solaris Cluster 3.3 3/13 (한국어) |
1. Oracle Solaris Cluster 관리 방법 소개
2. Oracle Solaris Cluster 및 RBAC
5. 전역 장치, 디스크 경로 모니터링 및 클러스터 파일 시스템 관리
11. Oracle Solaris Cluster 소프트웨어 및 펌웨어 패치 작업
개별 파일을 대화식으로 복원하는 방법(Solaris Volume Manager)
루트(/) 파일 시스템을 복원하는 방법(Solaris Volume Manager)
Solaris Volume Manager 볼륨에 있었던 루트(/) 파일 시스템을 복원하는 방법
표 12-1 작업 맵: 클러스터 파일 백업
|
이 절차를 사용하여 백업할 파일 시스템의 이름을 확인합니다.
이 명령을 실행하기 위해 수퍼 유저나 동등한 역할로 전환할 필요는 없습니다.
# more /etc/vfstab
파일 시스템을 백업할 때 이 이름을 사용합니다.
# more /etc/vfstab
예 12-1 백업할 파일 시스템 이름 찾기
다음 예에서는 /etc/vfstab 파일에 나열된 사용 가능한 파일 시스템의 이름을 표시합니다.
# more /etc/vfstab #device device mount FS fsck mount mount #to mount to fsck point type pass at boot options # #/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes - f - /dev/fd fd - no - /proc - /proc proc - no - /dev/dsk/c1t6d0s1 - - swap - no - /dev/dsk/c1t6d0s0 /dev/rdsk/c1t6d0s0 / ufs 1 no - /dev/dsk/c1t6d0s3 /dev/rdsk/c1t6d0s3 /cache ufs 2 yes - swap - /tmp tmpfs - yes -
이 절차를 사용하여 파일 시스템을 백업하는 데 필요한 테이프 수를 계산합니다.
# ufsdump S filesystem
백업을 수행하는 데 필요한 예상 바이트 수를 표시합니다.
백업할 파일 시스템의 이름을 지정합니다.
예 12-2 필요한 테이프 수 결정
다음 예에서 파일 시스템 크기 905,881,620바이트는 4GB 테이프로 충분합니다(905,881,620 ÷ 4,000,000,000).
# ufsdump S /global/phys-schost-1 905881620
이 절차를 사용하여 클러스터 노드의 루트(/) 파일 시스템을 백업합니다. 백업 절차를 수행하기 전에 클러스터가 오류 없이 실행되는지 확인합니다.
phys-schost# 프롬프트는 전역 클러스터 프롬프트를 반영합니다. 전역 클러스터에서 이 절차를 수행합니다.
이 절차에서는 장문형 Oracle Solaris Cluster 명령을 제공합니다. 대부분의 명령에는 단문형도 있습니다. 명령은 명령 이름이 장문형과 단문형인 것을 제외하면 동일합니다.
# clnode evacuate node
전환할 자원 그룹 및 장치 그룹이 있는 노드를 지정합니다.
# shutdown -g0 -y -i0
SPARC 기반 시스템에서는 다음 명령을 실행합니다.
ok boot -xs
x86 기반 시스템에서는 다음 명령을 실행합니다.
phys-schost# shutdown -g -y -i0 Press any key to continue
GRUB 메뉴는 다음과 같이 나타납니다.
GNU GRUB version 0.95 (631K lower / 2095488K upper memory) +-------------------------------------------------------------------------+ | Solaris 10 /sol_10_x86 | | Solaris failsafe | | | +-------------------------------------------------------------------------+ Use the ^ and v keys to select which entry is highlighted. Press enter to boot the selected OS, 'e' to edit the commands before booting, or 'c' for a command-line.
GRUB 기반 부트에 대한 자세한 내용은 Oracle Solaris 관리: 기본 관리의 GRUB를 사용하여 x86 기반 시스템 부트(작업 맵)를 참조하십시오.
GRUB 부트 매개변수 화면은 다음과 같이 나타납니다.
GNU GRUB version 0.95 (615K lower / 2095552K upper memory) +----------------------------------------------------------------------+ | root (hd0,0,a) | | kernel /platform/i86pc/multiboot | | module /platform/i86pc/boot_archive | +----------------------------------------------------------------------+ Use the ^ and v keys to select which entry is highlighted. Press 'b' to boot, 'e' to edit the selected command in the boot sequence, 'c' for a command-line, 'o' to open a new line after ('O' for before) the selected line, 'd' to remove the selected line, or escape to go back to the main menu.
[ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ESC at any time exits. ] grub edit> kernel /platform/i86pc/multiboot -x
화면에 편집된 명령이 표시됩니다.
GNU GRUB version 0.95 (615K lower / 2095552K upper memory) +----------------------------------------------------------------------+ | root (hd0,0,a) | | kernel /platform/i86pc/multiboot -x | | module /platform/i86pc/boot_archive | +----------------------------------------------------------------------+ Use the ^ and v keys to select which entry is highlighted. Press 'b' to boot, 'e' to edit the selected command in the boot sequence, 'c' for a command-line, 'o' to open a new line after ('O' for before) the selected line, 'd' to remove the selected line, or escape to go back to the main menu.-
주 - 커널 부트 매개 변수 명령에 대한 변경 사항은 시스템을 재부트하면 사라집니다. 다음에 노드를 재부트하면 클러스터 모드로 부트됩니다. 비클러스터 모드로 부트하려면 이러한 단계를 다시 실행하여 -x 옵션을 커널 부트 매개변수 명령에 추가합니다.
# df -k
# ls /backing-store-file
# fssnap -F ufs -o bs=/backing-store-file /file-system
# /usr/lib/fs/ufs/fssnap -i /file-system
# ufsdump 0ucf /dev/rmt/0 snapshot-name
예:
# ufsdump 0ucf /dev/rmt/0 /dev/rfssnap/1
# ufsrestore ta /dev/rmt/0
# init 6
예 12-3 루트(/) 파일 시스템 백업
다음 예에서 루트(/) 파일 시스템의 스냅샷은 /usr 디렉토리의 /scratch/usr.back.file에 저장됩니다. `
# fssnap -F ufs -o bs=/scratch/usr.back.file /usr /dev/fssnap/1
미러된 Solaris Volume Manager 볼륨은 마운트 해제하거나 전체 미러를 오프라인 상태로 전환하지 않고도 백업할 수 있습니다. 하위 미러 중 하나는 일시적으로 오프라인으로 전환하여 미러링을 제거해야 하지만 백업이 완료되면 바로 온라인으로 전환되어 동기화되므로 시스템이 중단되거나 데이터에 대한 사용자의 액세스를 거부하지 않습니다. 미러를 사용하여 온라인 백업을 수행하면 현재 작동하는 파일 시스템의 "스냅샷"이 백업됩니다.
lockfs 명령이 실행되기 직전에 프로그램에서 볼륨에 데이터를 쓰면 문제가 발생할 수 있습니다. 이 문제를 방지하려면, 이 노드에서 실행되는 모든 서비스를 일시적으로 중지하십시오. 또한 백업 절차를 수행하기 전에 클러스터가 오류 없이 실행되는지 확인합니다.
phys-schost# 프롬프트는 전역 클러스터 프롬프트를 반영합니다. 전역 클러스터에서 이 절차를 수행합니다.
이 절차에서는 장문형 Oracle Solaris Cluster 명령을 제공합니다. 대부분의 명령에는 단문형도 있습니다. 명령은 명령 이름이 장문형과 단문형인 것을 제외하면 동일합니다.
# metaset -s setname
디스크 세트 이름을 지정합니다.
# lockfs -w mountpoint
주 - UFS 파일 시스템이 미러에 있는 경우에만 파일 시스템을 잠가야 합니다. 예를 들어, Solaris Volume Manager 볼륨이 데이터베이스 관리 소프트웨어 또는 기타 일부 특정 응용 프로그램에 대한 원시 장치로 설정된 경우 lockfs 명령을 사용할 필요가 없습니다. 하지만 버퍼를 비우거나 액세스를 잠그기 위해 적당한 업체별 유틸리티를 실행할 수 있습니다.
# metastat -s setname -p
md.tab 파일과 유사한 형식으로 상태를 표시합니다.
# metadetach -s setname mirror submirror
주 - 읽기 기능은 다른 하위 미러에서 계속 제공합니다. 그러나 미러에 첫번째 쓰기 작업이 수행되면 그 때부터 오프라인 상태의 하위 미러에 대한 동기화가 수행되지 않습니다. 오프라인 상태의 하위 미러가 다시 온라인 상태로 전환되면 이러한 불일치 문제가 해결됩니다. fsck 명령을 수행할 필요가 없습니다.
# lockfs -u mountpoint
# fsck /dev/md/diskset/rdsk/submirror
ufsdump(1M) 명령 또는 평소에 사용하는 백업 유틸리티를 사용합니다.
# ufsdump 0ucf dump-device submirror
주 - 하위 미러에 대해 블록 장치(/dsk) 이름이 아닌 원시 장치(/rdsk) 이름을 사용합니다.
# metattach -s setname mirror submirror
메타 장치 또는 볼륨이 온라인으로 전환되면 자동으로 미러와 다시 동기화됩니다.
# metastat -s setname mirror
예 12-4 미러에 대해 온라인 백업 수행(Solaris Volume Manager)
다음 예에서 클러스터 노드 phys-schost-1은 메타 세트 schost-1의 소유자이므로 백업 절차는 phys-schost-1에서 수행됩니다. 미러 /dev/md/schost-1/dsk/d0은 하위 미러 d10, d20 및 d30으로 구성됩니다.
[Determine the owner of the metaset:] # metaset -s schost-1 Set name = schost-1, Set number = 1 Host Owner phys-schost-1 Yes ... [Lock the file system from writes:] # lockfs -w /global/schost-1 [List the submirrors:] # metastat -s schost-1 -p schost-1/d0 -m schost-1/d10 schost-1/d20 schost-1/d30 1 schost-1/d10 1 1 d4s0 schost-1/d20 1 1 d6s0 schost-1/d30 1 1 d8s0 [Take a submirror offline:] # metadetach -s schost-1 d0 d30 [Unlock the file system:] # lockfs -u / [Check the file system:] # fsck /dev/md/schost-1/rdsk/d30 [Copy the submirror to the backup device:] # ufsdump 0ucf /dev/rmt/0 /dev/md/schost-1/rdsk/d30 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/md/schost-1/rdsk/d30 to /dev/rdsk/c1t9d0s0. ... DUMP: DUMP IS DONE [Bring the submirror back online:] # metattach -s schost-1 d0 d30 schost-1/d0: submirror schost-1/d30 is attached [Resynchronize the submirror:] # metastat -s schost-1 d0 schost-1/d0: Mirror Submirror 0: schost-0/d10 State: Okay Submirror 1: schost-0/d20 State: Okay Submirror 2: schost-0/d30 State: Resyncing Resync in progress: 42% done Pass: 1 Read option: roundrobin (default) ...
클러스터 구성을 아카이브하고 사용 중인 클러스터 구성을 쉽게 복구하려면 클러스터 구성을 주기적으로 백업합니다. Oracle Solaris Cluster 에서는 사용 중인 클러스터 구성을 XML(eXtensible Markup Language) 파일로 내보내는 기능을 제공합니다.
# /usr/cluster/bin/cluster export -o configfile
클러스터 명령이 클러스터 구성 정보를 내보내는 XML 구성 파일의 이름입니다. XML 구성 파일에 대한 자세한 내용은 clconfiguration(5CL)을 참조하십시오.
# vi configfile