Operating System - HP-UX
1833555 Members
3165 Online
110061 Solutions
New Discussion

Re: howto make the second, currently mirrored, disk bootable

 
SOLVED
Go to solution
Ferdinand_5
Advisor

howto make the second, currently mirrored, disk bootable

Hi before I make a mistake on a live machine:

I want to make the second, currently mirrored disk bootable.
I plan to do :
#mkboot -a "hpux -lq" /dev/rdsk/c1t0d0
#
#
#

Will this work?
Did I forget anything?
What are the risks?


At the moment I have:

# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c1t2d0 (0/0/1/1.2.0) -- Boot Disk
/dev/dsk/c1t0d0 (0/0/1/1.0.0)
Boot: lvol1 on: /dev/dsk/c1t2d0
Root: lvol3 on: /dev/dsk/c1t2d0
Swap: lvol2 on: /dev/dsk/c1t2d0
/dev/dsk/c1t0d0
Dump: lvol2 on: /dev/dsk/c1t2d0, 0


# ioscan -fnCdisk
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
disk 0 0/0/1/1.0.0 sdisk CLAIMED DEVICE HP 18.2GMAN3184MC
/dev/dsk/c1t0d0 /dev/rdsk/c1t0d0
disk 1 0/0/1/1.2.0 sdisk CLAIMED DEVICE HP 18.2GMAN3184MC
/dev/dsk/c1t2d0 /dev/rdsk/c1t2d0
disk 2 0/0/2/0.0.0 sdisk CLAIMED DEVICE HP 36.4GATLAS10K3_36_SCA
/dev/dsk/c2t0d0 /dev/rdsk/c2t0d0
disk 3 0/0/2/0.2.0 sdisk CLAIMED DEVICE HP 36.4GMAN3367MC
/dev/dsk/c2t2d0 /dev/rdsk/c2t2d0
disk 4 0/0/2/1.2.0 sdisk CLAIMED DEVICE HP DVD-ROM 305
/dev/dsk/c3t2d0 /dev/rdsk/c3t2d0
# uname -a
HP-UX xxxxxxx B.11.11 U 9000/800 1761907651 unlimited-user license

# lifls -l /dev/rdsk/c1t2d0
volume ISL10 data size 7984 directory size 8
filename type start size implement created
===============================================================
ODE -12960 584 848 0 01/12/21 12:58:49
MAPFILE -12277 1432 128 0 01/12/21 12:58:49
SYSLIB -12280 1560 353 0 01/12/21 12:58:49
CONFIGDATA -12278 1920 234 0 01/12/21 12:58:49
SLMOD2 -12276 2160 141 0 01/12/21 12:58:49
SLDEV2 -12276 2304 135 0 01/12/21 12:58:49
SLDRV2 -12276 2440 205 0 01/12/21 12:58:49
SLSCSI2 -12276 2648 116 0 01/12/21 12:58:49
MAPPER2 -12279 2768 142 0 01/12/21 12:58:49
IOTEST2 -12279 2912 411 0 01/12/21 12:58:49
PERFVER2 -12279 3328 124 0 01/12/21 12:58:49
PVCU -12801 3456 64 0 01/12/21 12:58:49
SSINFO -12286 3520 2 0 01/12/21 12:58:49
ISL -12800 3528 306 0 00/11/08 20:49:59
AUTO -12289 3840 1 0 00/11/08 20:49:59
HPUX -12928 3848 848 0 00/11/08 20:50:00
LABEL BIN 4696 8 0 02/07/23 08:28:42
# ^[
# lifls -l /dev/rdsk/c1t0d0
volume c1t0d0 data size 29 directory size 1 02/08/01 12:05:57
filename type start size implement created
===============================================================
LABEL BIN 8 8 0 02/08/01 12:05:57

5 REPLIES 5
Steven E. Protter
Exalted Contributor
Solution

Re: howto make the second, currently mirrored, disk bootable

Complete guide:

pvcreate -B /dev/rdsk/c1t0d0 #use real disk

mkboot -l /dev/rdsk/c1t0d0
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t0d0 # use real disk


# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?

If you are running 64-bit OS:

# mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?


