extendvg 명령어 (AIX 5.3·6.1)
https://archive.horanglab.com/posts/aix-cmd-extendvg
핵심 정리
- 볼륨 그룹에 디스크를 더합니다:
extendvg datavg hdisk4. 볼륨 그룹이 varyon되어 있어야 합니다. - 더할 디스크가 다른 볼륨 그룹에 속했던 흔적이 있으면 확인을 묻고,
-f로 강제할 수 있지만 기존 내용을 잃습니다. 활성 볼륨 그룹의 디스크는 더할 수 없습니다. - 기본·big 볼륨 그룹은 PV당 1016 PP 제한 때문에 큰 디스크를 더하지 못할 수 있습니다. 이때는
chvg -t로 factor를 바꾸거나chvg -G로 scalable로 바꿉니다. - 클러스터의 동시 볼륨 그룹이면 모든 노드에서 같은 PVID가 보이도록 먼저 PVID를 주고(
chdev -l hdiskN -a pv=yes), 가능하면 C-SPOC로 합니다. - 스냅숏 볼륨 그룹에는 쓸 수 없습니다.
| 항목 | 내용 |
|---|---|
| 버전 | AIX 5.3, AIX 6.1 (6.1에서 -p(미러 풀), PV 유형 제한, 4KB 블록 디스크 참고가 더해짐) |
| 원문 | IBM Commands Reference — 5.3 Volume 2, 6.1 Volume 2 |
| 파일 | /usr/sbin/extendvg |
| 관련 명령어 | reducevg, mkvg, lsvg, chpv, chdev |
목적
볼륨 그룹에 물리 볼륨을 더합니다.
영어 원문
Adds physical volumes to a volume group.
구문
extendvg [ -f ] [ -p MirrorPool ] VolumeGroup PhysicalVolume ...
설명
extendvg 명령은 물리 볼륨을 하나 이상 더해 볼륨 그룹을 늘립니다.
물리 볼륨이 이미 다른 볼륨 그룹에 속하는지 확인합니다. varyon된 볼륨 그룹에 속한다고 판단하면 끝냅니다. varyon되지 않은 볼륨 그룹의 기술 영역이 있으면 계속할지 묻습니다. 물리 볼륨의 이전 내용을 잃으므로 이 무시 기능은 조심해서 써야 합니다.
참고: root 권한이 있거나 system 그룹 구성원이어야 합니다.
AIX 5.3 이전에 만든 볼륨 그룹이나, 5.3에서 만들었지만 varyonvg -M으로 켠 볼륨 그룹은, 물리 볼륨의 최대 전송 크기가 볼륨 그룹의 LTG(논리 트랙 그룹) 크기보다 작으면 실패합니다. 5.3에서 만들고 -M 없이 켠 볼륨 그룹은 이때 LTG 크기를 동적으로 낮춥니다.
참고: 스냅숏 볼륨 그룹에는 extendvg를 쓸 수 없습니다.
SMIT 빠른 경로 smit extendvg로도 실행할 수 있습니다.
참고: 디스크가 다른 회사의 볼륨 관리자가 관리하는 것으로 표시되어 있으면 더하지 못합니다. 무시하고 그 표시를 지우려면 chpv -C HDiskName을 씁니다.
참고: 동시(concurrent) 볼륨 그룹을 늘릴 때는 먼저 더할 디스크마다 PVID가 있고 ODM에 저장된 PVID가 모든 노드에서 같은지 확인해야 합니다. C-SPOC(Cluster Single Point of Control)로 늘리면 이 확인을 자동으로 합니다.
참고(6.1): 볼륨 그룹에 PV 유형 제한이 있으면 명령줄의 물리 볼륨이 그 제한에 맞는지 확인하고, 하나라도 맞지 않으면 실패합니다.
참고(6.1): 4KB 블록 크기 PV와 다른 블록 크기의 PV를 섞을 수 없습니다. 볼륨 그룹의 모든 PV는 블록 크기가 같아야 합니다.
영어 원문
The extendvg command increases the size of the volumegroup by adding one or more physicalvolumes.
The physical volume is checked to verify that it is not already in another volume group. If the system believes the physical volume belongs to a volume group that is varied on, it exits. But if the system detects a description area from a volume group that is not varied on, it prompts the user for confirmation in continuing with the command. The previous contents of the physical volume are lost, so the user must be cautious when using the override function.
Note: To use this command, you must either have root user authority or be a member of the system group.
For volume groups created prior to AIX 5.3, or for volume groups created on AIX 5.3 but varied on with the varyonvg -M flag, the extendvg will fail if the physical volume has a max transfer size that is smaller than the logical track group size of the volume group. For volume groups created on AIX 5.3 and varied on without the varyonvg -M flag, extendvg will dynamically lower the logical track group size of the volume group if the physical volume has a max transfer size that is smaller than the logical track group size of the volume group.
Note: The extendvg command is not allowed on a snapshot volume group.
You can use the System Management Interface Tool (SMIT) smit extendvg fast path to run this command.
Note: This command will fail to add a disk to the volume group if the disk indicates that it is managed by a third party volume manager. To override and clear the disk of the third party volume manger use chpv -C HDiskName.
Note: When extending a concurrent Volume Group (VG), you must first ensure that each new disk to be added to the VG has a Physical Volume Identifier (PVID) assigned, and that the PVID stored in the Object Data Manager (ODM) is the same one on every node. When using the Cluster Single Point of Control (C-SPOC) utility to extend the VG, this check is done automatically.
Note: The VG is checked to determine if an existing PV type restriction is in place. If such a restriction exists, the physical volume(s) list on the extendvg command line are examined to ensure that they meet the restriction. If one or more of the disks is found to not meet the PV type restriction, the command will fail.
Note: You cannot mix physical volume (PV) of 4 KB block size with PV blocks of other sizes. The block size of all PVs in the volume group must be the same.
플래그
| 플래그 | 설명 |
|---|---|
-f |
물리 볼륨이 장치 구성 데이터베이스의 다른 볼륨 그룹이나 활성 볼륨 그룹에 속하지 않으면 강제로 더합니다. |
-p MirrorPool |
(6.1) 더하는 물리 볼륨을 모두 지정한 미러 풀에 넣습니다. 미러 풀을 켠 볼륨 그룹은 미러 풀을 지원하지 않는 AIX로 가져갈 수 없습니다. |
영어 원문
-f— Forces the physical volume to be added to the specified volume group unless it is a member of another volume group in the Device Configuration Database or of a volume group that is active.-pmirrorpool — Assigns each of the physical volumes being added to the specified mirror pool. After mirror pools are enabled in a volume group, the volume group can no longer be imported into a version of AIX that does not support mirror pools.
보안
(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.
예제
hdisk3과 hdisk8을 볼륨 그룹 vg3에 더합니다. 볼륨 그룹은 먼저 varyon되어 있어야 합니다.
extendvg vg3 hdisk3 hdisk8
자주 쓰는 형태:
cfgmgr # 새 디스크 인식
lspv | grep None # 쓸 수 있는 디스크
extendvg datavg hdisk4
lsvg datavg | grep FREE
영어 원문
To add physical volumes hdisk3 and hdisk8 to volume group vg3, enter: extendvg vg3 hdisk3 hdisk8
Note: The volume group must be varied on before extending.
Restrictions
스냅숏 볼륨 그룹에는 extendvg를 실행할 수 없습니다.
영어 원문
The extendvg command cannot be run on a snapshot volume group.
파일
| 파일 | 설명 |
|---|---|
/usr/sbin/extendvg |
extendvg 명령 |
영어 원문
- /usr/sbin/extendvg — Contains the extendvg command.
Related information:
- reducevg command
- Logical volume storage
- chpv Command
- PowerHA SystemMirror Administration
리눅스(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로 만듭니다. extendvg에 해당하는 것은 vgextend datavg /dev/sdc입니다.