This document discusses the limit of 1016 physical partitions per disk and how this limit affects the addition of disks larger than 4GB with the mkvg or extendvg commands. The first part of the document applies to AIX Versions 3.2, 4.1, 4.2, and 4.3.0. At the end of this document, there is a section that applies specifically to AIX Version 4.3.1, which discusses changes made to this limitation at AIX Version 4.3.1.
In the design of LVM (Logical Volume Manager), each logical partition maps to one physical partition, and each physical partition maps to one or more physical partitions. Each physical partition maps to a number of disk sectors (only when mirroring, one LP maps to 2 or 3 physical partitions). The design of LVM limits the number of physical partitions that LVM can track per disk to 1016. In most cases, not all the possible 1016 tracking partitions are used by a disk. The default size of each physical partition during a mkvg command is 4 MB, which implies that individual disks up to 4GB can be correctly tracked in a volume group.
If a disk larger than 4GB is added to a volume group (based on usage of the default 4GB size for physical partition) the disk addition will fail with a warning message that the physical partition size needs to be increased (see "Note 1" at the end of this section). There are two instances where this limitation will be enforced.
The first case is when the user tries to use mkvg to create a volume group in which the number of physical partitions on one of the disks in the volume group would exceed 1016. In this case, the user must pick from the available physical partition ranges of:
1, 2, (4), 8, 16, 32, 64, 128, or 256 MBand use the -s option with the mkvg.
The second case is when the user attempts to use extendvg to join the disk which violates the 1016 limitation with a pre-existing volume group. The user can either recreate the volume group with a larger physical partition size (which will allow the new disk to work with the 1016 limitation) or the user can create a stand alone volume group (consisting of a larger physical partition size) for the new disk.
In AIX 4.2, 4.1 and 3.2.5, if the install code detects that the rootvg drive is larger than 4GB, it will change the mkvg -s value until the entire disk capacity can be mapped to the available 1016 tracks. (See "Note 2" at the end of this section.) This install change also implies that all other disks added to rootvg, regardless of size, will also be defined at that new physical partitions size.
NOTE 1: This bug was fixed in APAR IX48926, at AIX 3.2.5 and bos.rte.lvm 188.8.131.52 at AIX 4.1. AIX Versions 3.2.5 and 4.1, which do not have this fix applied, will allow the creation of volume groups with more than 1016 partitions per disk. The implication of this bug allowing more than 1016 physical partitions is that the user may access all portions of the logical volume. However, during disk mirroring, the status of partitions beyond the 1016 limit will not be tracked correctly. If mirrors beyond the 1016 range become "stale", LVM will not be aware of their condition, and data consistency may become an issue for those partitions. Additionally, the migratepv and reorgvg commands create mirrors and delete them as a method for moving logical volumes within/between disks. If the 1016 limit is violated, then the migratepv or reorgvg commands may not behave correctly.
NOTE 2: This bug was fixed for AIX 3.2.5 rootvg install in APARs IX46862 and IX46863 and for AIX 4.1. with bos.rte.lvm 184.108.40.206.
NOTE 3: The 1016 PP/PV limitation is NOT enforced when importvg is run to define an existing volume group to the system; the limitation is only enforced when mkvg and extendvg are run. This means that a user can successfully define a volume group to the system that violates this limitation. However, any future extendvg operations on this volume group will fail for large disks, provided that the maintenance has been applied.
The 1016 VGSA is used to track the "staleness of mirrors". If you are in violation of 1016, you may get a false report of a non-mirrored logical volume being "stale". You may also get a false indication that one of the mirror copies has gone stale. Next, migratepv may fail because migratepv briefly uses mirroring to move a logical volume from one disk to another. If the target logical partition is incorrectly considered "stale", then the migratepv cannot remove the source logical partition and the migratepv command will fail in the middle of migration. Another command which performs its actions by using temporary mirroring is reorgvg.
The only case where data may be lost is if you are mirroring a logical volume and ALL copies go bad at the same time and LVM isn't aware of it because the copies that go bad are beyond the 1016 tracking range. However, in this case, you would lose data even if you were within the 1016 range. If you never mirror or use migratepv, this issue shouldn't concern you.
Yes. The enforcement of the 1016 limit occurs only during mkvg and extendvg. The integrity of the data on the volume group on AIX Version 3.2 is the same as it is on AIX Version 4.1. The section entitled "Changes Introduced in AIX 4.3.1", at the end of this document, outline changes you can make to the volume group that will prevent using this volume group on other versions of AIX.
See the section entitled "Changes Introduced in AIX 4.3.1", at the end of this document.
Yes, if you are not running AIX 4.3.1. The fixes mentioned in this document only prevent the future addition/creation of disks (into volume groups) that (the disk) will violate the 1016 limitation. Disks that are already in violation of the 1016 limit must be recreated at larger PP sizes. If you are running AIX 4.3.1, see the next section entitled "Changes Introduced in AIX 4.3.1."
AIX 4.3.1 relaxes the limitation of 1016 physical partitions per physical volume, by introducing the concept of a volume group factor. When creating a volume group, you can specify your own PP/PV limitation, in multiples of 1016. (i.e., 1016, 2032, 4064, and 8128.) This is done via the -t flag on mkvg. For example, this command will create a volume group that will allow for up to 2032 PPs per disk (with the default size of 4MB per PP):
mkvg -y VGname -t 2 hdisk1
The disadvantage is that increasing the number of PPs allowed per disk will limit the number of disks allowed in the volume group. If the 1016 PP/PV limit is maintained, you can add up to 32 disks per volume group. There is an inherent limit of 32,512 PPs in the entire volume group. If the PP/PV limit is changed to 4064 for a particular volume group, then only 8 drives may be placed in the volume group, even if those drives do not use 4064 PPs each.
The chvg command also has a -t flag to allow you to change the PP/PV limit on an existing volume group, so that a larger drive could be added at that point. For example:
chvg -t 2 VGname
Only volume groups that have been created with a factor size other than 1, or that have been to a new factor size, can exceed the 1016 PP/PV limit.
Any volume group created outside the default factor size or changed to a different factor CANNOT be used on systems less than AIX 4.3.1, even if the factor size is later changed back to 1. An example of the error received when accessing the volume group will look like the following:
0516-002 lqueryvg: The volume group version is incompatible with this level of the operating system and cannot be activated.
NOTE: These options are only available from the command line, not from SMIT.
The logical volumes in the volume group must be closed for chvg to successfully change the factor size.