chvg 명령어 (AIX 5.3·6.1)
https://archive.horanglab.com/posts/aix-cmd-chvg
핵심 정리
- 볼륨 그룹의 특성을 바꿉니다. 자주 쓰는 것:
chvg -a y datavg(부팅 때 자동 varyon),chvg -Q n datavg(쿼럼 끄기, 2디스크 미러에 흔함),chvg -g datavg(SAN LUN을 늘린 뒤 크기 반영). - 기본 볼륨 그룹의 PV당 1016 PP 한도에 걸리면
chvg -t 2 datavg로 factor를 올리거나,chvg -G datavg로 scalable로 바꿉니다(-G는 varyoff 상태에서). - 다른 LVM 명령이 비정상 종료해 볼륨 그룹이 잠겨 있으면
chvg -u로 풉니다. -s y는 stale 파티션 자동 동기화,-h y는 고장 디스크를 핫스페어로 자동 이전합니다.- rootvg의 쿼럼을 바꾼 뒤에는
bosboot -ad /dev/hdisk0을 실행하고 재부팅해야 반영됩니다.
| 항목 | 내용 |
|---|---|
| 버전 | AIX 5.3, AIX 6.1 (6.1에서 -X, -r, -O, -M, -N, -j, -f가 더해지고, 5.3의 -g 제한과 AIX 4.1.2 참고가 빠짐) |
| 원문 | IBM Commands Reference — 5.3 Volume 1, 6.1 Volume 1 |
| 파일 | /usr/sbin/chvg |
| 관련 명령어 | lsvg, mkvg, varyonvg, bosboot, savebase |
목적
볼륨 그룹의 특성을 정합니다.
영어 원문
Sets the characteristics of a volume group.
구문
chvg [ -s Sync { y | n } ] [ -h Hotspare { y | Y | n | r } ] [ -a AutoOn { y | n } ] [ -c | -l ] [ -L LTGSize ] [ -Q { y | n } ] [ -X { none | SSD } ] [ -u ] [ -r { y | n } ] [ -x { y | n } ] [ -S | -R ] [ -t [ factor ] ] [ -B | -G ] [ -P ] [ -v ] [ -C ] [ -f ] [ -g ] [ -b { y | n } ] [ -I ] [ -O { y | n } ] [ -M { y | n | s } ] [ -N o | n ] [ -j { y | n } ] VolumeGroup
설명
chvg 명령은 볼륨 그룹의 특성을 바꿉니다.
Web-based System Manager의 Volumes 응용 프로그램이나 SMIT 빠른 경로 smit chvg로도 실행할 수 있습니다.
영어 원문
The chvg command changes the characteristics of a volume group.
You can use the Volumes application in Web-based System Manager to change volume characteristics. You could also use the System Management Interface Tool (SMIT) smit chvg fast path to run this command.
플래그
참고:
- 스냅숏 볼륨 그룹을 가진 볼륨 그룹에는
-a,-R,-S,-u,-h만 쓸 수 있습니다. - 스냅숏 볼륨 그룹에는
-a,-R,-S,-u만 쓸 수 있습니다. - (6.1) big 형식(
-B)이나 scalable 형식(-G)으로 바꾸는 것은 다른 변경과 함께 할 수 없습니다. - (6.1) 4KB 블록 물리 볼륨으로 만든 볼륨 그룹에서는 불량 블록 재배치 정책을 지원하지 않습니다.
| 플래그 | 설명 |
|---|---|
-a AutoOn |
시스템을 시작할 때 볼륨 그룹을 자동으로 활성화할지 정합니다. y는 자동 활성화, n은 하지 않음. |
-b |
불량 블록 재배치 정책을 정합니다. 기본 yes. y는 켬, n은 끔. |
-B |
big 형식으로 바꿉니다. 물리 볼륨 128개와 논리 볼륨 512개까지 담습니다. 아래 "big·scalable 변환 참고"를 봅니다. 동시 모드로 varyon되어 있으면 쓸 수 없고, 바꾼 뒤에는 AIX 4.3.1 이하로 가져갈 수 없습니다. |
-c |
-C와 같습니다. AIX 5.2부터는 Enhanced Concurrent Capable 볼륨 그룹만 만듭니다. |
-C |
Enhanced Concurrent Capable 볼륨 그룹으로 바꿉니다. 비동시 모드로 켠 볼륨 그룹을 바꾸면 Enhanced Concurrent 모드로 활성화하기 전에 다른 모든 노드에서 다시 가져와야(re-import) 합니다. 동시 모드로 켠 볼륨 그룹은 Enhanced Concurrent 모드 볼륨 그룹으로 바뀝니다. PowerHA SystemMirror ES(HACMP ES)에서만 쓰며 그 밖의 시스템에는 효과가 없습니다. Enhanced Concurrent 볼륨 그룹은 그 제품과 함께 제공되는 Group Services를 쓰며, 이 모드로 활성화하기 전에 구성해야 합니다. 64비트 커널에서는 Enhanced Concurrent Capable만 지원합니다. (6.1) Enhanced Concurrent Capable 볼륨 그룹은 늘 다중 노드 varyon 보호가 켜집니다(-N 참고). |
-f |
(6.1) 지정한 물리 볼륨이 장치 구성 데이터베이스의 다른 볼륨 그룹이나 활성 볼륨 그룹에 속하지 않으면 강제로 만듭니다(mkvg에서 옮겨 온 설명). |
-g |
볼륨 그룹의 모든 디스크가 커졌는지 살펴, 커졌으면 그 PV에 PP를 더합니다. 필요하면 알맞은 1016 배수(factor)를 정하고 big 형식으로 바꿉니다. LVM이 크기 변화를 보려면 varyoffvg 뒤 varyonvg가 필요할 수 있습니다. 5.3 문서는 동시 모드(classic·enhanced)로 켠 볼륨 그룹과 rootvg에서는 크기 변경을 지원하지 않는다고 덧붙였습니다. |
-G |
scalable 형식으로 바꿉니다. 물리 볼륨 1024개와 논리 볼륨 4096개까지 담습니다. 볼륨 그룹이 varyon되어 있으면 쓸 수 없고, 바꾼 뒤에는 AIX 5.2 이하로 가져갈 수 없습니다. (6.1) 관련 LV의 장치 하위 유형(IOCINFO ioctl()이 알려 주는 값)이 이전 값과 상관없이 DS_LVZ로 바뀌지만, 알려 주는 값 말고 동작은 바뀌지 않습니다. 아래 "big·scalable 변환 참고"도 봅니다. |
-h Hotspare |
핫스페어 특성을 정합니다. 미러하지 않은 논리 볼륨에는 의미가 없고, Concurrent Capable 볼륨 그룹에는 지원하지 않습니다. y는 고장 디스크 하나의 파티션을 스페어 디스크 하나로 옮기며, 스페어 풀에서 옮길 수 있을 만큼 큰 가장 작은 디스크를 씁니다. Y는 스페어 풀 전체로 옮길 수 있습니다. n은 자동 이전을 하지 않습니다(기본). r은 스페어 풀의 디스크를 모두 뺍니다. |
-I |
AIX 5.1과 5.2로 가져갈 수 있게 바꿉니다. LTG 크기는 5.3 이전에 만든 볼륨 그룹처럼 동작합니다. 5.1·5.2가 지원하는 것보다 큰 strip 크기(strip 크기 × 어레이 디스크 수 = stripe 크기)의 스트라이프 LV가 있으면 실패할 수 있고, 나중에 그런 LV를 만들면 5.1·5.2로 다시 가져가는 것은 지원하지 않습니다. |
-j y, n |
(6.1) JFS2가 마운트되어 있을 때 LVM 재동기화가 JFS2가 할당한 블록만 다시 맞출지 정합니다. y는 JFS2가 할당한 블록만, n은 모든 블록(기본). |
-l |
Non-Concurrent Capable 볼륨 그룹으로 바꿉니다. 비동시 모드로 varyon되어 있어야 합니다. |
-L LTGSize |
AIX 5.3에서 만든 볼륨 그룹에는 무시하며, varyon할 때 LTG 크기를 디스크들의 공통 최대 전송 크기로 정합니다. 5.3 이전에 만든 볼륨 그룹은 LTG 크기(KB)를 0, 128, 256, 512, 1024로 바꿉니다. 모든 디스크의 최대 전송 크기 이하여야 하며 기본 128KB입니다. 0이면 다음 varyonvg 때 공통 최대 전송 크기로 정합니다. |
-M { y, n, s } |
(6.1) 미러 풀 엄격성. y는 볼륨 그룹에 만드는 LV 사본마다 미러 풀을 지정해야 함, n은 제한 없음(기본), s는 super-strict 미러 풀을 강제함. 로컬과 원격 물리 볼륨은 같은 미러 풀에 둘 수 없고, 미러 풀은 볼륨 그룹당 최대 3개이며, 각 미러 풀에는 볼륨 그룹의 모든 LV 사본이 하나씩 있어야 합니다. |
-N o, n |
(6.1) o는 여러 노드가 동시에 비동시 모드로 varyon할 수 있게, n은 그럴 수 없게 바꿉니다. 이 플래그를 지원하지 않는 AIX로는 가져갈 수 없게 되며, 동시 모드로 켠 볼륨 그룹에는 쓸 수 없습니다. |
-O y, n |
(6.1) 볼륨 그룹의 무한 재시도 옵션. y는 실패한 I/O를 성공할 때까지 다시 시도, n은 다시 시도하지 않음. LV의 무한 재시도 옵션에는 영향이 없고, GLVM 환경에서는 지원하지 않습니다. |
-P PhysicalPartitions |
볼륨 그룹이 담을 수 있는 PP 수를 늘립니다(1024 단위). 64, 128, 256, 512, 768, 1024, 2048을 쓸 수 있으며, 지금 값보다 커야 하고 아니면 아무것도 하지 않습니다. scalable 볼륨 그룹에만 씁니다. |
-Q |
물리 볼륨의 쿼럼을 잃으면 자동으로 varyoff할지 정합니다. 기본 yes이며 바로 반영됩니다. n은 모든 물리 볼륨을 잃을 때까지 활성 상태로 둠, y는 쿼럼을 잃으면 자동 varyoff. |
-r y, n |
(6.1) Critical VG 옵션. y면 I/O 요청이 실패할 때 실패를 돌려주기 전에 LVM 메타데이터를 써서 디스크 상태를 확인합니다. rootvg에 켜고 쿼럼 디스크(쿼럼을 껐으면 모든 디스크)에 접근하지 못하면 오프라인으로 만드는 대신 노드가 멈추고 콘솔에 메시지가 나옵니다. n은 끔. |
-R |
볼륨 그룹의 I/O를 다시 시작합니다. |
-s Sync |
stale 파티션 자동 동기화를 정합니다. 미러하지 않은 LV에는 의미가 없고, Concurrent Capable 볼륨 그룹에는 지원하지 않습니다. 자동 동기화는 LVM 장치 드라이버가 errpt에 LVM_SA_STALEPP를 기록한 뒤에만 시도하는 복구 기능이며, 다른 경로(예: mklvcopy)로 stale이 된 파티션은 자동으로 동기화하지 않습니다. y는 자동 동기화 시도, n은 하지 않음(기본). |
-S |
볼륨 그룹의 I/O를 비우고 이후 I/O를 멈춥니다. |
-t [ factor ] |
PV당 PP 수 한도를 바꿉니다. 32 디스크 볼륨 그룹은 116, 128 디스크 볼륨 그룹은 164입니다. factor가 없으면 가장 큰 디스크의 PP 수가 factor × 1016보다 작아지는 가장 작은 값으로 정합니다. 주면 PV당 최대 PP 수가 factor × 1016이 됩니다. scalable 볼륨 그룹에는 무시하며, stale PP가 있거나 동시 모드로 켜져 있으면 바꿀 수 없습니다. 볼륨 그룹에 넣을 수 있는 최대 PV 수는 MAXPVS/factor로 줄어듭니다. |
-u |
볼륨 그룹 잠금을 풉니다. 다른 LVM 작업이 비정상 종료(명령 코어 덤프, 시스템 장애 등)해 잠긴 채 남았을 때 씁니다. 쓰기 전에 다른 LVM 명령이 그 볼륨 그룹을 쓰고 있지 않은지 확인합니다. |
-v LogicalVolumes |
만들 수 있는 LV 수를 늘립니다. 512, 1024, 2048, 4096이며 지금 값보다 커야 합니다. scalable 볼륨 그룹에만 씁니다. |
-x |
Concurrent Capable 볼륨 그룹을 자동 varyon할 모드를 바꿉니다. 비동시 모드로 varyon되어 있어야 합니다. y는 동시 모드로, n은 비동시 모드로 자동 varyon. Enhanced Concurrent Capable 볼륨 그룹은 자동 varyon을 지원하지 않으며, Concurrent Capable로 만들지 않은 볼륨 그룹에는 효과가 없습니다. 동시 모드 자동 varyon이 동작하려면 /etc/inittab에 rc_clvmv:2:wait:/usr/sbin/clvm_cfg 2>&1을 srcmstr 항목 뒤에 넣어야 합니다. |
big·scalable 변환 참고(-B, -G):
- stale 물리 파티션이 있으면 쓸 수 없습니다.
- VGDA를 늘릴 빈 파티션이 각 물리 볼륨에 충분히 있어야 합니다.
- VGDA는 디스크 가장자리에 있고 연속된 공간이 필요하므로 가장자리에 빈 파티션이 있어야 합니다. 그 파티션이 사용 중이면 같은 디스크의 다른 빈 파티션으로 옮기고, 나머지 PP 번호를 다시 매깁니다. 그래서 이 볼륨 그룹의 모든 PV에서 LP와 PP의 대응이 바뀝니다. 복구용으로 LV 맵을 저장해 두었다면 변환 뒤 다시 만들어야 하고, 맵 옵션으로 백업했다면 그 맵으로 복원할 때 없어진 파티션 번호 때문에 실패할 수 있습니다. 변환 전과, 맵 옵션을 쓴다면 변환 직후에 백업하는 것이 좋습니다.
- VGDA 공간이 크게 늘어 VGDA 갱신 작업(LV 생성·변경, PV 추가 등)이 훨씬 오래 걸릴 수 있습니다.
영어 원문
Note:
Only the
-a,-R,-S,-u, and-hoptions are allowed on the volume group that has a snapshot volume group.Only the
-a,-R,-S, and-uoptions are allowed on the snapshot volume group.Changing a VG to a Big VG format (-B flag) or to a Scalable VG format (-G flag) cannot be combined with any other change operation.
Bad block relocation policy is not supported on a volume group that is created with 4 KB block physical volumes.
-aAutoOn — Determines if the volume group is automatically activated during system startup. The AutoOn variable can be either of the following: y The volume group is automatically activated during system startup. n The volume group is not automatically activated during system startup.-b— Sets the bad-block relocation policy of a volume group. The default value isyes. y Will turn on the bad-block relocation policy of a volume group. n Turns off the bad block relocation policy of a volume group.-B— Changes the volume group to Big VG format. This can accommodate up to 128 physical volumes and 512 logical volumes. Note: 1. The-Bflag cannot be used if there are any stale physical partitions. 2. Once the volume group is converted, it cannot be imported into AIX 4.3.1 or lower versions. 3. The-Bflag cannot be used if the volume group is varied on in concurrent mode. 4. There must be enough free partitions available on each physical volume for the VGDA expansion for this operation to be successful. 5. Because the VGDA resides on the edge of the disk and it requires contiguous space for expansion, the free partitions are required on the edge of the disk. If those partitions are allocated for user usage, they will be migrated to other free partitions on the same disk. The rest of the physical partitions will be renumbered to reflect the loss of the partitions for VGDA usage. This will change the mappings of the logical to physical partitions in all the PVs of this VG. If you have saved the mappings of the LVs for a potential recovery operation, you should generate the maps again after the completion of the conversion operation. Also, if the backup of the VG is taken with the map option and you plan to restore using those maps, the restore operation may fail since the partition number may no longer exist (due to reduction). It is recommended that backup is taken before the conversion, and right after the conversion if the map option is utilized. 6. Because the VGDA space has been increased substantially, every VGDA update operation (creating a logical volume, changing a logical volume, adding a physical volume, and so on) may take considerably longer to run.-c— Same as-Cflag. In AIX 5.2 and later only Enhanced Concurrent Capable volume groups will be created.-C— Changes the volume group into an Enhanced Concurrent Capable volume group. Changes the volume group varied on in non-concurrent mode to Enhanced Concurrent Capable. This requires that the volume group be re-imported on all other nodes prior to activation in Enhanced Concurrent mode. Changes the volume group varied on in Concurrent mode to an Enhanced Concurrent mode volume group. Only use the-Cflag with the PowerHA SystemMirror ES. It has no effect on volume groups and systems not using the HACMP™ES product. Enhanced Concurrent volume groups use Group Services. Group Services ships with PowerHA SystemMirror ES and must be configured prior to activating a volume group in this mode. Use this flag to change a volume group into an Enhanced Concurrent Capable volume group. Note: 1. Enhanced Concurrent volume groups use Group Services. Group Services ships with HACMP ES and must be configured prior to activating a volume group in this mode. 2. Only Enhanced Concurrent Capable volume groups are supported when running with a 64-bit kernel. Concurrent Capable volume groups are not supported when running with a 64-bit kernel. 3. Enhanced Concurrent Capable volume groups always have multinode varyon protection enabled. See the-Nflag for details about multinode varyon protection.-f— Forces the volume group to be created on the specified physical volume unless the physical volume is part of another volume group in the Device Configuration Database or a volume group that is active.-g— Will examine all the disks in the volume group to see if they have grown in size. If any disks have grown in size attempt to add additional PPs to PV. If necessary will determine proper 1016 multiplier and conversion to big vg. Note: The user might be required to execute varyoffvg and then varyonvg on the volume group for LVM to see the size change on the disks.-G— Changes the volume group to Scalable VG format. This can accommodate up to 1024 physical volumes and 4096 logical volumes. Note: 1. The-Gflag cannot be used if there are any stale physical partitions. 2. Once the volume group is converted, it cannot be imported into AIX 5.2 or lower versions. 3. The-Gflag cannot be used if the volume group is varied on. 4. There must be enough free partitions available on each physical volume for the VGDA expansion for this operation to be successful. 5. Since the VGDA resides on the edge of the disk and it requires contiguous space for expansion, the free partitions are required on the edge of the disk. If those partitions are allocated for user usage, they will be migrated to other free partitions on the same disk. The rest of the physical partitions will be renumbered to reflect the loss of the partitions for VGDA usage. This will change the mappings of the logical to physical partitions in all the PVs of this VG. If you have saved the mappings of the LVs for a potential recovery operation, you should generate the maps again after the completion of the conversion operation. Also, if the backup of the VG is taken with the map option and you plan to restore using those maps, the restore operation may fail since the partition number may no longer exist (due to reduction). It is recommended that backup is taken before the conversion, and right after the conversion if the map option is utilized. 6. Because the VGDA space has been increased substantially, every VGDA update operation (creating a logical volume, changing a log ical volume, adding a physical volume, and so on) may take considerably longer to run. 7. Changing an existing volume group to Scalable VG format will change the device subtype (reported by the IOCINFO ioctl() call) for all associated LVs toDS_LVZ, regardless of the previous subtype. This alteration does not change any behavior of the LV's beyond the reported subtype.-hHotspare — Sets the sparing characteristics for the volume group specified by the VolumeGroup parameter. Either allows (y) the automatic migration of failed disks, or prohibits (n) the automatic migration of failed disks. This flag has no meaning for non-mirrored logical volumes y Enhances the automatic migration of failed disks by permitting one for one migration of partitions from one failed disk to one spare disk. The smallest disk in the volume group spare pool that is big enough for one to one migration will be used. Y Permits the automatic migration of failed disks and allows migration to the entire pool of spare disks, as opposed to a one for one migration of partitions to a spare. n Prohibits the automatic migration of a failed disk. This is the default value for a volume group. r Removes all disks from the Hotspare pool for the volume group. Note: This flag is not supported for the concurrent capable volume groups.-I— Modifies the volume group so that it can be imported to AIX 5.1 and AIX 5.2. The LTGSize will behave as if the volume group had been created prior to AIX 5.3. This operation might fail if the volume group contains striped logical volumes whose strip size (a strip size multiplied by the number of disks in an array equals the stripe size) is larger than the supported strip size on AIX 5.1 or AIX 5.2. If logical volumes are later created with a strip size that is larger than the supported strip size on AIX 5.1 or AIX 5.2, then attempting to import the volume group back to AIX 5.1 or AIX 5.2 is not supported.-jy|n — If the Enhanced Journaled File System (JFS2) is mounted, the resync operation of the logical volume manager (LVM) resynchronizes the blocks that are allocated only by the JFS2. You can specify the following values for this flag: y Resynchronizes the blocks that are allocated only by the JFS2. n Resynchronizes all of the blocks regardless of the JFS2 block allocations. This is the default value.-l— Changes the volume group into a Non-Concurrent Capable volume group. The volume group must be varied on in non-concurrent mode for this command to take effect.-L— For volume groups created on AIX 5.3, the-Lflag is ignored. When the volume group is varied on, the logical track group size will be set to the common max transfer size of the disks. For volume groups created prior to AIX 5.3, the-Lflag changes the logical track group size, in number of kilobytes, of the volume group. The value of the LTGSize parameter must be0,128,256,512, or1024. In addition, it should be less than or equal to the maximum transfer size of all disks in the volume group. The default size is128kilobytes. An LTGSize of0will cause the next varyonvg to set the logical track group size to the common max transfer size of the disks.-M— Changes the mirror pool strictness for the volume group. y Each logical volume copy created in the volume group must be assigned to a mirror pool. n No restrictions are placed on the user of mirror pool. This is the default value. s Super-strict mirror pools are enforced on the volume group. Note: 1. Local and remote physical volumes cannot belong to the same mirror pool. 2. A maximum of three mirror pools can be in a volume group. 3. Each mirror pool must contain at least one copy of each logical volume in the volume group.-No|n— o Changes the volume group that is allowed to varyon in the non-concurrent mode in more than one node at the same time. n Changes the VG that is not allowed to varyon in non-concurrent mode in more than one node at the same time. Note: • This VG can no longer be imported on a version of AIX that does not support this flag. • This option is not available for volume groups varied on in the concurrent mode.-Oy|n — Changes the infinite retry option of the volume group. y Enables the infinite retry option of the volume group. The failed I/O request is retried until it is successful. n Disables the infinite retry option of the volume group. The failing I/O on the volume group is not retried. It does not affect the logical volume infinite retry option. Note: Infinite retry is not supported in a GLVM environment.-PPhysicalPartitions — Increases the number of physical partitions a volume group can accommodate. Where the PhysicalPartitions variable is represented in units of 1024 partitions. Valid values are 64, 128, 256, 512 768, 1024 and 2048. The value should be larger than the current value or no action is taken. This option is only valid with Scalable-type volume groups.-Q— Determines if the volume group is automatically varied off after losing its quorum of physical volumes. The default value isyes. The change becomes effective immediately. n The volume group stays active until it loses all of its physical volumes. y The volume group is automatically varied off after losing its quorum of physical volumes.-Xnone|SSD — Sets or changes a PV type restriction on the VG. Once a PV restriction is turned on, the VG can no longer be imported on a version of AIX that does not support PV type restrictions. The use of the-Iflag on a PV restricted VG is prohibited. none Removes a PV type restriction on the VG. This flag has no effect if the VG was not previously PV restricted. SSD Places a PV type restriction on the VG if all the underlying disks are of type SSD. Displays an error message if one or more of the existing PV's in the VG does not meet the restriction.-ry|n — Changes the critical volume group (VG) option of the volume group. n Disables the critical VG option of the volume group. y Enables the critical VG option of the volume group. If the volume group is set to the critical VG, any I/O request failure starts the Logical Volume Manager (LVM) metadata write operation to check the state of the disk before returning the I/O failure. If the critical VG option is set to rootvg and if the volume group losses access to quorum set of disks (or all disks if quorum is disabled), instead of moving the VG to an offline state, the node is crashed and a message is displayed on the console.-R— Resumes normal I/O operations for a volume group.-sSync — Sets the synchronization characteristics for the volume group specified by the VolumeGroup parameter. Either permits (y) the automatic synchronization of stale partitions or prohibits (n) the automatic synchronization of stale partitions. This flag has no meaning for non-mirrored logical volumes. Automatic synchronization is a recovery mechanism that will only be attempted after the LVM device driver logsLVM_SA_STALEPPin the errpt. A partition that becomes stale through any other path (for example, mklvcopy) will not be automatically resynced. y Attempts to automatically synchronize stale partitions. n Prohibits automatic synchronization of stale partitions. This is the default for a volume group. Note: This flag is not supported for the concurrent capable volume groups.-S— Drains I/O's for this volume group and suspends future I/O's.-t[factor] — Changes the limit of the number of physical partitions per physical volume, specified by factor. factor should be between 1 and 16 for 32 disk volume groups and 1 and 64 for 128 disk volume groups. If factor is not supplied, it is set to the lowest value such that the number of physical partitions of the largest disk in volume group is less than factor x 1016. If factor is specified, the maximum number of physical partitions per physical volume for this volume group changes to factor x 1016. Note: 1. This option is ignored for Scalable-type volume groups. 2. factor cannot be changed if there are any stale physical partitions in the volume group. 3. This flag cannot be used if the volume group is varied on in concurrent mode. 4. The maximum number of physical volumes that can be included in this volume group will be reduced to (MAXPVS/factor). 5. Changing an existing volume group to Scalable VG format will change the device subtype (reported by the IOCINFO ioctl() call) for all associated LVs toDS_LVZ, regardless of the previous subtype. This alteration does not change any behavior of the LV's beyond the reported subtype.-u— Unlocks the volume group. This option is provided if the volume group is left in a locked state by abnormal termination of another LVM operation (such as the command core dumping, or the system crashing). Note: Before using the-uflag, make sure that the volume group is not being used by another LVM command.-vLogicalVolumes — Increases the number of logical volumes that can be created. Valid values are 512, 1024, 2048 and 4096. The value should be larger than the current value or no action is taken. This option is only valid with Scalable-type volume groups.-x— Changes the mode which the Concurrent Capable volume group is varied on. The volume group must be varied on in non-concurrent mode for this command to take effect. Note: There is no auto on support for Enhanced Concurrent Capable volume groups. On AIX 5.2 and later only Enhanced Concurrent Capable volume groups will be created. y autovaryon the volume group in concurrent mode. n autovaryon the volume group in non-concurrent mode. Note: If the volume group is not created Concurrent Capable, this command has no effect on the volume group. In order for this auto-varyon into concurrency of the volume group to take effect, you must enter the following line into the /etc/inittab file:rc_clvmv:2:wait:/usr/sbin/clvm_cfg 2>&1Attention: This entry must be added after the entry used to initiate srcmstr.
예제
| 명령 | 하는 일 |
|---|---|
chvg -a y vg03 |
시스템을 시작할 때 vg03을 자동으로 활성화 |
chvg -t vg03 |
PV당 1016 PP 한도를 어긴 vg03을 지원되는 상태로 바꿈 |
chvg -t 2 vg03 |
vg03의 PV당 최대 PP를 2032개로, 최대 PV 수를 16개로 바꿈 |
자주 쓰는 형태:
chvg -g datavg # 늘어난 LUN 크기 반영
chvg -Q n rootvg; bosboot -ad /dev/hdisk0 # 미러 rootvg 쿼럼 끄기
varyoffvg datavg; chvg -G datavg; varyonvg datavg # scalable로 변환
chvg -u datavg # 잠금 풀기
영어 원문
- To cause volume group
vg03to be automatically activated during system startup, type:
chvg -a y vg03
- To change the volume group
vg03to a supported state if it is in violation of 1016 physical partitions per physical volume limit, type:
chvg -t vg03
- To change the maximum number of physical partitions per physical volume to 2032 and maximum number of physical volumes in volume group
vg03to 16, type:
chvg -t 2 vg03
파일
| 파일 | 설명 |
|---|---|
/usr/sbin |
chvg 명령이 있는 디렉터리 |
영어 원문
- /usr/sbin — Directory where the chvg command resides.
Related reference:
- bosboot Command
Related information:
- lsvg command
- mkvg command
- savebase command
- varyonvg command
- Logical volume storage
- System management interface tool
리눅스(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로 만듭니다. chvg에 해당하는 것은 vgchange(활성화·자동 활성화·잠금)와 pvresize(늘어난 디스크 반영)입니다. 리눅스 LVM2에는 쿼럼과 big·scalable 형식 개념이 없습니다.