varyoffvg 명령어 (AIX 5.3·6.1)

핵심 정리

  • 볼륨 그룹과 그 논리 볼륨을 비활성화합니다: varyoffvg datavg. 다시 쓰려면 varyonvg.
  • 그 전에 논리 볼륨을 모두 닫아야 합니다. 파일 시스템은 umount하고, 데이터베이스가 raw LV를 쓰면 멈춥니다. lsvg -l datavg에서 모두 closed인지 확인합니다.
  • 활성 페이징 공간이 있는 볼륨 그룹은 끌 수 없습니다. 부팅 때 자동으로 켜지지 않게 한 뒤 재부팅합니다(또는 swapoff).
  • 디스크를 다른 시스템으로 옮길 때는 varyoffvg 뒤 exportvg를 합니다.
  • -s는 완전히 끄지 않고 LV 명령만 쓸 수 있는 시스템 관리 모드로 둡니다.
항목 내용
버전 AIX 5.3, AIX 6.1 (내용이 같고, 6.1 문서에 RBAC 안내가 더해짐)
원문 IBM Commands Reference — 5.3 Volume 6, 6.1 Volume 6
파일 /usr/sbin/varyoffvg
관련 명령어 varyonvg, exportvg, umount, swapoff, lsvg

목적

볼륨 그룹을 비활성화합니다.

영어 원문

Deactivates a volume group.

구문

text
varyoffvg [ -s ] VolumeGroup

설명

varyoffvg 명령은 VolumeGroup 매개변수의 볼륨 그룹과 그에 딸린 논리 볼륨을 비활성화합니다. 먼저 논리 볼륨을 닫아야 합니다. 예를 들어 논리 볼륨에 파일 시스템이 있으면 마운트를 풀어야 합니다.

볼륨 그룹을 활성화하려면 varyonvg 명령을 씁니다.

참고: root 권한이 있거나 system 그룹 구성원이어야 합니다.

SMIT로도 실행할 수 있습니다: smit varyoffvg

참고: 페이징 공간 볼륨이 있는 볼륨 그룹은 그 페이징 공간이 활성인 동안 끌 수 없습니다. 끄기 전에 그 페이징 공간이 시스템 초기화 때 자동으로 활성화되지 않게 한 뒤 시스템을 다시 시작합니다.

영어 원문

The varyoffvg command deactivates the volume group specified by the VolumeGroup parameter along with its associated logical volumes. The logical volumes first must be closed. For example, if the logical volume contains a file system, it must be unmounted.

To activate the volume group, use the varyonvg command.

Note: To use this command, you must either have root user authority or be a member of the system group.

You can use the System Management Interface Tool (SMIT) to run this command. To use SMIT, enter: smit varyoffvg

Note: A volume group that has a paging space volume on it cannot be varied off while the paging space is active. Before deactivating a volume group with an active paging space volume, ensure that the paging space is not activated automatically at system initialization, and then reboot the system.

Flag

플래그 설명
-s 볼륨 그룹을 시스템 관리 모드로 둡니다. 이 모드에서는 논리 볼륨 명령만 볼륨 그룹에 쓸 수 있고, 사용자는 어떤 논리 볼륨도 열거나 접근할 수 없습니다.
영어 원문
  • -s — Puts the volume group into System Management mode, so that only logical volume commands can be used on the volume group. In this mode, no logical volume can be opened or accessed by users.

종료 상태

값 뜻
0 성공
0보다 큼 오류
영어 원문

This command returns the following exit values:

  • 0 — Successful completion.
  • >0 — An error occurred.

보안

(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.

예제

명령 하는 일
varyoffvg vg03 vg03을 비활성화
varyoffvg -s vg02 vg02의 논리 볼륨은 열 수 없게 하되 논리 볼륨 명령은 계속 쓸 수 있게 함

자주 쓰는 형태:

bash
umount /data
lsvg -l datavg                 # 모두 closed인지
varyoffvg datavg
영어 원문
  1. To deactivate volume group vg03, enter:
varyoffvg vg03
  1. To deactivate volume group vg02, but allow logical volume commands to continue to take effect, enter:
varyoffvg -s vg02

Logical volumes within the volume group cannot be opened, but logical volume commands continue to take effect.

파일

파일 설명
/usr/sbin/varyoffvg varyoffvg 명령
영어 원문
  • /usr/sbin/varyoffvg — Contains the varyoffvg command.

Related information:

  • chvg command
  • RBAC
  • Trusted AIX

리눅스(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로 만듭니다. varyoffvg에 해당하는 것은 vgchange -an datavg입니다.