vgextend /dev/vg00 /dev/dsk/c1t0d0 # same thing
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0

# real disk. repeat for other lvols

lvlnboot -r /dev/vg00/lvol3 # root fs /
lvlnboot -s /dev/vg00/lvol2 #swap
lvlnboot -d /dev/vg00/lvol2 #swap/dump
lvlnboot -b /dev/vg00/lvol1
lvlnboot -R
lvlnboot -v
setboot
setboot -a 52.1.0 # second disk

Regards,

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Fred Ruffet
Honored Contributor

Re: howto make the second, currently mirrored, disk bootable

Making it bootable should have been thought at creation time... but everything is possible :)

You'll have to break mirrors, make this disk empty, take it off the VG, and recreate PV with the -B option for pvcreate. Then steps are :

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

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

3. Use mkboot to place the boot utilities in the boot area and add the AUTO file
"mkboot /dev/rdsk/cXtYdZ"

4. Use mkboot to update the AUTO file on the primary boot disk
"mkboot -a "hpux -lq" /dev/rdsk/cUtVdW"

5. Mirror the stand, root and swap logical volumes
"lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/cXtYdZ"
"lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/cXtYdZ"
"lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/cXtYdZ"
and other volumes if you want

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.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Bernhard Mueller
Honored Contributor

Re: howto make the second, currently mirrored, disk bootable

Ferdinand,

looks like you just did pvcreate c1t0d0, vgextend vg00 with c1t0d0 and lvextend -m 1 for all vg00 lvols, right?

then you need to reduce the mirrors,
lvreduce -m 0 /dev/vg00/lvol1 /dev/dsk/c1t0d0
...
take the disk out of vg00 again,
vgreduce vg00 /dev/dsk/c1t0d0
then run
pvcreate -f -B /dev/rdsk/c1t0d0

and follow the rest of the procedure SEP provided.

Regards,
Bernhard
Geoff Wild
Honored Contributor

Re: howto make the second, currently mirrored, disk bootable

Here's a full procedure I use:

Say /dev/dsk/c0t6d0 is the root disk and /dev/dsk/c3t6d0 is the disk you want to make a mirror of.

1. Create a bootable LVM disk to be used for the mirror.
pvcreate -B /dev/rdsk/c3t6d0
2. Add this disk to the current root volume group.
vgextend /dev/vg00 /dev/dsk/c3t6d0
3. Make the new disk a boot disk.
mkboot -l /dev/rdsk/c3t6d0
4. Copy the correct AUTO file into the new LIF area.
mkboot -a "hpux -lq (;0)/vmunix" /dev/rdsk/c3t6d0
5. Mirror the boot, root and primary swap logical volumes to the new
bootable disk. Ensure that all devices in vg00, such as /usr, /swap,
etc., are mirrored.
The following is an example of mirroring the boot logical volume:
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c3t6d0
The following is an example of mirroring the primary swap logical
volume:
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c3t6d0
The following is an example of mirroring the root logical volume:
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c3t6d0
6. Update the boot information contained in the BDRA for the mirror
copies of boot, primary swap and root.
/usr/sbin/lvlnboot -b /dev/vg00/lvol1
/usr/sbin/lvlnboot -s /dev/vg00/lvol2
/usr/sbin/lvlnboot -r /dev/vg00/lvol3
7. Check if the BDRA is correct.
/usr/sbin/lvlnboot -R /dev/vg00
8. Verify that the mirrors were properly created.
lvlnboot -v /dev/vg00
The output of this command is shown in a display like the following:
Boot Definitions for Volume Group /dev/vg00:
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c0t6d0 (1/0/0/3/0.6.0) -- Boot Disk
/dev/dsk/c3t6d0 (1/0/1/0/0/1/1.6.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Root: lvol3 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Swap: lvol2 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Dump: lvol2 on: /dev/dsk/c0t6d0, 0

vgdisplay -v vg00

Then lvextend for all other lvols:

lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol9 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol10 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol11 /dev/dsk/c3t6d0

I attached as well (in case cut'n'paste messed up).

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Ferdinand_5
Advisor

Re: howto make the second, currently mirrored, disk bootable

The info you people gave was fantastic.

I do like it when the solution is idot proof.

THX