Sun Cluster 2.2 Cluster Volume Manager Guide

3.8 Mirroring the System Boot Disk

This section describes the procedure for converting an existing Sun Cluster system that has a defined rootdg and that must be converted to full encapsulation.

This procedure has two parts. The first part (Procedure A) uses a single disk slice for temporary CVM data while doing the encapsulation. The second part (Procedure B) uses an entire disk for the temporary CVM data.

3.8.1 Mirroring the System Boot Disk on an Existing Node

Use one of the following procedures on an existing Sun Cluster node to mirror the boot disk:

Both procedures use these assumptions:

  1. The boot disk has at least two free partitions.

  2. The beginning or end of the disk has two cylinders of free space available.

  3. rootdg was created from a simple partition.

  4. An extra disk or partition can be used as temporary spare space. This space should be on a disk other than the boot disk you are encapsulating.

3.8.1.1 Procedure A: Using a Disk Slice

Use this procedure to encapsulate and mirror the boot disk if only one partition is available for temporary storage. If an entire disk is available for temporary storage, see "3.8.1.2 Procedure B: Using an Entire Disk"."

Configuration

Procedure A

  1. Stop the Sun Cluster software on the current node:


    # scadmin stopnode 
    
  2. If the simple partition for rootdg is on the boot disk, find a separate partition (two cylinders in size) that is not on the boot disk. If the simple partition for rootdg is not on the boot disk, proceed directly to Step 10.

  3. Use the format command to reserve and label the new partition:


    # format c0t3d0
    

    Make c0t3d0s7 the new partition, two cylinders in size.

  4. Define the new partition to CVM:


    # vxdisk -f init c0t3d0s7 
    
  5. Add the new partition to rootdg:


    # vxdg adddisk c0t3d0s7 
    
  6. Add the new rootdg partition to the volboot file:


    # vxdctl add disk c0t3d0s7 
    
  7. Use the format command to free up the old disk partition:


    # format c0t0d0 
    

    This frees up the space for partition c0t0d0s5.

  8. Remove the original disk from rootdg:


    # vxdg rmdisk c0t0d0s5
    # vxdisk rm c0t0d0s5 
    
  9. Clean up the old partition of rootdg in the volboot file:


    # vxdctl rm disk c0t0d0s5 
    
  10. Enter vxdiskadm to encapsulate the boot disk (c0t0d0 in this example):


    # vxdiskadm -Select an operation to perform: 2 
    -Select disk devices to encapsulate:
    [,all,list,q,?] c0t0d0 
    -Continue operation? [y,n,q,?] (default: y) y 
    -Which disk group [,list,q,?] (default: rootdg) rootdg 
    -Use a default disk name for the disk? [y,n,q,?] (default: y) n 
    -Continue with operation? [y,n,q,?] (default: y) y 
    -Continue with encapsulation? [y,n,q,?] (default: y) y 
    -Enter disk name for  [,q,?] (default: disk01) disk01 
    -Encapsulate other disks? [y,n,q,?] (default: n) n 
    -Select an operation to perform: q
    

    Verify each step carefully.

  11. Reboot the system:


    # shutdown -g0 -y -i6 
    

    The system will reboot one more time to complete the process.

    Your boot disk is now encapsulated and managed by CVM.

  12. To verify the encapsulation:

    1. Invoke vxva and open up the icon of the rootdg disk group.

      You should see the encapsulated boot disk and the four volumes that have been created from it.

    2. Verify that the /etc/vfstab file now refers to device files in the /dev/vx/dsk directory rather than the /dev/dsk directory.

  13. To mirror the encapsulated disk, choose a disk (for example, c0t2d0) and a media name (for example, mirrorroot), and enter:


    # /etc/vx/bin/vxdisksetup -i c0t2d0
    # /usr/sbin/vxdg adddisk mirrorroot=c0t2d0 
    

    You should now see the new disk in the rootdg disk group of vxva.

  14. Mirror the encapsulated boot disk on mirrorroot:


    # /etc/vx/bin/vxmirror disk01 mirrorroot 
    

    The vxmirror command prints a series of commands corresponding to the mirroring of volumes in the encapsulated boot disk.

  15. After the vxmirror command is completed, verify that the process was successful by looking for the mirrored volumes in the rootdg disk group of vxva.

    It is now possible to boot from the mirror of the boot disk.

  16. Remove the two-cylinder simple disk in the rootdg disk group:


    # vxdg rmdisk c0t3d0s7
    # vxdisk rm c0t3d0s7
    # vxdctl rm disk c0t3d0s7 
    
  17. Start the Sun Cluster software:


    # scadmin startnode 
    
  18. If you wish to mirror the other system, repeat Procedure A.

  19. Un-encapsulate the boot disk.

    When you upgrade your system or the volume manager you need to un-encapsulate the boot disk first. Use the script provided under /CD_path/CVM/scripts called upgrade_start to automatically convert the file systems on volumes back to regular disk partitions. Reboot the system to complete the conversion to regular disk partitions.

