Operating System - HP-UX
1833062 Members
2785 Online
110049 Solutions
New Discussion

Re: Mirroring the root drive.

 
SOLVED
Go to solution
Rob Smith
Respected Contributor

Mirroring the root drive.

I know this question has probably been answered in 1001 other posts but here goes anyway.

I inherited a D370 running 10.20 that has ever other VG mirrored but the root VG - VG00. I have been asking why but no one has been able to give me a cogent answer but anyway. So I have the drive and an engineer is coming out on Friday to put it in. If someone could review the steps I am going to take and tell me if I am right or not I would really appreciate it as I have never mirrored a root drive before.

1/ pvcreate -B /dev/rdsk/cXtXdX

2/ vgextend /dev/vg00 /dev/dsk/cXtXdX

3/ mkboot /dev/dsk/cXtXdX
mkboot -a "hpux" /dev/dsk/cXtXdX
* At this point I know I can use hpux -lq and change the auto file on the other disk to the same but for some unexplainable reason my manager does not want me to change the auto file on the original disk.

4/lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/cXtXdX
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/cXtXdX
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/cXtXdX
lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/cXtXdX
lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/cXtXdX
lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/cXtXdX
lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/cXtXdX
lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/cXtXdX

5/ setboot -a "Hardware Address of New Disk"

6/ *This is the step I am least sure of*
lvlnboot -s /dev/vg00/lvol2
lvlnboot -d /dev/vg00/lvol2
lvlnboot -R /dev/vg00
lvlnboot -v /dev/vg00

Again, I just want to make sure I am on the right track here. Any input is appreciated and I will assign points. Thanks and god bless.

Rob




Learn the rules so you can break them properly.
9 REPLIES 9
PIYUSH D. PATEL
Honored Contributor

Re: Mirroring the root drive.

Hi,

You have to use the raw device files with

# vgextend /dev/vg00 /dev/rdsk/cXtXdX

#mkboot /dev/rdsk/cXtXdX
#mkboot -a "hpux" /dev/rdsk/cXtXdX

rest all things are fine.

Piyush


PIYUSH D. PATEL
Honored Contributor

Re: Mirroring the root drive.

Hi,

you forgot

# lvlnboot -b /dev/vg00/lvol1 ( for boot partition- /stand)

# lvlnboot -r /dev/vg00/lvol3 ( for root filesystem )

#lvlnboot -s /dev/vg00/lvol2 ( for swap filesystem )

Rest all the other filesystems which you have.

Piyush


erics_1
Honored Contributor

Re: Mirroring the root drive.

Rob,

There a good doc on TKB that you may want to print off as it gives you the commands step-by-step. The doc id is #LVMKBRC00005103

I referred this documentation many times for customers.

Hope it Helps!
Eric
S.K. Chan
Honored Contributor
Solution

Re: Mirroring the root drive.

1/ pvcreate -B /dev/rdsk/cXtXdX
==> ok

2/ vgextend /dev/vg00 /dev/dsk/cXtXdX
==> ok

3/ mkboot /dev/dsk/cXtXdX
mkboot -a "hpux" /dev/dsk/cXtXdX
==> I would escape the quorum check if I were you ..
# mkboot -a "hpux -lq" /dev/rdsk/cXtXdX
I normally use raw for my mkboot command.
You might want to double check the man pages.

4/lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/cXtXdX
==> Before that you would want to make sure the order of lvol in the primary disk is followed exactly when you mirror it.
# pvdisplay /dev/dsk/
Take note of the order of the LVs. Lvextend them according to the order they appear.

5/ setboot -a "Hardware Address of New Disk"
==> ok

6/ *This is the step I am least sure of*
lvlnboot -s /dev/vg00/lvol2
lvlnboot -d /dev/vg00/lvol2
lvlnboot -R /dev/vg00
lvlnboot -v /dev/vg00
==> This will update the BDRA. You need to do this ..
# lvlnboot -r /dev/vg00/lvolX /dev/vg00
==> for root lvol (ie /)
# lvlnboot -b /dev/vg00/lvolY /dev/vg00
==> for boot lvol (ie /stand)
# lvlnboot -s /dev/vg00/lvolZ /dev/vg00
==> for primary swap lvol (depends on which lvol the swap is defined.. use ..
# swapinfo -tam
to find out
# lvlnboot -d /dev/vg00/lvolZ /dev/vg00
==> for dump lvol (same as your primary swap lvol)
# lvlnboot -v
==> Check it. You should see 2 lvol entries (except for dump)

That's it ..


Helen French
Honored Contributor

Re: Mirroring the root drive.

Some thoughts:

1) Use raw devices (/dev/rdsk) with mkboot commands. ( Piyush, vgextend does NOT require raw devices)

2) After step 5, I would check the disk with:

# lvlnboot -v

This will list the defenitions and if both disks are identified there, there is no need of doing other 'lvlnboot' commands(11.0 does this). In some cases, you need to do it manually. If the disk is not found then step 6 would be:

# lvlnboot -r /dev/vg00/lvol3 /dev/vg00
# lvlnboot -b /dev/vg00/lvol1 /dev/vg00
# lvlnboot -s /dev/vg00/lvol2 /dev/vg00
# lvlnboot -d /dev/vg00/lvol2 /dev/vg00
# lvlnboot -v ( check output again)

3) I would create the mkboot command with 'hpux -lq' atleast on the new disk.

4) Check this document, will be helpful (the first part) - TKB #DFQKBCA00000220:

http://support1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000061409981

Life is a promise, fulfill it!
James R. Ferguson
Acclaimed Contributor

Re: Mirroring the root drive.

Hi Rob:

In addition to everything already suggested, you can do the "acid" test of booting from your mirrored drive.

Once booted, do:

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

This shows where you booted from; further proof of a successful configuration:

boot_string:
boot_string: disc(10/0.6.0;0)/stand/vmunix

...which can be quickly related to the disk device file by examining the output of 'lvlnboot -v'.

Regards!

...JRF...
Rob Smith
Respected Contributor

Re: Mirroring the root drive.

A most sincere thank you to each and everyone of you. With what I have learned from your replies I am more than confident I can do this.

Regards,
Rob
Learn the rules so you can break them properly.
Sanjay_6
Honored Contributor

Re: Mirroring the root drive.

Hi Rob,

Here is a link you can print and keep for your future refernce,

http://support2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000060353675

Hope this helps.

Regds
A. Clay Stephenson
Acclaimed Contributor

Re: Mirroring the root drive.

Point out to your manager that if you don't do a mkboot -a .... -lq ..... on your primary boot disk, you are actually making your system less likely to boot without intervention because now both disks which comprise vg00 must be available. The smart (safe) way would be to boot off the alternate then change the boot string on the primary and boot from the primary. You then have two known good boot disks.
If it ain't broke, I can fix that.