1833777 Members
2160 Online
110063 Solutions
New Discussion

mirroring the boot drive

 
Raji Murthy
Occasional Advisor

mirroring the boot drive

Now I am transferring vg00. I have mirrored the boot drive before with one disk. The existing vg00 has two disks in the group.

Do I need to pvcreate with -B option both disks and also do mkboot command on both the disks?

Is there any documentation on this procedure?

Thanks
be good and do good
13 REPLIES 13
Paula J Frazer-Campbell
Honored Contributor

Re: mirroring the boot drive

Hi
This should help:-

Creating a Root mirror


1> pvcreate -B /dev/rdsk/xyz

2> vgextend /dev/vg00 /dev/dsk/xyz

3> mkboot /dev/rdsk/xyz

4> mkboot -a "hpux (;0) /stand/vmunix" /dev/rdsk/xyz

-a auto_file_string If the -a option is specified, mkboot
creates an autoexecute file AUTO on
device, if none exists. mkboot deposits
auto_file_string in that file. If this
string contains spaces, it must be quoted
so that it is a single parameter.

or use

4> mkboot -a "hpux -lq /stand/vmunix" /dev/rdsk/xyz

5> lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/xyz -do this for all the lvols on root disk.

6> lvlnboot -R

7> lvlnboot -v To check if you see both the disks as boot disk.



Paula
If you can spell SysAdmin then you is one - anon
Patrick Wallek
Honored Contributor

Re: mirroring the boot drive

You just need to do the pvcreate -B and mkboot commands on one of the 2 disks that will be you mirror. Do those commands only on the drive that will be your alternate boot device.

Frederic Sevestre
Honored Contributor

Re: mirroring the boot drive

Hi,

You need to do a pvcreate -B, mkboot and vgextend :

# pvcreate -B -f /dev/rdsk/cxtydz
# mkboot /dev/rdsk/cxtydz
# mkboot -a "hpux" /dev/rdsk/cxtydz
# vgextend /dev/vg00 /dev/dsk/cxtydz

and for each filesystems :
#lvextend -m 1 /dev/vg00/lvolx /dev/dsk/cxtydy

Regards,
Fr??d??ric

Crime doesn't pay...does that mean that my job is a crime ?
MARTINACHE
Respected Contributor

Re: mirroring the boot drive

Hi,

Supposing that you want to mirror from c0t5d0 to c0t6d0

pvcreate -B /dev/rdsk/c0t6d0

vgextend /dev/vg00 /dev/dsk/c0t6d0

mkboot -l /dev/rdsk/c0t6d0

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

setboot -a X/X/X/X.X.X
(harware path of c0t6d0)

lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c0t6d0
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c0t6d0
....

-This will depend of your config :

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 -R

Regards,

Patrice.
Patrice MARTINACHE
S.K. Chan
Honored Contributor

Re: mirroring the boot drive

I would like to add a further step after the mirroring is done ..

Installing ODE (Offline Diagnostics)
------------------------------------
===> assuming c2t2d0 is the mirrored disk.
# ll /usr/sbin/diag/lif/updatediaglif
=> Make sure the file exist.
# lifls -l /dev/rdsk/c2t2d0
=> List content of LIF dir (should have ISL,AUTO,HPUX,PAD,LABEL).
# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c2t2d0
=> Install ODE LIF files while "protecting" the existing LIF files.
=> Use updatediaglif2 for 11.0 64-bit.
# lifls -l /dev/rdsk/c2t2d0
=> Should now see the additional LIF files.
Raji Murthy
Occasional Advisor

Re: mirroring the boot drive

I think my question is not clear on the -B option of the pvcreate.

Currently I have vg00 with two disks in the volume group this is seagate drives no mirror copies. Now I want switch to EMC drives.

The procedure I like to use is mirror the two disks to two emc drives and then reduce the mirror(seagate drives).

So I need to initialize two emc disks.

Do I need to use -B option and mkboot on both the disks?

Thanks
be good and do good
Patrick Wallek
Honored Contributor

Re: mirroring the boot drive

Again, NO you DON'T need to 'pvcreate -B' on both your mirror disks. Just do the 'pvcreate -B' on the ONE disk that will be your ALTERNATE BOOT disk.

Example:

Primaries:
disk1
disk2

Mirror
disk3
disk4

To mirror disks 1&2 to disks 3&4:

Pick whichever disk, 3 or 4, is going to be the boot disk. Do the 'pvcreate -B' and mkboot on ONLY that disk. Then when you do the lvextend to mirror make sure that lvol1, lvol2 and lvol3 are lvextended to the disk you made bootable.

Make sense?
S.K. Chan
Honored Contributor

Re: mirroring the boot drive

Check the existing seagate drives to see if both of them have the AUTO LIF file or just one of the drive. IF both have it then the answer is yes, you need to pvcreate -B on both your EMC disks.

# lifls /dev/rdsk/cXdXtX
Helen French
Honored Contributor

Re: mirroring the boot drive

Hi Raji,

The 'pvcreate -B' needs to be used on the mirror disk only. In your case, in only one disk. You cannot boot from both disks. Only one will be holding your boot partition and the other will be holding other file systems. Also this is the case for 'mkboot' too.

HTH,
Shiju
Life is a promise, fulfill it!
Anil C. Sedha
Trusted Contributor

Re: mirroring the boot drive

Hi Raji,

Pls go through the attached document. Very simple to understand.

PS : Don't forget to reward suitable answers with points.


Regards,
Anil
If you need to learn, now is the best opportunity
pap
Respected Contributor

Re: mirroring the boot drive

Hi Raji,
You do not need to do pvcreate -B on both the disks. You need to do only on the disk where root, /stand and swap partitions resides.
Other disks you have to simply add to the vg00 and mirror it with respective logical volumes.

Be sure to use -lq option while using mkboot command that will allow your system to boot in the event primary boot disk will fail.

In short you have to do following things.

suppose you are mirroring A and B to C and D.

for C (cxtydz)

pvcreate -B -f /dev/rdsk/C
vgextend vg00 /dev/rdsk/C
mkboot -l /dev/rdsk/C
mkboot -a "hpux -lq (;0) /stand/vmunix" /dev/rdsk/C

lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/C

lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/C

depending upon logical volumes on first disk.

Similarly you need to do only lvextend in second disk.
use the same command for mirroring.

-pap
"Winners don't do different things , they do things differently"
Clemens van Everdingen
Honored Contributor

Re: mirroring the boot drive

Hi,

Maybe I missed something and didn't I understand the problem, but the following came to my mind.

You said you wanted to mirror the internal disks to emc disks.

How about the possibility to boot from emc disks.

My feeling would be to keep at least the bootable disks internal in the machine.

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
sheevm
Regular Advisor

Re: mirroring the boot drive

Hi !

This issue is not resolved yet. When I lvreduce the mirror copy one lvol6 spanned on two disks but reduced the mirror on only one disk so it left the data on one of the disks.

Now I have problem in removing that disk from the volume group vg00.

Now my VG00 has three disks two good ones(emc) and one bad one.

I cannot boot the system in LVMMAINT mode it is crashing.

Is there any solution?

Please forget the other vgreduce error question. That is the same thing
be good and do good