3.8.1.2 Procedure B: Using an Entire Disk

This procedure contains step-by-step instructions for encapsulating and mirroring the boot disk when you are using an entire disk for temporary storage. If an entire disk is not available, see "3.8.1.1 Procedure A: Using a Disk Slice"."

Configuration

Procedure B

  1. Stop the Sun Cluster software on the current node:


    # scadmin stopnode 
    
  2. Initial the spare disk for use with CVM:


    # /etc/vx/bin/vxdisksetup -i c1t0d0 
    
  3. Add the new disk to rootdg:


    # vxdg adddisk c1t0d0 
    
  4. Use the format command to release the old disk partition, which is a part of boot disk for rootdg:


    # format c0t0d0 
    
  5. Remove the original disk from rootdg:


    # vxdg rmdisk c0t0d0s5
    # vxdisk rm c0t0d0s5 
    
  6. Clean up the old partition of rootdg in the volboot file:


    # vxdctl rm disk c0t0d0s5 
    
  7. Use the vxdiskadm command to encapsulate the boot disk (for example, c0t0d0):


    # vxdiskadm
    -Select an operation to perform: 2
    -Select disk devices to encapsulate:                                  
    [,all,list,q,?] c0t0d0
    -Continue operation? [y,n,q,?] (default: y) y
    -Which disk group [,list,q,?] (default: rootdg) rootdg
    -Use a default disk name for the disk? [y,n,q,?] (default: y) n
    -Continue with operation? [y,n,q,?] (default: y) y
    -Continue with encapsulation? [y,n,q,?] (default: y) y
    -Enter disk name for [,q,?] (default: disk01) disk01
    -Encapsulate other disks? [y,n,q,?] (default: n) n
    -Select an operation to perform: q
    
  8. Reboot the system:


    # shutdown -g0 -y -i6 
    

    The system will reboot a second time to complete the process.

    The boot disk is now encapsulated and managed by CVM.

  9. To verify the encapsulation:

    1. Invoke vxva and open up the icon of the rootdg disk group.

      You should see the encapsulated boot disk and the four volumes that have been created from it.

    2. Verify that the /etc/vfstab file now refers to device files in the /dev/vx/dsk directory rather than the /dev/dsk directory.

  10. To mirror the encapsulated disk, choose a disk (for example, c0t2d0) and a media name (for example, mirrorroot), and enter:


    # /etc/vx/bin/vxdisksetup -i c0t2d0
    # /usr/sbin/vxdg adddisk mirrorroot=c0t2d0 
    

    You should see the new disk in the rootdg disk group of vxva.

  11. Mirror the encapsulated boot disk on mirrorroot:


    # /etc/vx/bin/vxmirror disk01 mirrorroot 
    

    vxmirror displays a series of commands corresponding to the mirroring of volumes in the encapsulated boot disk.

  12. After vxmirror is completed, verify that the process was successful by looking for the mirrored volumes in the rootdg disk group of vxva.

    It is now possible to boot from the mirror of the boot disk.

  13. Remove the temporary disk from the rootdg disk group:


    # vxdg rmdisk c1t0d0
    # vxdisk rm c1t0d0 
    
  14. Start the Sun Cluster software:


    # scadmin startnode 
    
  15. If you would like to mirror the other system, repeat Procedure B.

3.8.2 Description of vxconfigd

The vxconfigd command takes requests from other utilities for volume/disk configuration changes, and communicates those changes to the kernel and modifies configuration information stored on disk. vxconfigd is also responsible for initializing CVM when the system is booted.

3.8.3 Error Handling

The vxconfigd command may exit if serious errors occur. By default, vxconfigd issues errors to the console. However, vxconfigd can be configured to log errors to a log file with various parameters for debugging. (See the man page for further information.)

This is an example which enables debugging parameters and logs messages to a file:


# vxdctl stop
# vxconfigd -x 1 -x logfile=filename -x mstimestamp > /dev/null 2>&1 &

The options are: