Previous  |  Next  >  
Product: Volume Manager Guides   
Manual: Volume Manager 4.1 Administrator's Guide   

Rootability

Rootability indicates that the volumes containing the root file system and the system swap area are under VxVM control. Without rootability, VxVM is usually started after the operating system kernel has passed control to the initial user mode process at boot time. However, if the volume containing the root file system is under VxVM control, the kernel starts portions of VxVM before starting the first user mode process.

Under HP-UX, a bootable root disk contains a Logical Interchange Format (LIF) area. The LIF LABEL record in the LIF area contains information about the starting block number, and the length of the volumes that contain the stand and root file systems and the system swap area. When a VxVM root disk is made bootable, the LIF LABEL record is initialized with volume extent information for the stand, root, swap, and dump (if present) volumes.

See Setting up a VxVM Root Disk and Mirror for details of how to configure a bootable VxVM root disk from an existing LVM root disk.


Note   Note    From the AR0902 release of HP-UX 11i onward, you can choose to configure either a VxVM root disk or an LVM root disk at install time. See the HP-UX Installation and Configuration Guide for more information.

See the chapter "Recovery from Boot Disk Failure" in the VERITAS Volume Manager Troubleshooting Guide, for information on how to replace a failed boot disk.

VxVM Root Disk Volume Restrictions

Volumes on a bootable VxVM root disk have the following configuration restrictions:

  • All volumes on the root disk must be in the disk group that you choose to be the bootdg disk group.
  • The names of the volumes with entries in the LIF LABEL record must be standvol, rootvol, swapvol, and dumpvol (if present). The names of the volumes for other file systems on the root disk are generated by appending vol to the name of their mount point under /.
  • Any volume with an entry in the LIF LABEL record must be contiguous. It can have only one subdisk, and it cannot span to another disk.
  • The rootvol and swapvol volumes must have the special volume usage types root and swap respectively.
  • Only the disk access types auto with format hpdisk, and simple are suitable for use as VxVM root disks, root disk mirrors, or as hot-relocation spares for such disks. An auto-configured cdsdisk format disk, which supports the Cross-platform Data Sharing (CDS) feature, cannot be used. The vxcp_lvmroot and vxrootmir commands automatically configure a suitable disk type on the physical disks that you specify are to be used as VxVM root disks and mirrors.
  • The volumes on the root disk cannot use dirty region logging (DRL).

Root Disk Mirrors

All the volumes on a VxVM root disk may be mirrored. The simplest way to achieve this is to mirror the VxVM root disk onto an identically sized or larger physical disk. If a mirror of the root disk must also be bootable, the restrictions listed in Booting Root Volumes also apply to the mirror disk.


Note   Note    If you mirror only selected volumes on the root disk and use spanning or striping to enhance performance, these mirrors are not bootable.

See Setting up a VxVM Root Disk and Mirror for details of how to create a mirror of a VxVM root disk.

Booting Root Volumes


Note   Note    At boot time, the system firmware provides you with a short time period during which you can manually override the automatic boot process and select an alternate boot device. For information on how to boot your system from a device other than the primary or alternate boot devices, and how to change the primary and alternate boot devices, see the HP-UX documentation and the boot(1M), pdc(1M) and isl(1M) manual pages.

Before the kernel mounts the root file system, it determines if the boot disk is a rootable VxVM disk. If it is such a disk, the kernel passes control to its VxVM rootability code. This code extracts the starting block number and length of the root and swap volumes from the LIF LABEL record, builds temporary volume and disk configuration objects for these volumes, and then loads this configuration into the VxVM kernel driver. At this point, I/O can take place for these temporary root and swap volumes by referencing the device number set up by the rootability code.

When the kernel has passed control to the initial user procedure, the VxVM configuration daemon (vxconfigd) is started. vxconfigd reads the configuration of the volumes in the bootdg disk group and loads them into the kernel. The temporary root and swap volumes are then discarded. Further I/O for these volumes is performed using the VxVM configuration objects that were loaded into the kernel.

Setting up a VxVM Root Disk and Mirror


Note   Note    These procedures should be carried out at init level 1.

To set up a VxVM root disk and a bootable mirror of this disk, use the vxcp_lvmroot utility. This command initializes a specified physical disk as a VxVM root disk named rootdisk## (where ## is the first number starting at 01 that creates a unique disk name), copies the contents of the volumes on the LVM root disk to the new VxVM root disk, optionally creates a mirror of the VxVM root disk on another specified physical disk, and make the VxVM root disk and its mirror (if any) bootable by HP-UX.

The following example shows how to set up a VxVM root disk on the physical disk c0t4d0:


/etc/vx/bin/vxcp_lvmroot -b c0t4d0
Note   Note    The -b option to vxcp_lvmroot uses the setboot command to define c0t4d0 as the primary boot device. If this option is not specified, the primary boot device is not changed.

If the destination VxVM root disk is not big enough to accommodate the contents of the LVM root disk, you can use the -R option to specify a percentage by which to reduce the size of the file systems on the target disk. (This takes advantage of the fact that most of these file systems are usually nowhere near 100% full.) For example, to specify a size reduction of 30%, the following command would be used:


/etc/vx/bin/vxcp_lvmroot -R 30 -v -b c0t4d0

The verbose option, -v, is specified to give an indication of the progress of the operation.


Caution  Caution    Only create a VxVM root disk if you also intend to mirror it. There is no benefit in having a non-mirrored VxVM root disk for its own sake.

The next example uses the same command and additionally specifies the -m option to set up a root mirror on disk c1t1d0:


/etc/vx/bin/vxcp_lvmroot -m c1t1d0 -R 30 -v -b c0t4d0

In this example, the -b option to vxcp_lvmroot sets c0t4d0 as the primary boot device and c1t1d0 as the alternate boot device.

This command is equivalent to using vxcp_lvmroot to create the VxVM-rootable disk, and then using the vxrootmir command to create the mirror:


/etc/vx/bin/vxcp_lvmroot -R 30 -v -b c0t4d0
/etc/vx/bin/vxrootmir -v -b c1t1d0

The disk name assigned to the VxVM root disk mirror also uses the format rootdisk## with ## set to the next available number.


Note   Note    The target disk for a mirror that is added using the vxrootmir command must be large enough to accommodate the volumes from the VxVM root disk.

Once you have successfully rebooted the system from a VxVM root disk to init level 1, you can use the vxdestroy_lvmroot command to completely remove the original LVM root disk (and its associated LVM volume group), and re-use this disk as a mirror of the VxVM root disk, as shown in this example:


/etc/vx/bin/vxdestroy_lvmroot -v c0t0d0
/etc/vx/bin/vxrootmir -v -b c0t0d0
Note   Note    You may want to keep the LVM root disk in case you ever need a boot disk that does not depend on VxVM being present on the system. However, this may require that you update the contents of the LVM root disk in parallel with changes that you make to the VxVM root disk. See Creating an LVM Root Disk from a VxVM Root Disk for a description of how to create a bootable LVM root disk from the VxVM root disk.

For more information, see the vxcp_lvmroot(1M), vxrootmir(1M), vxdestroy_lvmroot(1M) and vxres_lvmroot (1M) manual pages.

Creating an LVM Root Disk from a VxVM Root Disk


Note   Note    These procedures should be carried out at init level 1.

In some circumstances, it may be necessary to boot the system from an LVM root disk. If an LVM root disk is no longer available or an existing LVM root disk is out-of-date, you can use the vxres_lvmroot command to create an LVM root disk on a spare physical disk that is not currently under LVM or VxVM control. The contents of the volumes on the existing VxVM root disk are copied to the new LVM root disk, and the LVM disk is then made bootable. This operation does not remove the VxVM root disk or any mirrors of this disk, nor does it affect their bootability.


Note   Note    The target disk must be large enough to accommodate the volumes from the VxVM root disk.

This example shows how to create an LVM root disk on physical disk c0t1d0 after removing the existing LVM root disk configuration from that disk.


/etc/vx/bin/vxdestroy_lvmroot -v c0t1d0
/etc/vx/bin/vxres_lvmroot -v -b c0t1d0

The -b option to vxres_lvmroot sets c0t1d0 as the primary boot device.

As these operations can take some time, the verbose option, -v, is specified to indicate how far the operation has progressed.

For more information, see the vxres_lvmroot (1M) manual page.

Adding Swap Disks to a VxVM Rootable System

On occasion, you may need to increase the amount of swap space for an HP-UX system. If your system has a VxVM root disk, use the procedure described below.

  1. Create a new volume that is to be used for the swap area. The following example shows how to set up a non-mirrored 1GB simple volume:
    vxassist -g bootdg make swapvol2 1g
  2. Add the new volume as a swap device to the /etc/fstab file as shown in this sample entry:
    /dev/vx/dsk/bootdg/swapvol2                   /   swap    pri=1     0   0
  3. Use the System Administration Manager (SAM) to increase the value of the maxswapchunks tunable as required by the swapon command. For example, if you double the amount of swap space, double the value of maxswapchunks.
  4. Build a new kernel and reboot the system:
    mk_kernel -v -o /stand/vmunix
    kmupdate
    reboot -r
 ^ Return to Top Previous  |  Next  >  
Product: Volume Manager Guides  
Manual: Volume Manager 4.1 Administrator's Guide  
VERITAS Software Corporation
www.veritas.com