syncvg 명령어 (AIX 5.3·6.1)

핵심 정리

  • 미러 사본 가운데 stale 파티션을 동기화합니다. 대상은 -l(논리 볼륨), -p(물리 볼륨), -v(볼륨 그룹)로 정합니다: syncvg -v datavg.
  • 디스크 교체 뒤, mklvcopy로 사본을 더한 뒤(-k 없이), lsvg -l에 stale이 보일 때 실행합니다. 데이터가 많으면 오래 걸리므로 백그라운드로 돌리기도 합니다.
  • -P(1~32)로 여러 LP를 병렬 동기화해 빨라지지만 I/O 부하가 커집니다. 지정하지 않으면 환경 변수 NUM_PARALLEL_LPS를 씁니다.
  • -f는 stale 여부와 상관없이 좋은 사본 하나를 골라 모든 사본에 덮어씁니다. 미러 쓰기 일관성(MWC) 복구가 없는 LV에 필요합니다.
  • 좋은 사본이 하나는 접근 가능해야 하며, 그 사본이 있는 디스크가 ACTIVE여야 합니다.
항목 내용
버전 AIX 5.3, AIX 6.1 (내용이 같고, 6.1 문서에 RBAC 안내가 더해짐)
원문 IBM Commands Reference — 5.3 Volume 5, 6.1 Volume 5
파일 /usr/sbin/syncvg
관련 명령어 varyonvg, mklvcopy, mirrorvg, lsvg, lslv

목적

최신이 아닌 논리 볼륨 사본을 동기화합니다.

영어 원문

Synchronizes logical volume copies that are not current.

구문

text
syncvg [ -f ] [ -i ] [ -H ] [ -P NumParallelLps ] { -l | -p | -v } Name ...

설명

syncvg 명령은 원본 물리 파티션의 사본 가운데 최신이 아닌 것을 동기화합니다. 논리 볼륨, 물리 볼륨, 볼륨 그룹에 쓸 수 있으며, Name 매개변수가 각각 논리 볼륨 이름, 물리 볼륨 이름, 볼륨 그룹 이름입니다. 하드웨어 특성과 데이터 양에 따라 오래 걸릴 수 있습니다.

-f를 쓰면 좋은 물리 사본 하나를 골라, stale 여부와 상관없이 그 논리 파티션의 다른 모든 사본에 퍼뜨립니다. 논리 볼륨에 미러 쓰기 일관성 복구가 없을 때 필요합니다.

끄지 않았다면 varyonvg로 볼륨 그룹을 활성화할 때 사본을 자동으로 동기화합니다.

참고: 성공하려면 논리 볼륨의 좋은 사본이 적어도 하나 접근 가능해야 하고, 그 사본이 있는 물리 볼륨이 ACTIVE 상태여야 합니다. -f를 쓰면 이 조건이 모든 미러 사본에 적용됩니다.

-P를 주지 않으면 환경 변수 NUM_PARALLEL_LPS를 확인해, 그 값을 병렬로 동기화할 논리 파티션 수로 씁니다.

영어 원문

The syncvg command synchronizes the physical partitions, which are copies of the original physical partition, that are not current. The syncvg command can be used with logical volumes, physical volumes, or volume groups, with the Name parameter representing the logical volume name, physical volume name, or volume group name. The synchronization process can be time consuming, depending on the hardware characteristics and the amount of data.

When the -f flag is used, a good physical copy is chosen and propagated to all other copies of the logical partition, whether or not they are stale. Using this flag is necessary in cases where the logical volume does not have the mirror write consistency recovery.

Unless disabled, the copies within a volume group are synchronized automatically when the volume group is activated by the varyonvg command.

Note: For the syncvg command to be successful, at least one good copy of the logical volume should be accessible, and the physical volumes that contains this copy should be in ACTIVE state. If the -f option is used, the above condition applies to all mirror copies.

If the -P option is not specified, syncvg will check for the NUM_PARALLEL_LPS environment variable. The value of NUM_PARALLEL_LPS will be used to set the number of logical partitions to be synchronized in parallel.

플래그

