HP-UX Reference (11i v2 07/12) - 1M System Administration Commands N-Z (vol 4)
v
vgcfgrestore(1M) vgcfgrestore(1M)
-R This option will force restoring the LVM configuration data even if there is a physical
volume mismatch between the kernel and the configuration backup file with the volume
group still active. This option should not be used unless the configuration file is abso-
lutely valid and up-to-date. Restoring invalid configuration data can result in data corr-
uption later.
If there are alternate physical volume links configured in the system, the following mes-
sage will appear when total number of physical volumes in the kernel does not match
with the configuration backup file due to missing alternate physical volume links:
Mismatch between the backup file and the running kernel:
Kernel indicates X disks for /dev/vgname; /etc/lvmconf/vgname
indicates Y disks. Cannot proceed with the restoration.
Deactivate the Volume Group and try again.
In this case, the user is advised to deactivate the volume group first, then use the
vgcfgrestore command to restore configuration data when the volume group is una-
vailable. But if the volume group has to stay available and the user is absolutely sure the
configuration file is correct, this option will restore data from the configuration file when
the volume group stays available.
-v Provide additional information when invoked together with -l option.
Additional values displayed for each path:
• Disk size in kilobytes
• Starting block number (kb) of the user data.
• The PVkey (see
lvdisplay -k). Note that paths with the same key are links to the
same device.
Additional values displayed for each volume group:
• max_pv
• max_pe
• max_lv
RETURN VALUE
vgcfgrestore exits with one of the following values:
0 Successful completion.
>0 Failure. Errors occurred during the restore operation.
EXTERNAL INFLUENCES
Environment Variables
LANG determines the language in which messages are displayed.
If LANG is not specified or is null, it defaults to "C" (see lang(5)).
If any internationalization variable contains an invalid setting, all internationalization variables default to
"C" (see environ(5)).
EXAMPLES
Restore the LVM configuration information for the physical volume
/dev/rdsk/c0t7d0 that was saved
in the default file
/etc/lvmconf/vg00.conf:
vgcfgrestore -n /dev/vg00 /dev/rdsk/c0t7d0
Force to restore the LVM configuration data when volume group is still active
vgcfgrestore -R -n /dev/vg00 /dev/rdsk/c0t7d0
Restore the LVM configuration information to physical volume /dev/rdsk/c0t4d0 using alternate
configuration file
/tmp/vg00.backup:
vgcfgrestore -f /tmp/vg00.backup /dev/rdsk/c0t4d0
List backup information saved in default configuration file /etc/lvmconf/vg00.conf:
vgcfgrestore -n /dev/vg00 -l
HP-UX 11i Version 2: December 2007 Update − 2 − Hewlett-Packard Company 605