How to Create an Alternate Boot Disk on PA-RISC Systems

download How to Create an Alternate Boot Disk on PA-RISC Systems

of 6

Transcript of How to Create an Alternate Boot Disk on PA-RISC Systems

  • 8/7/2019 How to Create an Alternate Boot Disk on PA-RISC Systems

    1/6

    How to Create an Alternate Boot Disk on PA-RISC Systems

    as of: 12/22/2010

    This article describes a method that will successfully break (copy) the vg00

    volume group prior to doing system significant changes (such as patching).

    NOTES:

    Before doing anything, perform a make_{tape|net]_recovery!

    (Preferably using -A.)

    lvreduce methods do not successfully split a mirror. A careful read

    of man lvreduce will reveal that disks extents are deallocated (erased).

    For all versions of HP-UX, to create an alternate boot disk there must be N

    free disks (where N = the number of PVs currently in vg00).

    This document is written for PA-RISC systems. For Itanium systems

    please use this document.

    For releases 11.23 and greater Dynamic Root Disk can be used.

    Create an Alternate Boot Disk

    1. Presumption for this example is that vg00 resides on a single disk

    c0t6d0. The alternate disk isc0t5d0 and reports as claimed in

    ioscan fnC disk. The name of the alternate VG is/dev/vgroot.

    Adapt these procedures as necessary to fit your environment.

    2. If necessary, initialize the alternate disk for use as a bootable LVM disk:# pvcreate Bf /dev/rdsk/c0t5d0

    3. If necessary, create /dev/vgroot:

    a. Determine what minor numbers are currently in use:# ll /dev/vg*/group

    crw-r----- 1 root sys 640x000000Jun 17 2002 /dev/vg00/group

    cr--r--r-- 1 root sys 640x010000Jun 15 2004 /dev/vg01/group

    In the above example, 0 and 1 are in use. 2 would be a good,

    logical next choice

    b. Make /dev/vgroot:# mkdir /dev/vgroot

    http://local%20settings/Temporary%20Internet%20Files/Content.Outlook/NB3FEX8C/How%20to%20Create%20an%20Alternate%20Boot%20Disk%20on%20Integrity%20Systems.dochttp://local%20settings/Temporary%20Internet%20Files/Content.Outlook/NB3FEX8C/Dynamic%20Root%20Disk%20and%20MirrorDiskUX.pdfhttp://local%20settings/Temporary%20Internet%20Files/Content.Outlook/NB3FEX8C/How%20to%20Create%20an%20Alternate%20Boot%20Disk%20on%20Integrity%20Systems.dochttp://local%20settings/Temporary%20Internet%20Files/Content.Outlook/NB3FEX8C/Dynamic%20Root%20Disk%20and%20MirrorDiskUX.pdf
  • 8/7/2019 How to Create an Alternate Boot Disk on PA-RISC Systems

    2/6

    c. Check the permissions of the new directory. They should be 640.

    Correct if necessary.

    d. Make the group character device file using the minor number

    selected above:

    # mknod /dev/vgroot/group c 64 0x020000

    e. Create the volume group on the alternate disk:# vgcreate /dev/vgroot /dev/dsk/c0t5d0

    4. Confirm that /etc/lvmtab is up-to-date. You should see the following, at

    least:# strings /etc/lvmtab

    /dev/vg00

    /dev/dsk/c0t6d0

    /dev/vgroot

    /dev/dsk/c0t5d0

    5. Install boot programs on the alternate disk:# mkboot /dev/rdsk/c0t5d0

    6. Determine the hardware address of the alternate disk:# lssf /dev/dsk/c0t5d0

    sdisk card instance 0 SCSI target 5 SCSI LUN 0 section 0 at address

    8/12.5.0 /dev/dsk/c0t5d0

    ioscan fnC disk should report the same information.

    7. Use the hardware address to create an AUTOBOOT file on the alternatedisk:# mkboot a hpux (8/12.5.0;0) /stand/vmunix /dev/rdsk/c0t5d0

    8. Determine the lvol sizes in vg00. Use this information in the next step(lvcreate). For example:# vgdisplay -v vg00|egrep "LV Name|LV Size"

    LV Name /dev/vg00/lvol1

    LV Size (Mbytes) 320

    LV Name /dev/vg00/lvol2

    LV Size (Mbytes) 2048

    LV Name /dev/vg00/lvol3

    LV Size (Mbytes) 3460

  • 8/7/2019 How to Create an Alternate Boot Disk on PA-RISC Systems

    3/6

    9. Create and extend the root logical volume and the swap logical volume

    (you will need to customize the sizes): (-C = contiguous; -r n = turn

    off bad block relocation)

    (Reminder, lvol1 is usually /stand, lvol2 is usually swap/dump, lvol3

    is usually / (root))# lvcreate -L 320 -C y r n -n bootlvol /dev/vgroot

    # lvcreate -L 2048 -C y r n -n swaplvol /dev/vgroot

    # lvcreate -L 3460 -C y r n -n rootlvol /dev/vgroot

    10.Create all other root disk logical volumes as needed. For example, a

    200-Mb lvol5:# lvcreate -L 200 -n lvol4 /dev/vgroot

    11.Update the BDRA (Boot Disk Reserved Area) with the new information

    for boot, root, swap and dump logical volumes:# lvlnboot -b bootlvol /dev/vgroot # this is /stand lvol

    # lvlnboot -r rootlvol /dev/vgroot # this is root "/" lvol

    # lvlnboot -s swaplvol /dev/vgroot # this is swap lvol

    # lvlnboot -d swaplvol /dev/vgroot # this is the default dump lvol

    # lvlnboot v # verify

    12.Create filesystems as appropriate on the new logical volumes, using

    the raw lvol device. (SeeSupported File and File System Sizes for HFS

    and JFS (jan 2007).pdfif specific -o options are needed.) To see what

    vg00 lvols have filesystems and their type:

    # grep vg00 /etc/fstab

    Examples:# newfs -F hfs /dev/vgroot/rbootlvol

    # newfs -F vxfs /dev/vgroot/rrootlvol

    # newfs -F vxfs /dev/vgroot/rlvol4

    The above steps probably only need to be done once.

    From this point and below, these steps need to be

    repeated on a regular basis to keep the alternate boot

    http://local%20settings/Temporary%20Internet%20Files/Content.Outlook/NB3FEX8C/Supported%20File%20and%20File%20System%20Sizes%20for%20HFS%20and%20JFS%20(jan%202007).pdfhttp://local%20settings/Temporary%20Internet%20Files/Content.Outlook/NB3FEX8C/Supported%20File%20and%20File%20System%20Sizes%20for%20HFS%20and%20JFS%20(jan%202007).pdfhttp://local%20settings/Temporary%20Internet%20Files/Content.Outlook/NB3FEX8C/Supported%20File%20and%20File%20System%20Sizes%20for%20HFS%20and%20JFS%20(jan%202007).pdfhttp://local%20settings/Temporary%20Internet%20Files/Content.Outlook/NB3FEX8C/Supported%20File%20and%20File%20System%20Sizes%20for%20HFS%20and%20JFS%20(jan%202007).pdf
  • 8/7/2019 How to Create an Alternate Boot Disk on PA-RISC Systems

    4/6

  • 8/7/2019 How to Create an Alternate Boot Disk on PA-RISC Systems

    5/6

    17. Edit the /newroot/etc/fstab file to reflect the new bootable disks paths:# vi /newroot/etc/fstab

    Comment out the lines pertaining to vg00:# /dev/vg00/lvol1

    # /dev/vg00/your_swap_logical_volumes

    Add the new root and device swap logical volume and the other logical volumes:

    /dev/vgroot/rootlvol

    /dev/vgroot/bootlvol/dev/vgroot/lvol4

    NOTE:

    Use the same options and syntax for the entries. There is noentry for primary swap, just for device and file system swap.

    18.Prepare the new lvols to be bootable:# lvlnboot -r /dev/vgroot/rootlvol

    # lvlnboot -b /dev/vgroot/bootlvol

    # lvlnboot -s /dev/vgroot/swaplvol

    # lvlnboot -d /dev/vgroot/swaplvol

    # lvlnboot R

    # lvlnboot -v # to verify the results

    19.Reboot, interrupt autoboot if necessary and boot from 8/12.5.0.

    20.VERIFY YOUR WORK!!!Manually boot the system using each boot option.

    If you are doing the above steps to begin using the alternate disk as thenew boot disk (perhaps because the original disk is failing or too small),use the following steps to turn vgroot into vg00. Recall that LVMknows that /dev/vgroot exists on c0t5d0, and both vgroot and vg00exist.

    1. Set the primary boot entry to point to the alternate disk:# setboot p 8/12.5.0

    2. Reboot into LVM maintenance mode> BO PRI

    interact with IPL

    ISL> hpux lm

    3. vgexport vg00 and vgimport the new drive:# vgexport /dev/vg00

    # vgimport /dev/vg00 /dev/dsk/c0t5d0

  • 8/7/2019 How to Create an Alternate Boot Disk on PA-RISC Systems

    6/6

    4. Activate vg00:# vgchange a y /dev/vg00

    5. Edit /etc/fstab to reflect the new mounts:

    Un-Comment out the lines pertaining to vg00:# /dev/vg00/lvol1# /dev/vg00/your_swap_logical_volumes

    etc

    And comment out the lines pertaining to the vgroot.

    6. Using lvlnboot, update all physical volumes in the volume group sothat the logical volume becomes the root, boot, primary swap, or adump volume when the system is next booted on the volume group.

    # lvlnboot -r /dev/vg00/lvol3

    # lvlnboot -b /dev/vg00/lvol1

    # lvlnboot -s /dev/vg00/lvol2

    # lvlnboot -d /dev/vg00/lvol2

    # lvlnboot R

    # lvlnboot -v # to verify the results