HP-UX 11i v3 - LVM Volume Group Version Migration (September 2010)
5
How to use vgversion
To use the vgversion command, follow these steps:
1. Back up the volume group configuration using vgcfgbackup -f. If needed, you can use this
command to recover the initial or original volume group configuration. Save the configuration
back up file in a known location other than the default location; otherwise, it might be overwritten
by a later configuration change.
2. Review the migration operation to check if the migration can go through successfully or if the
volume group needs any configuration changes before the migration. The vgversion –r (review
option) command indicates volume group features that are not supported in the final volume group
version and prerequisites that are not fulfilled. You can perform the review operation when the
volume group is active. For example:
# vgversion –V 2.0 –r –v vg01 # Review the migration operation
3. If the existing volume group has any features or functionality that is not supported in the
final volume group version, disable these features before migrating the volume group to the
new version.
4. Make sure that all the prerequisites are met. The vgversion command reports failure if any of
the prerequisites are not met.
5. Make sure that all the physical volumes have enough space to write the metadata of the final
volume group version. A Version 2.x volume group needs more space for metadata compared to
a 1.0 volume group. In the review option, vgversion reports if any of the physical volumes do
not have enough space for metadata. If any physical volume does not have enough space for
metadata, follow the steps in Metadata space requirements for Version 2.x volume groups.
6. After making any changes, enter the vgversion –r command again to be sure there are no
failures.
# vgversion –V 2.0 –r vg01 # Note –r, review mode
7. During a maintenance window, deactivate the volume group, make it cluster unaware (if
necessary), run vgversion to apply the new settings, and activate the volume group.
# vgchange –a n vg01 # Deactivate the volume group
# vgversion –V 2.0 vg01 # Migrate the volume group
# vgchange –a y vg01 # Activate the volume group
Volume group migration flow
The following steps describe the flow of the volume group migration. The flow helps you take
necessary action in case of any unexpected failures.
1. The vgversion command makes sure that all physical volumes are present, then activates the
volume group. It then takes a configuration backup of the volume group and saves that as
/etc/lvmconf/vgversion_vg_name/vg_name_initial VG version.conf. You can
use this file to undo the migration. Later, it deactivates the volume group. The following example
shows the vgversion command output:
Performing "vgchange -a r -l -p -s vg01" to collect data
Activated volume group
Volume group "vg1" has been successfully activated.
Old Volume Group configuration for "/dev/vg01" has been saved in
"/etc/lvmconf/vgversion_vg01/vg01_1.0.conf"
Deactivating Volume Group "vg01"
Volume group "vg1" has been successfully deactivated.