System Administration Guide
Chapter 8, Administering virtual disks

How configuration information is stored

How configuration information is stored

The configuration of a virtual disk system is specified in the file /etc/dktab on the root partition (see dktab(F) for further details). This file is critically important; without it, there is no way of knowing which disk pieces are allocated to which virtual disks. 

The root partition cannot be moved to a disk array, but to reduce the risk of losing the configuration file, it is possible to mirror the configuration file on a separate configuration database disk piece. (Additional space on the disk is given over to disk pieces that can be used by the system for other purposes, such as filesystem migration.)

The configuration database disk is similar to a concatenated virtual disk. The pieces in the virtual disk should be assigned as dktab or spool. Online reconfiguration is supported for the configuration database; pieces can be removed, added, or redefined. Figure 8-7, ``Example configuration database'' shows a configuration database with 1 dktab piece and 2 spool pieces. The database virtual disk type is reserved for virtual disk vdisk0.

NOTE: root and swap divisions can only be configured as mirror virtual disks.

Figure 8-7 Example configuration database

The dktab piece on vdisk0 is a backup copy of the /etc/dktab file. It contains the current configuration of all the virtual disks on the system. Whenever the virtual disks are reconfigured, the backup copy of /etc/dktab is updated. This provides a backup of the configuration information for the system. If the /etc/dktab file is corrupted, it will automatically be restored from the configuration backup when the system reboots.

The configuration information stored in the database can also be manually retrieved at any time by selecting Examine Contents from the Database menu in the Virtual Disk Manager. The most recent configuration information which was saved will be displayed in the same format as /etc/dktab.

To stop the system from using the configuration information in the dktab piece on system reboot, use dkconfig -U. See the dkconfig(ADM) manual page for more information.

The spool piece(s) permit fail-safe online reconfiguration. Whenever you reconfigure a virtual disk dynamically, a spool piece from vdisk0 (if available) is used to provide space for the data. Having the spool piece available for online reconfiguration provides a mechanism to restart the reconfiguration in the event of an interruption, such as a system shutdown or panic.

When a fail-safe reconfiguration is interrupted, the next attempt to configure that virtual disk (done automatically at boot time) will restart the reconfiguration process in a fail-safe mode, from the point where it was interrupted. Ensure that at least as many spool pieces exist as the maximum number of simultaneous reconfigurations that might occur during normal operation (for example, if the system recovers from a panic and attempts to reconfigure all its virtual disks simultaneously). The spool pieces should also be at least three times the largest stripe width.

This is an example vdisk0 definition with 3 spool pieces and 1 dktab piece:

   /dev/dsk/vdisk0		config		4
   	/dev/dsk/1s1	2000	2100	dktab
   	/dev/dsk/3s1	2000	3000	spool
   	/dev/dsk/4s3	2000	3000	spool
   	/dev/dsk/4s3	3000	4000	spool
Be aware that spool pieces can be defined on the same physical disk partition and can be different lengths if space is available. The recommended length for the dktab piece is a minimum of 50 sectors, and 75 sectors for the spool pieces.

If there are no spool pieces defined in vdisk0, the reconfiguration operation will still be executed, but cannot be restarted if interrupted.

When using spool pieces to provide automatic recovery, reconfiguration performance will be slower.