Solstice DiskSuite 4.0 Administration Guide
  Rechercher uniquement dans ce livre
Télécharger cet ouvrage au format PDF

Solstice DiskSuite Files

A

Introduction

There are four system files associated with DiskSuite. These files are used by the various programs. This appendix gives a description of each file, offers instructions for creating these files, and provides some basic examples.
Three system files associated with DiskSuite are located in /etc/opt/SUNWmd. These include:
  • mddb.cf
  • md.tab
  • md.cf
The fourth system file associated with DiskSuite is located in /kernel/drv:
  • md.conf

The mddb.cf File

The mddb.cf file keeps track of metadevice state database replica locations. Each metadevice state database has a unique entry in this file. This file is automatically generated. No action on the part of the user is required.

Imported image(39x43)

Warning - The mddb.cf file should never be edited or removed.
When the layout of the state database locations change, two actions occur:
  • An entry is made in the mddb.cf file that tells the locations of all the state databases.
  • The identical information is edited into the /etc/system file.
In the following example, there are two state database replicas located on each of the devices entered in the mddb.cf file. On /dev/dsk/c0t0d0s0, state database replicas start on block 16 and on block 1050. The default size for state database is 1034 blocks.
An example of a mddb.cf file follows:

  #metadevice database location file do not hand edit  
  #driver minor_t daddr_t checksum  
   sd     27      16      -216  
   sd     27      1050    -1250  
   sd     83      16      -272  
   sd     83      1050    -1306  
   sd     19      16      -208  
   sd     19      1050    -1242  

The driver field indicates the device driver for the disk. The minor_t field represents the device and the partition on which the state database replica resides. The daddr_t field is the first block used by the state database replica. The checksum field is used to insure the other fields are valid.

The md.tab File

The md.tab file is the input file used by metainit, metadb, and metahs. Each metadevice and each hot spare pool may have unique entries in this file.
The standard metadevice entry name begins with d and is followed by a number. By default, there are 128 unique metadevices in the range 0 to 127.
A metadevice may be a concatenation or a stripe of component partitions.
Metamirrors can also be defined in the md.tab file. A metamirror is a special type of metadevice that is made up of one or more other metadevices. Each metadevice within a metamirror is a called a submirror. Metamirrors have names of the same form as other metadevices.
Hot spare pools may also be defined in the md.tab file. Hot spares can be added as part of a hot spare pool. If a component is designated as a hot spare it can not be used in a submirror or another metadevice.
Once metadevices are specified in the md.tab file, they can be activated using the metainit command.
The md.tab file might not contain an entry for all initialized metadevices, since metadevices can be initialized using metainit command line options.
An example md.tab file is shown below. The example shows numerous metadevices, metamirrors, hot spares, and hot spare pools.
As shown in the example, the use of tabs, spaces, comments (using the pound sign character) and continuation of lines (using the backslash character) are accepted.

  # DiskSuite configuration file  
  
  # mirror of root  
  d1 -m d5 2  
  d5 1 1 /dev/dsk/c0t3d0s0  
  d6 1 1 /dev/dsk/c1t3d0s0  
  
  # mirror of swap  
  d0 -m d7  
  d7 1 1 /dev/dsk/c0t3d0s1  
  d8 1 1 /dev/dsk/c1t3d0s1  
  
  # mirror of /usr  
  # geometric reads are selected  
  d9 -m d11 -g  
  d11 1 1 /dev/dsk/c0t3d0s6 -h hsp001  
  d12 1 1 /dev/dsk/c1t3d0s6 -h hsp002  
  
  # define hot spare pools  
  hsp001 /dev/dsk/c1t1d0s2  
  hsp002 /dev/dsk/c0t1d0s2  

For additional information on setting up a md.tab file, refer to the Chapter 4, "Concatenating and Striping,'' Chapter 5, "Mirroring,'' Chapter 6, "UFS Logging,'' Chapter 7, "Hot Spares," and the md.tab(4) manual page.

The md.cf File

Imported image(39x48)

The md.cf file is automatically updated whenever the configuration is changed by the user. This is basically a backup file intended for disaster recovery only.

Warning - The md.cf file should never be manually edited.

The output from this file is similar to that displayed when you run metastat -p.

The md.conf File

The md.conf file is used by the metadisk driver when it is initially loaded. The only modifiable field in this file is "nmd," which represents the number of metadevices supported by the driver. An example of the default entry follows:

  name="md" parent="pseudo" nmd=128 md_nsets=4;  

If you modify the nmd field, you must perform a reconfiguration boot (boot -r) to build the metadevice names.

Imported image(39x49)

Warning - If you lower this number, any metadevice existing between the old number and the new number may not be persistent.
The default nmd value is 128. Other values are supported up to 1024.
If you create a large number of metadevices, the state database replicas may eventually be too small. If this happens, try adding larger replicas (with the -l option and metadb command) and then removing the smaller replicas. For example, if you create 1024 metadevices, database replicas should be increased with to 2500 sectors.

Note - When you add larger numbers of metadevices, you may begin to see some performance degradation while administering metadevices.

If you are increasing the number of metadevices to gain a larger namespace for partitioning the types of devices within certain numeric ranges, but you are creating fewer than 128 metadevices, you should not see any performance degradation. In this case, you should not have to add larger replicas.