HP-UX 11i v3 Using LVM Logical Volume Snapshots (September 2010)
27
example, /dev/vg01/snap1 might correspond to /dev/vg01/lvol1_S3 and
/dev/vg01/snap2 might correspond to /dev/vg01/lvol1_S2 or vice-versa. If the original
logical volume also had a user-defined name before exporting the volume group, it is more difficult to
map the new device special files of the snapshot logical volumes with their user-defined names.
To avoid this, generate the map file containing logical volume names during vgexport operation
and use the same map file during the vgimport operation.
Reconfiguring a volume group using vgmodify
Dynamic LUN Expansion (DLE), Dynamic LUN Contraction (DLC), and reprovisioning using
vgmodify is supported for Version 2.2 volume groups even if snapshot logical volumes are a part of
the volume group. However, you cannot change the unshare unit of the volume group using this
command in the HP-UX 11i v3 March 2010 Update release.
Migration of volume group version using vgversion
The vgversion command is enhanced to support migration from Version 1.0, 2.0, and 2.1 volume
groups to Version 2.2 volume groups and migration from Version 2.2 to Version 2.0 and 2.1 volume
groups. A new option -U is introduced to choose the unshare unit while migrating to a Version 2.2
volume group. The supported values are 512 KB, 1024 KB, 2048 KB, and 4096 KB. If you do not
use the –U option when migrating the volume group to Version 2.2, the unshare unit is set to the
default value of 1024 KB. After this value is set, you cannot change it. The unshare unit cannot be
greater than the size of the physical extent of the volume group.
Because the size of metadata required for a Version 2.2 volume group is greater than that of a
Version 2.0 and 2.1 volume groups, more space from each physical volume is used during migration
to Version 2.2 volume groups. A Version 2.2 volume group migration to a previous 2.x version might
free up some extents. To utilize these extents, run vgmodify.
A Version 2.2 volume group supports root, boot, swap, and dump logical volumes. However, the
HP-UX 11i v3 March 2010 Update release, vgversion does not allow the migration of Version 1.0
volume group to Version 2.2 if the volume group contains root, boot, swap, or dump logical volumes.
Migration from a Version 2.2 volume group to a previous 2.x version fails if the volume group has
snapshot logical volumes configured. To migrate to a previous 2.x version, remove the snapshots and
retry the version migration operation.
Examples
• To migrate a Version 1.0 volume group vg01 with some physical volumes and some logical
volumes to a
Version 2.2 volume group with an unshare unit 2048 KB, enter the
following command:
# vgversion -V 2.2 -U 2048 -v vg01
• If you try to migrate a Version 2.2 volume group vg01 with some snapshot logical volumes to a
previous 2.x version (for example, Version 2.1), the vgversion command fails as follows:
# vgversion -V 2.1 vg01
Performing "vgchange -a y -l -p -s vg01" to collect data
Activated volume group.
Volume group "vg01" has been successfully activated.
vgversion: Error: The specified volume group contains snapshot
logical volumes.
Please delete the snapshot logical volumes for vgversion to proceed.
vgversion: Error: Failed to change the Volume Group version to 2.1
Deactivating Volume Group "vg01"
Volume group "vg01" has been successfully deactivated.
To recover, delete all the snapshot logical volumes and retry version migration.