Operating System - HP-UX
1834080 Members
2481 Online
110063 Solutions
New Discussion

Re: Make mirrored PV bootable

 
SOLVED
Go to solution
WL YU
Occasional Contributor

Make mirrored PV bootable

The rootvg of my HP9000/G30 server comprised of two LVM-enabled disks:

PVs:
/dev/dsk/c0t5d0 (primary boot disk)
/dev/dsk/c0t3d0 (secondary disk)

The server is running HP-UX 10.2

Software disk mirroring has been done on all LVs of the rootvg (including the swap & dump area) using the "lvextend" command. However, it is found that the secondary PV (i.e. /dev/dsk/c0t3d0) is not bootable.

If the primary harddisk is failed, how could I restart HP-UX using the secondary disk?
4 REPLIES 4
RAC_1
Honored Contributor
Solution

Re: Make mirrored PV bootable

Did you use the right procedure?? check it again.

Note the following example is using the disk c1t6d0 as the

mirrored boot disk and c0t6d0 as the boot disk.

1) Initialize the disk and make it bootable

pvcreate -B /dev/rdsk/c1t6d0

Note: the -B parameter tell pvcreate that this will be a

bootable disk.

2) Add the physical volume to the volume group

vgextend /dev/vg01 /dev/dsk/c1t6d0

3) Use mkboot to place the boot utilities in the boot area and add

the AUTO file.

mkboot /dev/dsk/c1t6d0

mkboot -a "hpux -lq" /dev/rdsk/c1t6d0

4) Use mkboot to update the AUTO file on the primary boot

disk.

mkboot -a "hpux -lq" /dev/rdsk/c0t6d0

5) Mirror the stand, root and swap logical volumes

lvextend -m 1 /dev/vg00/lvol1

lvextend -m 1 /dev/vg00/lvol2

lvextend -m 1 /dev/vg00/lvol3

Note: LVM will resynchronize the new mirror copies. This step will

takes several minutes

Repeat the lvextend for all other logical volumes on the boot

mirror.

6) Modify your alternate boot path to point to the mirror copy of the

boot disk.

setboot -a 8/8.6.0 # Use the Hardware path for your new

boot disk.


There is no substitute to HARDWORK
Jim Mallett
Honored Contributor

Re: Make mirrored PV bootable

I would break the mirror that you have existing and start from scratch with RAC's steps above, making sure you don't miss the -B on pvcreate.

For each lvol in vg00:
# lvreduce -m 0 /dev/vg00/lvolX /dev/dsk/c0t3d0
# vgreduce vg00 /dev/dsk/c0t3d0

There is a nice cookbook on this to have handy. It is found within:
Knowledge Trees --> HPUX Software Recovery Handbook --> Chapter 16 - Logical Volume Manager

Jim
Hindsight is 20/20
WL YU
Occasional Contributor

Re: Make mirrored PV bootable

How could I tell whether a PV is created with the "pvcreate -B" option? If I forget to use "-B" option to make a PV bootable, could I use the "pvchange" command to make it bootable later?

If the primary PV (/dev/dsk/c0t5d0) failed before I could make the secondary PV bootable, could I recover the system by merely using a HP-UX 10.x Operating System CD? Or must I do it from scratch and restore the system using backup tapes?



Sridhar Bhaskarla
Honored Contributor

Re: Make mirrored PV bootable

Hi,

If you forgot to use -B option, you will have to reestablish the mirroring. First reduce the mirrors on the disk, 'vgreduce' the disk, then start all over again as mentioned above. To verify if the disk was previously created as bootable, do

lvlnboot -v

You should see the other disk as "Boot Disk" in the output. Another way is to do

lifls /dev/dsk/c0t3d0
lifls /dev/dsk/c0t5d0

It should return some entries like AUTO, HPUX etc.,. If it doesn't then it was not created as a bootable disk.

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