Alternate Pathing 2.0 User's Guide
  Cerca solo questo libro
Scarica il manuale in formato PDF

Managing the AP Database

3

AP maintains a database that contains information about all defined meta-disks and meta-networks, and their corresponding alternate paths and properties. Conceptually, a single AP database is maintained on a given Sun server system. However, you can and 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 300KB, 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:
  • Sun Microsystems recommends that you set up three to five database copies.
  • As configured at the factory, partition 4 of the root disk is appropriately sized for the AP database and is not allocated for any other purposes. This partition is a good choice for an AP database copy.
  • The database copies should have no I/O adapters in common with each other. Following this rule allows maximum availability in case of adapter failure.
  • If you have configured your system to make use of Dynamic Reconfiguration (DR), the database copies should be hosted by I/O adapters on different system boards so that a database copy is accessible if one of the system boards is detached.
A subset of the information in the AP database is automatically maintained on the SSP for use at boot time. This database contains alternate pathing information for your Sun server's 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" on page 5-4.

Creating a Database

To create AP database copies, use the apdb(1M) command. To create an AP database copy, use apdb -c:

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

When you create a database copy, you must specify the raw disk path (/dev/rdsk) to the slice where you wish to create the database. You must use the force option (-f) when creating the first database copy (i.e., when your Sun server currently has no AP databases).
To view information about the database copies, 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  

The above example has only one AP database copy and 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.
The AP database contains information about SCSI and network device class pathgroups. When a pathgroup is initially defined (as described in Chapter 4, "Using Meta-Disks and Disk Pathgroups" and Chapter 6, "Using Meta-Networks and Network Pathgroups"), its pathgroup definition is an uncommitted database entry. The meta-disk or meta-network associated with an uncommitted entry is not created and cannot be accessed 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) allow 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.

Deleting a Database

To delete a database copy, use apdb -d, as follows:

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

When you delete a database copy, you must specify the raw disk (/dev/rdsk) path to the slice where the database copy resides. You must use the force option (-f) to delete the second-to-last database copy and the last database copy. In the example above, the last database copy was deleted. (This must be the case since the subsequent apconfig -D command returns no results.)

Note - If you want to place an AP database copy in a partition of an alternately pathed disk, create two copies of the database using each of the physical paths utilized by the AP meta-disk to access the partition. AP behaves as if two copies of the database exist when, actually, there is only one, since the disk is accessible via two paths. The behavior does not result in database inconsistencies, however, since AP always updates and accesses database copies sequentially.