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

HP-UX Handbook Rev 13.00 Page 29 (of 54)
Chapter 04 System Recovery
October 29, 2013
# chroot /rootfs /sbin/sh
# rm rf rootfs
Note: If you are using these instructions and are booting over the network from
an Ignite server you must provide the full path to the SYSCMDS file applicable
to the HP-UX revision you are attempting to recover. For example if you are
recovering an 11i Version 1 system you must use /opt/ignite/data/Rel_B.11.11/SYSCMDS.
Co-Procedure: Importing Root VG from a Recovery Shell
Sometimes the automated recovery procedures fail to check and mount the root file system. This
happens e.g. if the /stand/rootconf file does not contain valid data. But it may still be possible
to import the root VG and fsck/mount the file system manually.
1. Boot the system to the Recovery Main Menu (see Co-Procedure).
2. From the main menu select Exit to shell.
3. Optional: get more RAM file system space for recovery (see Co-Procedure).
4. Import and activate the root VG from the appropriate physical volumes. Use ioscan
fnk -C disk to get the devices. In our example, we import vg00 from c2t0d0 only. First
we need to load some commands into our RAM file system using the loadfile
command. Usually all LVM commands are linked to lvchange, so we need to load that
command first. In some recovery environments, the pvcreate command needs to be
loaded instead.
# loadfile lvchange vgimport vgdisplay vgchange
# loadfile lvlnboot lvrmboot ioscan
# mkdir /dev/vg00
# mknod /dev/vg00/group c 64 0x000000
(NOTE: for LVM2 the major number is 128)
# vgimport vg00 /dev/dsk/c2t0d0
Creating "/etc/lvmtab".
Warning: A backup of this volume group may not exist on this machine.
Please remember to take a backup using the vgcfgbackup command after activating
the volume group.
# vgchange a y /dev/vg00
Activated volume group
Volume group "vg00" has been successfully changed.
You may now check and mount the file systems (see other Co-Procedure) or re-configure
the LIF LABEL or whatever you plan to do with your imported root VG.