Operating System - HP-UX
1827894 Members
1537 Online
109969 Solutions
New Discussion

Mirrored Root Disks-Common Misconceptions

 
Jason Luginbuhl_1
Frequent Advisor

Mirrored Root Disks-Common Misconceptions

This topic meant to clarify some common misconceptions regarding the
functionality provided by mirrored root disks in vg00. The below information
could save you from significant downtime on a production system:

* The mirroring does provide extra copies of essential root filesystem data but
does not necessarily provide an alternate boot disk and does not provide
"failover".

* If one disk is unavailable, then the system can use the alternate instead;
however, the crash of a vg00 disk still could panic and reboot the system. If
the system is not configured properly then it will not come back up as
"automatically" as desired.

Here are some things to check and some best practices:

1) Make sure both disks are indeed "boot disks". The lvols can be mirrored onto
a non-bootable disk. In this scenerio, if you lose your boot disk and go down,
you won't be back up until you replace the bad disk and either reimage via
ignite or cold-install. This not generally desired. To check that both disks
are truly bootable, use lvlnboot. To be truly bootable, both disks must show as
"Boot Disk" and both disks must be mentioned for "Boot", "Root", and "Swap". If
they are not, then only one of the disks is truly bootable.
Here is an example of a mirrored root vg with only one bootable disk:
# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c1t6d0 (56/52.6.0) -- Boot Disk
/dev/dsk/c1t4d0 (56/52.4.0)
Boot: lvol1 on: /dev/dsk/c1t6d0
Root: lvol3 on: /dev/dsk/c1t6d0
Swap: lvol2 on: /dev/dsk/c1t6d0
Dump: lvol2 on: /dev/dsk/c1t6d0, 0
Here is the same configuration with two bootable disks:
# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c1t6d0 (56/52.6.0) -- Boot Disk
/dev/dsk/c1t4d0 (56/52.4.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c1t6d0, c1t4d0
Root: lvol3 on: /dev/dsk/c1t6d0, c1t4d0
Swap: lvol2 on: /dev/dsk/c1t6d0, c1t4d0
Dump: lvol2 on: /dev/dsk/c1t6d0, 0

2) Make sure that your primary boot path is the primary boot disk and the
secondary boot path is your bootable mirrored disk. Make sure autosearch and
autoboot are on. The command setboot can check and change these settings. For
the above example, the following is correct:
# setboot
Primary bootpath : 56/52.6.0
Alternate bootpath : 56/52.4.0

Autoboot is ON (enabled)
Autosearch is ON (enabled)

If this is not set correctly, then your system will not look to boot from the
mirror if the primary is not available.

3) Check to make sure that the autoboot string disables the quorum checking. In
order to activate a Volume Group, LVM requires that MORE than HALF of the disks
be available. In the case of a 2 disk vg00 that would mean that BOTH need to be
available to activate vg00. This means that if EITHER your primary disk or your
mirror crashes, then the system will not be able to activate vg00 at boot time.
This means that your system will not come up. You will have to interrupt the
boot sequence and override the quorum checking in order to bring the system up.
To get around this you can use the mkboot with the -a option to set the
autoboot string to disable quorum checking by default. You must have this set
up properly on both disks. For the above example this would be the correct
format:
# mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t6d0
# mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t4d0

NOTE: It is the -lq parameter passed to the hpux kernel loader that disables
the quorum checking.
3 REPLIES 3
Alan Riggs_1
Regular Advisor

Re: Mirrored Root Disks-Common Misconceptions

Excellent treatment Jason. The only things I might add is that you might want
to adjust the mirror write cache and mirror write consistency for your primary
swap volume to reduce the performance overhead. To do this:
boot to lvm maintenance mode
(hpux -lm from the ISL prompt)
acivate the root volume
(vgchange -a y vg00)
change the mirroring defaults for swap
(lvchange -c n -M n /dev/vg00/lvol2)
resync the lvlnboot links just as a precaution
(lvlnboot -R)
use the shutdown command to reboot into normal mode
(shutdown -ry 0)

Also, always make sure that you test your mirrored drive by booting off of it
and running all necessary applications.
Tim Tipple_2
Occasional Contributor

Re: Mirrored Root Disks-Common Misconceptions

I have followed your instructions as closely as possible but I still cannot get
my mirror disk to be bootable.

The output from "lvlnboot -v" shows that I am almost there (boot, root and swap
are all mirrored to both disks) but my second disk is still not listed as a
"Boot Disk".

# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c0t4d0 (8/4.4.0) -- Boot Disk
/dev/dsk/c0t8d0 (8/4.8.0)
Boot: lvol1 on: /dev/dsk/c0t4d0
/dev/dsk/c0t8d0
Root: lvol3 on: /dev/dsk/c0t4d0
/dev/dsk/c0t8d0
Swap: lvol2 on: /dev/dsk/c0t4d0
/dev/dsk/c0t8d0
Dump: lvol2 on: /dev/dsk/c0t4d0, 0


For completeness, here is the output of "setboot" which I believe is as is
should be:

# setboot
Primary bootpath : 8/4.4.0
Alternate bootpath : 8/4.8.0

Autoboot is ON (enabled)
Autosearch is ON (enabled)


Do you have any suggestions as to what I may have forgotton?
Johannes Imhof
New Member

Re: Mirrored Root Disks-Common Misconceptions

Thanks for the good script to create a mirrored boot disk, we wrote a script
but it does not work. It would be very nice to get help on this problem, it is
very important for us. The problem is that the mirrored disk is not bootable
although we worked along your advices.

1. pvcreate -B /dev/rdsk/c2t2d0 ### create physical volume for use in LVM
volume group, -B == boot
2. mkboot /dev/rdsk/c2t2d0 ### Place the LIF information on the disk
3. mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c2t2d0 ## disk 2: make sure
that the autoboot string disables the quorum checking
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t2d0 ## disk 1: make sure
that the autoboot string disables the quorum checking

Ausgabe der aktuellen Einstellungen:

# setboot
Primary bootpath : 0/0/1/1.2.0
Alternate bootpath : 0/0/2/0.2.0

Autoboot is ON (enabled)
Autosearch is ON (enabled)

4. SAM => Disk 2 (0/0/2/0.2.0) added to volume group vg00 (ansonsten alles
"default")

5. SAM => Alle logischen Volumes auf 1 Spiegelkopie eingerichtet

6. # lvlnboot -R
Volume Group configuration for /dev/vg00 has been saved in
/etc/lvmconf/vg00.conf
# 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/c2t2d0 (0/0/2/0.2.0)
Boot: lvol1 on: /dev/dsk/c1t2d0
/dev/dsk/c2t2d0
Root: lvol3 on: /dev/dsk/c1t2d0
/dev/dsk/c2t2d0
Swap: lvol2 on: /dev/dsk/c1t2d0
/dev/dsk/c2t2d0
Dump: lvol2 on: /dev/dsk/c1t2d0, 0

Thanks a lot.