This chapter describes how to create and manage the AP database which maintains the state of the AP configuration.
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:
You should set up three to five database copies.
As configured at the factory, partition four 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, assuming you are not using it for other purposes.
The database copies should have no I/O controllers in common with each other. Following this rule allows maximum availability in case of controller failure.
If you have configured your system to make use of Dynamic Reconfiguration (DR), the database copies should be hosted by I/O controllers on different system boards so that a database copy is accessible if one of the system boards is detached.
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 metadisk 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. This behavior does not result in performance problems since the AP database is not accessed frequently.
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.
The following AP command examples assume that your command search path includes the directory where the commands are installed. See "Using Single-User Mode".
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.
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.
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.
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.
# 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.
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.
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.
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.
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.
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.