recovering of root disk

Yeap Chin Heng
Occasional Contributor

recovering of root disk


My root disk failed and I tried to recover via make_tape_recovery. But it halfway stating the archive is corrupted.

Now I am trying to recover the root disk from my Veritas backup. Below is what I intend to do. Pls advise me if it is feasible or are there any batter ways to recover my root disk.

1) Use make_tape_recovery from another server (same class) to bring up the failed server on one of the disk. (failed server have 2 internal disks)
2) Change hostname, IP, reconfigure backup software.
3) Restore the failed server / and all other systems mount points on the seconed disk.
4) Make second disk bootable.
5) Failed server should be recovered.

1) Any problem to recover using make_tape_recovery from another server? Any problem with the device path of the HBA to connect to my tape library?
2) How do I configure the failed server to have a second disk and allow the restore of the original root disk onto the second disk?
3) How do I make the second disk bootable and boot from it if the restoration is successful?

Thank you.
Chin Heng

Steven E. Protter
Exalted Contributor

Re: recovering of root disk

1) No. You need to intervene when propmted for keyboard input. This allows you to change the hostname and IP of the target server and anything else you want to change.

2) If the server you took the make_tape_recovery tape on was mirrored, the server you recover it to may end up mirrored as well. If it has the same disk structure, its likely the mirror will carry through.

3) If the original server was properly mirrored. the target server will be.

Here is acopy of a procedure for doing it after the fact.

pvcreate -B /dev/rdsk/c1t0d0 #use real disk

mkboot -l /dev/rdsk/c1t0d0
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t0d0 # use real disk

# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?

If you are running 64-bit OS:

# mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?

vgextend /dev/vg00 /dev/dsk/c1t0d0 # same thing
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0

# real disk. repeat for other lvols

lvlnboot -r /dev/vg00/lvol3 # root fs /
lvlnboot -s /dev/vg00/lvol2 #swap
lvlnboot -d /dev/vg00/lvol2 #swap/dump
lvlnboot -b /dev/vg00/lvol1
lvlnboot -R
lvlnboot -v
setboot -a 52.1.0 # second disk

Steven E Protter
Owner of ISN Corporation
Yeap Chin Heng
Occasional Contributor

Re: recovering of root disk


Thks for the reply.

Is the approach to restore the root disk correct?

Is it not possible to restore the original server onto the interim recover server (using make_tape_recovery from another server) directly? Or must I have a second disk for original server to restore to just like what I have propose?

If you using the propose approach:
1)When and how do i intervene during the boot from make_tape_recovery tape?

2)Yes, the server that i took the make_tape_recovery tape on was mirrored. And the server to recover has the same disk structure. What is the consequence? So can i break the mirror in order to create a second disk to recover the original server?

Sorry to say that I'm not familar to UNIX. I don't quite understand procedure that you have describe. Are you able to provide a more detail description on the whole procedure to recover my root disk?

Which disk is "use real disk" referring to?
Which disk is "use second disk" referring to?

Thank you
Chin Heng
Sridhar Bhaskarla
Honored Contributor

Re: recovering of root disk

Hi Chin Heng,

Unless we know how those two internal disks were configured, we cannot conclude with an accurate solution. If those disks were mirrors, then you can easily boot from the mirrors and you can ignore this entire procedure. If not, then you will need to know all the filesystems that were using both the disks. Those filesystems will not be recovered. Let us assume that the other disk was not used. Your procedure will work provided you will have to do a lot of cleanup.

Try installing latest ignite/UX software on the other disk and prepare the archive. Use '-i' option with make_tape_recovery so you can do interactive installations.

1. Boot the tape. It will give you an install window.
2. Select the replaced root disk. Also go into "Volume Group" configuration (available in filesystems tab) and unselect all the disks except the one you chose for root disk.
3. Configure the IP and other network details.
4. It will give you a final summary with warning and selected root disks. Verify for one more time and let the installation continue.
5. Once the system comes back, make the other disk as bootable and create the VG.

pvcreate -B /dev/rdsk/cxtydz
mkboot -l /dev/rdsk/cxtydz
mkdir /dev/vg00old
mknod /dev/vg00old/group
vgcreate vg00old /dev/dsk/cxtydz
mkboot -a "hpux -lq (;0)" /dev/rdsk/cxtydz
mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/cxtydz
Create the logical volumes like the failed disk. Make sure stand (hfs) comes first followed by swap and root and all of them are contiguous.

lvcreate -C y -r N -L 200 vg00old
newfs -F hfs /dev/vg00old/rlvol1
mount /dev/vg00old/lvol1 /oldstand
lvcreate -C y -r N -L 1024 vg00old
lvcreate -C y -r N -L 512 vg00old
newfs -F vxfs /dev/vg00old/rlvol3
mount /dev/vg00old/lvol3 /oldroot
...repeat the above for usr,opt,tmp etc.,

6. Restore the data from the backup. Create map file in /oldroot filesystem.

vgexport -p -v -m /oldroot/ vg00old

7. Boot the system from the restored disk. Interact with ISL and specify LV maintenance mode.

ISL> hpux -is -lm

8. Once the system is in LV maintenance mode, export vg and import it as vg00.

vgchange -a n vg00
vgexport vg00
mkdir /dev/vg00
mknod /dev/vg00/group c 64 0x000000

vgimport -v -m / vg00 /dev/dsk/cxtydz (this device file may change but tydz will remain the same)
Run lvlnboot commands
lvlnboot -b /dev/vg00/lvol1
lvlnboot -r /dev/vg00/lvol3
lvlnboot -s /dev/vg00/lvol2
lvlnboot -d /dev/vg00/lvol2
lvlnboot -R
lvlnboot -v

Modify /etc/fstab to indicate correct LVs.
cp /etc/fstab /etc/fstab.failed
vi /etc/fstab

9. Reboot the system and boot through this disk normally. If everything is ok, then set the primary path to this disk using 'setboot' command.

As a lesson learned, try taking make_net_recovery images. You can actually prepare make_tape_recovery tapes from net_recovery images in case if you run into media failures.


You may be disappointed if you fail, but you are doomed if you don't try