HP-UX HB v13.00 Ch-13 - LVM
HP-UX Handbook – Rev 13.00 Page 85 (of 110)
Chapter 13 LVM
October 29, 2013
vgcfgrestore(1m) can be used to restore the VGRA.
Example: vgcfgrestore -n /dev/vg01 /dev/rdsk/c1t5d2
3. The disk device's alternate path was added to another volume group. The
method used to verify alternate paths will be unique to the type of disk
device being used. The operating system will usually not allow an
alternate path to be added to a different volume group than the primary
path unless pvcreate -f is first run.
NOTE: While Cur PV and Act PV do not agree the volume group should not be
modified. Since vgcfgbackup(1m) will fail when Cur PV and Act PV do
not agree, modifing the volume group can make it so the disk data structures
(VGRA) no longer match the information in the last vgcfgbackup(1m) file
residing in the /etc/lvmconf directory. Modifing the volume group when Cur and
Act PV disagree can make recovery more difficult!
RESOLUTION
vgreduce -f should be used as a last resort. If possible use
vgcfgrestore(1m) to restore the lvm information. See step 2 above.
If vgcfgrestore(1m) cannot be used to make the Cur PV and Act PV agree
again, then vgreduce -f may be required. Here are the steps to successfully
use vgreduce -f:
1. Get a list of logical volumes belonging to the volume group.
Use: vgdisplay -v /dev/vg_name to get a list of logical volumes
for the volume group.
2. Find out which logical volume reside on the disk device(s) to be forcibly
reduced.
Use: lvdisplay -v /dev/vg_name/lv_name | more to see if any
of the logical volumes extents show ??? in the PV section. Page through
every logical extent for each logical volume in the volume group. ???
indicate that the extents shown reside on a physical volume that the
system is unable to query. Any logical volume with ??? will have to be
removed using lvremove(1m) in order for vgreduce -f to
complete successfully.
3. Remove logical volumes with ??? in their lvdisplay(1m) output.
Since logical volumes that show ??? have missing or unavailable data they