1833160 Members
2999 Online
110051 Solutions
New Discussion

mkboot : mirroring VG00

 
SOLVED
Go to solution
Gayet_3
Advisor

mkboot : mirroring VG00

Hi,

Having 2 disk in vg00, i do several mkboot command :
#mkboot /dev/rdsk/c2t6d0
#mkboot -l /dev/rdsk/c2t6d0
#mkboot -a "hpux /stand/vmunix -lq" /dev/rdsk/c2t6d0
#mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c2t6d0

Each time answering 'yes'. I don't really know why i have to do all those mkboot things.

Then i made all my lvextend (the lvol2 one's tell me something about LIF but mirror it anyway)

Do i forget some commands ?

The output of lvlnboot command is :
# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c0t6d0 (0/0/0/2/0.6.0) -- Boot Disk
/dev/dsk/c2t6d0 (0/0/0/3/0.6.0)
Boot: lvol1 on: /dev/dsk/c0t6d0
/dev/dsk/c2t6d0
Root: lvol3 on: /dev/dsk/c0t6d0
/dev/dsk/c2t6d0
Swap: lvol2 on: /dev/dsk/c0t6d0
/dev/dsk/c2t6d0
Dump: lvol2 on: /dev/dsk/c0t6d0, 0

Current path "/dev/dsk/c6t0d0" is an alternate link, skip.
Current path "/dev/dsk/c6t1d0" is an alternate link, skip.
Current path "/dev/dsk/c6t2d0" is an alternate link, skip.
Current path "/dev/dsk/c6t3d0" is an alternate link, skip.
Current path "/dev/dsk/c6t4d0" is an alternate link, skip.
Current path "/dev/dsk/c6t5d0" is an alternate link, skip.
#

is there a way to know if the pvcreate -B succeded ?
8 REPLIES 8
Pete Randall
Outstanding Contributor

Re: mkboot : mirroring VG00

The steps to mirror your boot volume are:

1. Create a physical volume with a boot reserved area
"pvcreate -B /dev/rdsk/c1t6d0"

2. Add the physical volume to the root VG
"vgextend /dev/vg00 /dev/dsk/c1t6d0"

3. Use mkboot to place the boot utilities in the boot area and add the AUTO file
"mkboot /dev/rdsk/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 /dev/dsk/c1t6d0"
"lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c1t6d0"
"lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c1t6d0"

6. Modify your alternate boot path
"setboot -a 8/8.6.0 # use the path of your new boot disk"

7. Edit /stand/bootconf and add your new mirrored boot disk.

That's all there is to it. You may notice that I left out any lvlnboot commands. That is because they are not ne
cessary - see the man page:

"This command should be run in recovery mode (-R) whenever the configuration of the root volume group is affected
by one of the following commands: lvextend, lvmerge, lvreduce, lvsplit, pvmove, lvremove, vgextend, or vgreduce
(see lvextend(1M), lvmerge(1M), lvreduce(1M), lvsplit(1M), pvmove(1M), lvremove(1M), vgextend(1M), and vgreduce(1
M)). Starting with HP-UX Release 10.0, this is done automatically."


Pete

Pete
Slawomir Gora
Honored Contributor

Re: mkboot : mirroring VG00

Hi,

1. you can use:
mkboot -a "hpux -lq" /dev/rdsk/c2t6d0
insted of:
mkboot -a "hpux /stand/vmunix -lq" /dev/rdsk/c2t6d0

2. you should to do
mkboot -a "hpux /stand/vmunix -lq" for your orginal drive too.

3. on the end of script you have to do:

lvlnboot -b /dev/vg00/lvol1
lvlnboot -v -r /dev/vg00/lvol3
lvlnboot -s /dev/vg00/lvol2






accent
Frequent Advisor

Re: mkboot : mirroring VG00

To make root mirror disk see the attached document.
Gayet_3
Advisor

Re: mkboot : mirroring VG00

THx,

How can i remove my PV dev/dsk/c2t6d0 from the VG00 in order to do all those command (pvcreate, vgextend, mkboot ....) ?
Without datalost ofcourse .

Gayet_3
Advisor

Re: mkboot : mirroring VG00

while my PV is already in the vg00, how can i make the pvcreate command ?
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: mkboot : mirroring VG00

You first do an lvreduce -m 0 for EVERY lvol that is mirrored.

e.g.
lvreduce -m 0 /dev/vg00/lvol1 /dev/dsk/c2t6d0

Next you do a vgreduce removing your 2nd PV.
e.g.
vgreduce /dev/vg00 /dev/dsk/c2t6d0

Man lvreduce, vgreduce for details. Your original boot disk will remain intact.

You can then do a pvcreate -B -f /dev/rdsk/c2t6d0.

If it ain't broke, I can fix that.
Gayet_3
Advisor

Re: mkboot : mirroring VG00

GREAT !
Everything works fine :

database, root # vgreduce /dev/vg00 /dev/dsk/c2t6d0
Volume group "/dev/vg00" has been successfully reduced.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.con
f
database, root # pvcreate -B /dev/rdsk/c2t6d0
Physical volume "/dev/rdsk/c2t6d0" has been successfully created.
database, root # vgextend /dev/vg00 /dev/dsk/c2t6d0
Volume group "/dev/vg00" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.con
f
database, root # mkboot /dev/rdsk/c2t6d0
database, root # mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c2t6d0
database, root # lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t6d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol1" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.con
f
database, root # lvlnboot -v /dev/vg00
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c0t6d0 (0/0/0/2/0.6.0) -- Boot Disk
/dev/dsk/c2t6d0 (0/0/0/3/0.6.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c0t6d0
Root: lvol3 on: /dev/dsk/c0t6d0
Swap: lvol2 on: /dev/dsk/c0t6d0
Dump: lvol2 on: /dev/dsk/c0t6d0, 0

database, root #

i now have to mirror all the lv and make a try using setboot.

Thx all for your help.
Gayet_3
Advisor

Re: mkboot : mirroring VG00

CU guys.