Sun Enterprise Server Alternate Pathing 2.0.1 User's Guide

Chapter 2 Alternate Pathing Database

This chapter describes how to create and manage the AP database which maintains the state of the AP configuration.

Managing Copies of the Database

AP maintains a database that contains information about all defined metadisks and metanetworks, and their corresponding alternate paths and properties. One set of data is maintained for each domain on the Sun Enterprise 10000 server. On other Sun Enterprise servers, one set of data is maintained for the entire machine. However, you should set up multiple copies of the database. In this way, if a given database copy is not accessible or becomes corrupted, AP can automatically begin to use a current, non-corrupted database copy.

You must dedicate an entire disk partition, one that has at least 300 Kbytes, to each database copy. You can use larger partitions, but doing so wastes disk space. Keep the following information in mind when selecting disk partitions for the AP database:

On the Sun Enterprise 10000 server, a subset of the information in the AP database is automatically maintained on the SSP for use at boot time. This database contains AP information for the boot disk.


Note -

The following AP command examples assume that your command search path includes the directory where the commands are installed. See "Using Single-User Mode".


To Create a Copy of the AP Database
  1. Use apdb(1M) as follows:


    # apdb -c /dev/rdsk/c0t1d0s4 -f

    The -c option specifies the raw disk slice (under /dev/rdsk) where you want to create the database copy. You must dedicate an entire disk partition to each database copy. The disk partition must have at least 300 Kbytes.

    The -f (force) option is only necessary to create the first AP database copy.


    Caution - Caution -

    Do not create an AP database using a metadisk path (rather than a physical path to the disk slice). If you use a metadisk path, the apdb(1M) command will succeed, but you may experience unpredictable behavior at a later point in time. If you want to place an AP database in a partition of an alternately pathed disk, create two copies of the database using each of the physical paths utilized by the AP metadisk to access the partition.


To Delete a Copy of the AP Database
  1. Use apdb(1M) as follows:


    # apdb -d /dev/rdsk/c0t1d0s4 -f
    # apconfig -D
    #

    The -d option specifies the raw disk slice (under /dev/rdsk) where the copy of the database that you want to delete is located.

    The -f (force) option is only necessary to delete the second-to-last copy and the last copy of the database.

    In this example, apconfig -D is used after the deletion operation to view information about the existing AP database copies. Since no information is returned, the apdb(1M) command must have deleted the last database copy.

Viewing Database Information

You can easily view information in the database, including information about the database copies, the disk entries within the database, and the network entries within the database.

To View Information About Database Copies
  1. Use apconfig -D as follows:


    # apconfig -D
    
    path: /dev/rdsk/c0t1d0s4
    major: 32
    minor: 12
    timestamp: Thu Jul 27 16:24:27 1995
    checksum: 687681819
    corrupt: No
    inaccessible: No

In this example, there is only one AP database. The command shows the path to this database, along with its major number, minor number, timestamp, and checksum. The corrupt field indicates whether the database is corrupt. (If corrupt is set to Yes, the data did not validate properly against the checksum.) The inaccessible field indicates whether the device that holds the database can be accessed.

Viewing Pathgroup Information

The AP database contains information about disk and network pathgroups. When a pathgroup is initially defined (as described in Chapter 3, Using Metadisks and Disk Pathgroups and Chapter 5, Using Metanetworks and Network Pathgroups), its pathgroup definition is an uncommitted database entry. The metadisk or metanetwork associated with an uncommitted entry is not available until the pathgroup definition is committed. Conversely, when a pathgroup definition is deleted, the deletion must be committed before it takes effect. The two states (uncommitted and committed) enable you to review the effects of an operation before allowing the operation to proceed. To commit the uncommitted database entries, use apdb -C. Note that uncommitted entries remain in the database indefinitely, until you either commit them or remove them.

To View Uncommitted Disk Entries
  1. Use apconfig(1M) with the -S and -u options as follows, where S stands for SCSI and u stands for uncommitted:


    # apconfig -S -u
    
    c1      sf0  P A
    c2      sf1  
            metadiskname(s):
                    mc1t5d0  U 
                    mc1t4d0  U 
                    mc1t3d0  U 
                    mc1t2d0  U 
                    mc1t1d0  U 
                    mc1t0d0  U 

    For more information see Chapter 3, Using Metadisks and Disk Pathgroups.

To View Committed Disk Entries
  1. Use apconfig(1M) with the -S option, as follows, where S stands for SCSI:


    # apconfig -S
    
    c1      pln0  P A
    c2      pln1  
            metadiskname(s):
                    mc1t5d0  R 
                    mc1t4d0   
                    mc1t3d0   
                    mc1t2d0   
                    mc1t1d0   
                    mc1t0d0   

For more information see Chapter 3, Using Metadisks and Disk Pathgroups.

To View Uncommitted Network Entries
  1. Use apconfig(1M) with the -N and -u options, as follows, where N stands for network and u stands for uncommitted:


    # apconfig -N -u
     
    metanetwork:    mle0  U
    physical devices:
                    le2 
                    le0  P A

For more information see Chapter 5, Using Metanetworks and Network Pathgroups.

To View Committed Network Entries
  1. Use apconfig(1M) with the -N option, as follows:


    # apconfig -N
     
    metanetwork:    mle3
    physical devices:
                    le4 
                    le3  P A

For more information see Chapter 5, Using Metanetworks and Network Pathgroups.