플래그 설명
-f 좋은 물리 사본 하나를 골라 stale 여부와 상관없이 그 논리 파티션의 다른 모든 사본에 퍼뜨립니다.
-H 이 동기화가 끝날 때까지 다른 활성 동시 클러스터 노드에서 이 볼륨 그룹에 쓰는 것을 미룹니다. -H를 쓰면 클러스터의 모든 노드가 -P를 지원하지 않아도 -P를 쓸 수 있습니다. 동시 모드로 varyon되지 않았으면 무시합니다.
-i 이름을 표준 입력에서 읽습니다.
-l Name이 논리 볼륨 장치 이름입니다.
-p Name이 물리 볼륨 장치 이름입니다.
-P NumParallelLps 병렬로 동기화할 논리 파티션 수(1~32). 시스템, 볼륨 그룹의 디스크, 시스템 자원, 볼륨 그룹 모드에 맞춰 정해야 합니다. 동시 모드로 varyon되어 있으면 이 볼륨 그룹을 켠 다른 클러스터 노드가 모두 AIX 4.3.0 이상이어야 하며, 아니면 이 옵션을 무시하고 계속합니다.
-v Name이 볼륨 그룹 장치 이름입니다.
영어 원문
  • -f — Specifies a good physical copy is chosen and propagated to all other copies of the logical partition, whether or not they are stale.
  • -H — Postpones writes for this volume group on other active concurrent cluster nodes until this sync operation is complete. When using the -H flag, the -P flag does not require that all the nodes on the cluster support the -P flag. This flag is ignored if the volume group is not varied on in concurrent mode.
  • -i — Reads the names from standard input.
  • -l — Specifies that the Name parameter represents a logical volume device name.
  • -p — Specifies that the Name parameter represents a physical volume device name.
  • -P NumParallelLps — Numbers of logical partitions to be synchronized in parallel. The valid range for NumParallelLps is 1 to 32. NumParallelLps must be tailored to the machine, disks in the volume group, system resources, and volume group mode. When a volume group is varied on in concurrent mode, all other cluster nodes that have this volume group varied must be at least AIX 4.3.0, otherwise syncvg will ignore this option and continue. Note: See Description above for more information.
  • -v — Specifies that the Name parameter represents a volume group device name.

보안

(6.1) RBAC와 Trusted AIX 사용자: 이 명령은 특권 작업을 할 수 있으며 특권 사용자만 할 수 있습니다. 권한과 특권은 lssecattr 명령이나 getcmdattr 하위 명령으로 봅니다.

영어 원문

Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

예제

명령 하는 일
syncvg -p hdisk4 hdisk5 물리 볼륨 hdisk4, hdisk5의 사본을 동기화
syncvg -v vg04 vg05 볼륨 그룹 vg04, vg05의 사본을 동기화

자주 쓰는 형태:

bash
lsvg -l datavg | grep stale
nohup syncvg -P 8 -v datavg &          # 병렬 8, 백그라운드
syncvg -l datalv
영어 원문
  1. To synchronize the copies on physical volumes hdisk4 and hdisk5, enter:
syncvg -p hdisk4 hdisk5
  1. To synchronize the copies on volume groups vg04 and vg05, enter:
syncvg -v vg04 vg05

파일

파일 설명
/usr/sbin/syncvg syncvg 명령
/tmp 명령이 실행되는 동안 임시 파일을 두는 디렉터리
영어 원문
  • /usr/sbin/syncvg — Contains the syncvg command.
  • /tmp — Directory where the temporary files are stored and while the command is running.

Related information:

  • varyonvg command
  • Logical volume storage
  • System Management Interface Tool (SMIT)
  • Trusted AIX®
  • RBAC in AIX Version 6.1 Security

리눅스(GNU)와 다른 점

리눅스 LVM2도 물리 볼륨(PV), 볼륨 그룹(VG), 논리 볼륨(LV) 구조가 같지만 명령 이름이 다릅니다. AIX lspv·lsvg·lslv는 pvs/pvdisplay, vgs/vgdisplay, lvs/lvdisplay에, mkvg·extendvg·reducevg는 vgcreate·vgextend·vgreduce에, mklv·extendlv·rmlv는 lvcreate·lvextend·lvremove에, varyonvg·varyoffvg는 vgchange -ay/-an에, importvg·exportvg는 vgimport·vgexport에, migratepv는 pvmove에 해당합니다. AIX의 물리 파티션(PP)은 리눅스의 물리 익스텐트(PE)이고, 미러는 lvcreate --type raid1이나 lvconvert -m1로 만듭니다. 리눅스는 디스크마다 PVID 대신 PV UUID를 쓰며, 파일 시스템은 따로 mkfs로 만듭니다. 리눅스 LVM RAID1은 자동으로 다시 맞추며, 상태는 lvs -a -o name,sync_percent로 보고 강제로 다시 맞출 때는 lvchange --resync나 lvchange --syncaction repair를 씁니다.