HP-UX 11i v3 - LVM Volume Group Version Migration (September 2010)

10
The vgversion command creates two mapfiles named mapfile_vgname_VG initial VG
version and mapfile_vgname_VG final VG version corresponding to initial volume
group configuration and final volume group configuration, respectively. These mapfiles contain
details of the logical volume names, and are equivalent to those created using the vgexport m
f vg_name command. The restore script uses these mapfiles.
The vgversion command creates a disk file named vg_name_disks, containing the list of
physical volumes belonging to the volume group. The restore script uses this file.
Reverting back to Version 1.0
After you convert a Version 1.0 volume group to a 2.x volume group, if you need to revert back to the
original configuration, follow these steps:
1. Deactivate the volume group, if it is active.
2. Run the restore script by providing the Version 1.0 configuration file as an argument. The
configuration files are stored in the /etc/lvmconf/vgversion_vgname directory.
Note
Any changes made to the volume group after converting it to Version 2.x
are lost if the Version 1.0 configuration is restored on the physical volumes.
The restore script uses vgcfgrestore to apply the configuration to all the physical disks. If any of
the physical disks are unavailable, the restore script fails. You must rerun it to complete the operation.
If the volume group is found in any of the LVM /etc/lvmtab or /etc/lvmtab_p configuration
files, the restore script runs vgexport vg_name to export the volume group. Later, the restore script
runs vgimport m mapfile_vgname_1.0 f vg_name_disks vg_name to import the volume
group. For example:
# /etc/lvmconf/vgversion_vg01/vgversion_vg01_restore vg01_1.0.conf
vgcfgrestore: Volume group "/dev/vg01" does not exist in the "/etc/lvmtab" file.
Volume Group configuration has been restored to /dev/rdisk/disk348
vgcfgrestore: Volume group "/dev/vg01" does not exist in the "/etc/lvmtab" file.
Volume Group configuration has been restored to /dev/rdisk/disk349
The Volume Group already exists in lvmtab/lvmtab_p
Exporting the Volume group
vgexport: Volume group "/dev/vg01" has been successfully removed.
vgimport: Volume group "/dev/vg01" has been successfully created.
Warning: A backup of this volume group may not exist on this machine.
Please remember to take a backup using the vgcfgbackup command after activating
the volume group.
Completed restore of VG /dev/vg01
Examples
The following examples assume the volume group is already activated. This is not a requirement as
vgversion activates the volume group, if needed. If vgversion activates the volume group,
vgversion deactivates it before completion.