HP-UX HB v13.00 Ch-04 - System Recovery

HP-UX Handbook Rev 13.00 Page 38 (of 54)
Chapter 04 System Recovery
October 29, 2013
outside the root VG are part of the backup. Either those file systems are also mounted or
excluded from restore! Especially the root file system could get overflowed otherwise.
If VGs are imported at this point we need to take care that all names used for them and
their logical volumes are absolutely identical with the ones contained in the backup! We
need to ensure that all LVM device files in /dev are unique after restore.
10. Perform the full restore from backup. Usually you should use pax(1) to restore cpio(1)
and tar(1) backups also. In the following examples our tape drive is accessed as
/dev/rmt/0m. Use ioscan fnk C tape to find the appropriate device on your system.
The restore needs to be done relative to the /ROOT directory!
# cd /ROOT
e.g. for pax(1):
# loadfile pax
# pax -r -pe -s '|^/|./|' < /dev/rmt/0m
e.g. for frecover(1M):
# loadfile frecover
# frecover -r -f /dev/rmt/0m -Xos
11. Recreate a fresh /stand/rootconf file using lvlnboot(1M). A valid /stand/rootconf file
is needed for booting into LVM Maintenance Mode later. Here it is important to
chroot(1M) to the new root file system!
# cp /sbin/lvlnboot /ROOT
# chroot /ROOT /lvlnboot c
# rm /ROOT/lvlnboot
12. Modify your restored /ROOT/etc/fstab file according to the layout of the newly created
root VG. This can be very important since the ordering of the logical volumes may have
changed!
# loadfile ex vi libcurses.1
# vi /ROOT/etc/fstab
13. Reboot your system to LVM Maintenance Mode (see Co-Procedure).
# reboot
14. Re-import the root VG to get the /etc/lvmtab file up-to-date. Otherwise LVM errors like
Cross-device link could be the result. Of course you need to use the appropriate disk
device(s) for your root VG instead of c2t0d0 that we used in our example.
# vgexport m /tmp/vg00.map /dev/vg00
# mkdir /dev/vg00
# mknod /dev/vg00/group c 64 0
# vgimport m /tmp/vg00.map /dev/vg00 /dev/dsk/c2t0d0
Warning: A backup of this volume group may not exist on this machine.