vgversion.1m (2010 09)
v
vgversion(1M) vgversion(1M)
• The volume group version migration process retains all the LVM configuration and characteristics of
the volume group vg_name and its logical and physical volumes.
Following the successful volume group version migration,
vgversion retains the order of the physi-
cal volumes in the LVM configuration.
• The
vgversion command will fail if the logical volume number of any logical volume, minor number
of volume group vg_name and pv key of any physical volume in the volume group vg_name is beyond
the supported limits even if the actual total number of logical volumes, physical volumes and volume
groups are still within the supported limits for volume group version vg_version_new.
• Volume group migration from 2.x to 2.y (for example, 2.0 to 2.1 or 2.1 to 2.0) can be done provided the
configuration limits defined for the volume group vg_name is supported by volume group version
vg_version_new. For example, if the existing volume group has more logical volumes than it is sup-
ported by the volume group version vg_version_new, the migration will fail. Refer to the
lvmadm -t
command output to see the details of the maximum supported limits for all the supported volume
group versions on LVM.
• Volume group migration from version 2.2 to a lower version 2.y (2.2 to 2.1 or 2.2 to 2.0) will fail if the
volume group has bootable physical volumes or snapshots configured for any logical volume of the
volume group.
• Volume group migration from version 2.2 to a lower version 2.y (such as 2.2 to 2.1 or 2.2 to 2.0) will
free up a few extents. Run
vgmodify to utilize the free space.
• When a volume group is migrated to version 2.2 or higher, the unshare unit will be set to the value
specified using the
-U option or to the default value of 1024 KB. See lvm(7) on information about
unshared units for snapshots.
Creating Metadata Space When It Is Not Available on the Physical Volumes
If any physical volume(s) lacks the additional space required to hold the volume group version
vg_version_new metadata, the review mode option (
-r)ofvgversion lists the minimum size required
on each such physical volume(s) for a successful migration.
To accommodate the space requirement for storing the metadata of the vg_version_new, the user can do
one of the following, prior to re-running
vgversion:
Option 1:
• Free up the required space at the end of the physical volume, as suggested by the
vgversion
command review mode output, by relocating few user data extents with the help of the pvmove
command.
Option 2:
• Increase of the size of the LUN from storage device (the newly added space is not under LVMs con-
trol though) so as to minimally accommodate volume group version vg_version_new metadata.
• Following successful
vgversion command execution, if the newly added space is not completely
used by the vgversion command, the user may use the vgmodify command to add extents to
the physical volume that has been expanded using the LUN expansion earlier. Alternatively, the
user may choose to reduce this extra space on the physical volume by performing LUN contraction
from the storage device.
Note: A combination of the above two options can also be used to create space for metadata. Wherever
possible, it is preferable to add extra space (LUN expansion from the storage device) rather than freeing
up user extents.
There may be a combination of the two scenarios mentioned above. There may be some free space (not
under LVMs control) available at the end of the physical volume, but insufficient to place the entire meta-
data. In such cases, the
vgversion command will use the free extents from the bottom of the physical
volume to place the remaining metadata.
Recovery
If
vgversion is interrupted during its operation it may be necessary to re-apply the configuration to all
the physical volumes belonging to the volume group vg_name . To assist with this process, the vgver-
sion generates a restore script vgversion_vg_name_ restore under the
/etc/lvmconf/vgversion_vg_name directory. The user can run this restore script to bring back the
volume group vg_name to its initial state. Alternatively, the user can run this restore script to restore the
configuration of volume group version vg_version_new, if the command successfully creates the
4 Hewlett-Packard Company − 4 − HP-UX 11i Version 3: September 2010