1752815 Members
6175 Online
108789 Solutions
New Discussion юеВ

Re: Mirror root disk

 
SOLVED
Go to solution
Robert Barton
New Member

Mirror root disk

What is the quick and easiest way to mirror the root disk. I have read serveral procedures and all seem long and drawn out. I was looking at the mirror question in today's forum and was wondering would sam do it all for me or would I still need to make a bootable LVM disk first.
Let not your heart be troubled!!!!!
8 REPLIES 8
Mark Mitchell
Trusted Contributor

Re: Mirror root disk

sam will set it up with easy, but you have to tell the OS that the second disk is a boot disk and that you can use it without quarem. It seems drawn out but its rather quick process.
Thierry Poels_1
Honored Contributor

Re: Mirror root disk

Hi,

I don't believe that SAM would help you to make a boot disk, not sure, but anyway.

[adapt the commands below to your needs]
Step 1 (before assigning anything to this disk!)
# pvcreate -B /dev/rdsk/c2t8d0
# mkboot /dev/rdsk/c2t8d0
# mkboot -a "hp-ux -lq(;0)/stand/vmunix" /dev/rdsk/c2t8d0

Step 2 (add the disk to VG00)
# vgextend /dev/vg00 /dev/dsk/c2t8d0

Step 3 (mirror the required lvols to this disk)
# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t8d0
# lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c2t8d0
# lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c2t8d0

Step 4 : mirror the other lvols which you want/need to mirror.

Step 5 : try to boot from this disk :)
good luck,
Thierry
(don't blame me for any typo's ;)
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Mark Mitchell
Trusted Contributor

Re: Mirror root disk

Here are the steps
1 Make the disk a boot device
pvcreate -f -B /dev/rdsk/c0t8d0

2 Add the disk to the root VG
vgextend vg00 /dev/dsk/c0t8d0

3.Copy boot programs to the disk
mkboot -l /dev/dsk/c0t8d0

4. Make sure lif programs were added
lifls /dev/dsk/c0t8d0

5. Make sure that you mirror each lv in order
lvextend -m 1 /dev/vg00/lvol1
lvextend -m 1 /dev/vg00/lvol2
lvextend -m 1 /dev/vg00/lvol3
lvextend -m 1 /dev/vg00/lvol4
lvextend -m 1 /dev/vg00/lvol5
lvextend -m 1 /dev/vg00/lvol6
lvextend -m 1 /dev/vg00/lvol7
lvextend -m 1 /dev/vg00/lvol8
lvextend -m 1 /dev/vg00/lvol9

6. Verify mirrors are correct
lvlnboot -v vg00

7.Copy the auto file used by hpux loader at start up
lifcp /dev/dsk/c0t5d0:AUTO -
then enter
lifco /dev/dsk/c0t8d0:AUTO -

8. Make the disks able to boot without quorum
mkboot -a "hpux -lq" /dev/rdsk/c0t5d0
mkboot -a "hpux -lq" /dev/rdsk/c0t8d0

9. Make sure both are set up as the primary and backup boot devices
setboot
if you need to change enter
setboot -a 8/0.8.0
Thierry Poels_1
Honored Contributor

Re: Mirror root disk

Mark thanks for the extended version :)
(copied & pasted for future reference)

but a little remark at point 5. :
you should define where the mirror copy should reside : suppose a VG00 with 10 disks, the mirror copies of the first 3 lvols could be placed on another disk instead of your second boot disk!

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Vincenzo Restuccia
Honored Contributor

Re: Mirror root disk

# pvcreate -B /dev/rdsk/cxtyd0 mkboot /dev/rdsk/cxtyd0
# mkboot -a "hp-ux -lq(;0)/stand/vmunix" /dev/rdsk/cxtyd0
mkboot -a "hp-ux -lq(;0)/stand/vmunix" /dev/rdsk/cwtzd0 (primary disk)


Step 2 (add the disk to VG00)
# vgextend /dev/vg00 /dev/dsk/cxtyd0

Step 3 (mirror the required lvols to this disk)
# lvextend -m 1 /dev/vg00/lvolx /dev/dsk/cxtyd0
Step 4
lvlnboot -Rv

step 5

setboot -a hardware path (es. 0/0/0/x/0.y) (for alternate boot)

Mark Mitchell
Trusted Contributor

Re: Mirror root disk

Good point....
Bill Hassell
Honored Contributor

Re: Mirror root disk

When you add the additional disk in mirror order to the volume group, the default behavior is to start the mirror extents on the first disk. However, it is a good idea to use lvextend -m 1 with the volume group AND the physical disk device file to force the mirroring to the right disk.

NOTE: The first 3 lvols (/stand, swap and /) must start at the begining of the mirror disk. If not, the mirror will start to boot and then fail as the next two volumes are not contiguous.


Bill Hassell, sysadmin
Giuseppe Giardina
Occasional Advisor
Solution

Re: Mirror root disk

Hi:
I'm sorry, but there is no easy way to make a mirror disk for HP-UX.
First of all, you must buy the HP-UX Mirror disk software: if you haven't this software, forgot about thinkink to make a mirror disk of any kind. Second, when you have the sofware, do NOT use SAM to make a funcional root disk (does not work for me), but read the manual and follow the steps about the command about vgcreate, vgextend, vg*, etc (it work for me).
Bye,
Giuseppe Giardina.
If all fails, read the manual!