UnixPedia : HPUX / LINUX / SOLARIS: HPUX : RESTORE LVM volume group configuration from backup file

Sunday, August 18, 2013

HPUX : RESTORE LVM volume group configuration from backup file

vgcfgrestore - display or restore LVM volume group configuration from
backup file


  /usr/sbin/vgcfgrestore -n vg_name -l [-v]
  /usr/sbin/vgcfgrestore [-R] [-F] -n vg_name [-o old_pv_path] pv_path
  /usr/sbin/vgcfgrestore -f vg_conf_path -l [-v]
  /usr/sbin/vgcfgrestore [-R] [-F] -f vg_conf_path [-o old_pv_path]
       pv_path


vgcfgrestore cannot be performed on devices attached to activated
  volume groups.  Prior to restoring a backup configuration to a disk,
  detach the physical volume from the volume group using the pvchange
  command (see pvchange(1M)), or deactivate the volume group using the
  vgchange command (see vgchange(1M)).


  vgcfgrestore will refuse to restore a configuration to a physical
  volume with a block size different than the block size stored in the
  configuration backup file for that physical volume.

          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


  Above command might display the following:


       Volume Group Configuration information in "/etc/lvmconf/vg00.conf"
       VG Name /dev/vg00
        ---- Physical volumes : 2 ----
           /dev/rdsk/c0t6d0 (Bootable)
           /dev/rdsk/c0t5d0 (Non-bootable)


  Restore LVM configuration information stored for /dev/rdsk/c0t7d0 in
  default configuration file /etc/lvmconf/vg01.conf to physical volume
  /dev/rdsk/c0t6d0:


       vgcfgrestore -n /dev/vg01 -o /dev/rdsk/c0t7d0 /dev/rdsk/c0t6d0

No comments:

Post a Comment