1834903 Members
2559 Online
110071 Solutions
New Discussion

Mirror Steps Help

 
SOLVED
Go to solution
Steven Chen_1
Super Advisor

Mirror Steps Help

Hi,

I would like to get this new post following the mirror readiness post, for it may be more specific to the point.

I have got the steps from hp engineer about mirroring the existing up-and-running root (vg00), i.e. to get 2nd to mirror the root drive. I would like to seek comments on them so that I would get thing done right.

The followings are the steps:

---------------------

Mirroring the root volume group:

1) swlist -l bundle

This will display MirrorDisk/UX if installed on the system. If MirrorDisk/UX isn't found, then it will need to be loaded. This product **is not** part of the standard Core-OS, It must be purchased.

2) pvcreate -fB /dev/rdsk/c1t2d0 The -B option is used to create a bootable Physical Volume.

3) vgextend vg00 /dev/dsk/c1t2d0 This adds the Physical Volume to the root volume group.

4) mkboot /dev/rdsk/c1t2d0 Make sure to use the character device file when using mkboot.

5) mkboot -a "hpux (;0)/stand/vmunix" /dev/rdsk/c1t2d0 **** or ****
mkboot -a "hpux -lq" /dev/rdsk/cXtXdX **** on both disks !!! ***

6) lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t2d0

This command extends the mirror to the specified Physical Volume.

**NOTE: The lvextend command must be done on all logical volumes on the primary disk. This means that lvextend has to be done on lvol1 -> lvolX. This also includes /dev/vg00/lvol2, which by default is primary swap. lvol1 must be the first logical volume mirrored; if it is not, then you will not be able to boot from the mirror.

7) lvlnboot -b /dev/vg00/lvol1 Specifies the boot "/stand" logical volume (10.20 & 11.0)

8) lvlnboot -r /dev/vg00/lvol3 Specifies the root "/" logical volume.

***NOTE: The root logical volume is /dev/vg00/lvol1 for HP-UX 10.01 & 10.10, and /dev/vg00/lvol3 (as in this example) is the root logical volume in 10.20 & 11.0.

9) lvlnboot -s /dev/vg00/lvol2 Specifies the swap logical volume.

To determine where the swap logical volume is located use the swapinfo command.

10) lvlnboot -d /dev/vg00/lvol2 Specifies the dump logical volume.

11) lvlnboot -R Recovers any BDRA info.

12) lvlnboot -v Verify boot, root, swap and dump settings.

13) setboot This displays the currently set Primary and Alternate boot paths.

14) setboot -a mirror_disk_hardware_address Changes the Alternate Boot Path to the path of the Root Mirror.

15) shutdown -r now Reboot with no grace period.

------------------------------

Appreciated.

Steven
Steve
6 REPLIES 6
James R. Ferguson
Acclaimed Contributor
Solution

Re: Mirror Steps Help

Hi Steven:

Always apply the low-quorum to the boot string of 'mkboot':

# # mkboot ???a ???hpux ???lq??? /dev/rdsk/cXtYdZ

Make sure that you mirror your logical volumes in order (at least the first three!);

# for LV in 1 2 3 4 5 6 7 8
> do
> lvextend ???m 1 /dev/vg00/lvol${LV} /dev/dsk/cXtYdZ
> done

The "acid" test for a mirrored boot disk is to boot from it.

Following any boot, should you wish to know from which disk you booted, do:

# echo boot_string/S|adb /stand/vmunix /dev/mem

Regards!

...JRF...
S.K. Chan
Honored Contributor

Re: Mirror Steps Help

My comments ..
step 5
======
# mkboot -a "hpux -lq" /dev/rdsk/cXtXdX
==> Yes do this on both disks because you would want both (primary and secondary) disks to escape quorum in an event of a disk failure.
step 6
======
Before you lvextended your LVs, double check your primary root disk ..
# pvdisplay -v /dev/dsk/cXtYdZ
and take note of the order of the LVs. Perform the lvextend mirror for each of the LV as they appear in that order.

The rest looks good !
John Dvorchak
Honored Contributor

Re: Mirror Steps Help

One final note. After you have rebooted off of the mirrored drive, you need not shut down and reboot off of the primary. In other words once the system is up and running, after booting off of the alternate drive, you can leave it up and running until you need to reboot again. Some people think that after booting from the alternate that you are running on that disk. This is not so, you only used the alternate to boot from and once the vg becomes active and mirroring starts there is no master or slave disk.

This just might save you 20 minutes or so rebooting again after testing the mirrored disk.
If it has wheels or a skirt, you can't afford it.
Steven Chen_1
Super Advisor

Re: Mirror Steps Help

Thanks for the decent help.

Can someone clarify further:

-- I have c1t2d0 that is root drive.

-- I have c2t2d0 that is going to be mirrored to root.

-- So the pvcreate should be on c2t2d0, not c1t2d0. Correct? Or the root drive is formated.

Can someone reply?

Very appreciated.

Steven
Steve
James R. Ferguson
Acclaimed Contributor

Re: Mirror Steps Help

Hi Steven:

Yes, you are correct. The drive you are adding which will serve as the mirror is 'c2t2d0', so that is the *only* drive to which you issue a 'pvcreate -B'.

Regards!

...JRF...

Sridhar Bhaskarla
Honored Contributor

Re: Mirror Steps Help

Hi Steven,

Few precautions:

1. Take a note of "lvlnboot -v" output before you do anything. Note down the logical volumes corresponding to boot, root, swap and dump. Mostly they will be lvol1, lvol3, lvol2 and lvol2 respectively.

After doing "mkboot -a "hpux -lq"" on both the disks make sure you run lvlnboot on all these logical volumes.

lvlnboot -b /dev/vg00/lvol1
lvlnboot -r /dev/vg00/lvol3
lvlnboot -s /dev/vg00/lvol2
lvlnboot -d /dev/vg00/lvol2
lvlnboot -R

2. Do pvcreate only on the disk that is going to be the mirror *not* the primary disk. In your case it is c2t2d0.

3. Run setboot command and set the paths. Look at the man page of setboot on setting up the paths.

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