HP-UX HB v13.00 Ch-13 - LVM

HP-UX Handbook Rev 13.00 Page 92 (of 110)
Chapter 13 LVM
October 29, 2013
vg)
Once the volume group has been imported, the next step is to determine the
previous name of the volume group by mounting the filesystems, and viewing
their contents.
Once the actual name of the volume group has been determined, it can be renamed
back to it's original name.
To rename the volume group do the following:
# cd /dev
# mv vgtest
# mv /etc/lvmtab /etc/lvmtab.orig
# vgscan -v
# strings /etc/lvmtab
Now corrected volume group name should appear in the lvmtab file.
Note: After the vgimport and standard logical volume names wil need
to be renamed from the standard lvol1,lvol2, etc.. --DO NOT VGCFGRESTORE AT
THIS POINT--
To rename the lvols back to the original names do the following:
#cd /dev/vgxx
For each lvol there will be a block and character device file (lvolx and
rlvolx).
Both the character device file and the block device file will need to be
renamed to their original names.
# mv /dev/vgxx/lvol1 /dev/vgxx/
# mv /dev/vgxx/rlvol1 /dev/vgxx/r
simply add a r to the name of the lvol name for the character device.
After renaming the device files there is no need to recreate the lvmtab,
because lvm will read the volume group directory each time it accesses the
logical volume.
Finally make sure that the lvm structures are backed up: