DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

dktab(F)


dktab -- virtual disk configuration file

Format

vdisk_device  type  arguments
    block_device  offset  num_blocks [ argument ]
    ...

Description

The virtual disk configuration file, /etc/dktab, describes the configuration of all virtual disks in the system, and is used by dkconfig to administer virtual disks.

Fields in dktab are separated by white space. The symbol ``#'' as the first character on a line indicates a comment. Comment and blank lines are ignored.

The order of virtual disks in dktab is not significant unless nested virtual disks are defined.

All device pathnames used in dktab are block special devices.

NOTE: All offsets and sizes are specified in 512-byte physical disk block units unless specified otherwise.

Virtual disk configuration

Virtual disks require two types of configuration lines in /etc/dktab: Each virtual disk defined in dktab consists of a single virtual disk declaration line followed by several virtual disk piece definition lines. Virtual disk declaration lines begin on the first character of a line; virtual disk piece definition lines are preceded with white space (one or more tabs and/or spaces).

Virtual disk declaration lines

A virtual disk declaration line has at least two fields: the pathname of the virtual disk block device (vdisk_device) and the type of virtual disk (type). The number and meaning of additional argument fields depend on the virtual disk type.

Valid types and arguments are:


array num_pieces cluster_size
Block-interleaved array of num_pieces disk pieces using a cluster size of cluster_size (in 512-byte units).

concat num_pieces
Concatenation of num_pieces disk pieces.

config num_pieces
Configuration database of num_pieces disk pieces.

interl cluster_size interleave_gap
Interleaved disk with a cluster size of cluster_size (in 512-byte units) and an interleave gap size of interleave_gap expressed as a number of clusters.

mirror num_pieces restore_size
Mirror composed of num_pieces disk pieces with a cluster size of restore_size used during restore operations (in 512-byte units).

simple
Simple disk.

stripe num_pieces cluster_size
Stripe of num_pieces disk pieces with a cluster size of cluster_size (in 512-byte units).

Virtual disk piece definition lines

A virtual disk piece definition line describes one piece of a virtual disk and consists of the following fields:

block_device
The pathname of the block device associated with a disk piece. Must be a block device corresponding to another virtual disk (nested) or, more usually, a physical disk partition. A specified virtual disk device must exist as a previously-defined entry in dktab. It is recommended that you assign a higher number to a nested virtual disk (composed of other virtual disks as pieces) than to its pieces.

offset
The starting block of the virtual disk piece (each block is 512 bytes).

num_blocks
The length of the piece in 512-byte blocks. Only the specified number of blocks beginning at the specified offset will be used as the virtual disk piece.

argument
This field is mandatory for the configuration database virtual disk, vdisk0, and can take two values:

dktab
The database piece of vdisk0.

spool
The online reconfiguration piece of vdisk0.

See ``Use of the vdisk0 virtual disk'' for more information.

One of the following optional arguments may be specified in this field for array or mirror virtual disks:


parity
A disk piece in an array devoted to parity operations.

reads
A disk piece in a mirror dedicated to fixed reads.

spare
A disk piece used as a hot spare.

Use of the vdisk0 virtual disk

The configuration database virtual disk, vdisk0, must be present on a system that uses virtual disks. This special virtual disk consists of a ``dktab'' piece and a ``spool'' piece which have separate functions:

Examples

The following are examples of virtual disk declaration lines:
   /dev/dsk/vdisk0	config		2
   /dev/dsk/vdisk1	simple
   /dev/dsk/vdisk2	concat		3	
   /dev/dsk/vdisk3	stripe		2	4
   /dev/dsk/vdisk4	array		3	8
   /dev/dsk/vdisk5	mirror		2	64
   /dev/dsk/vdisk6	interl		4	2
The following are examples of virtual disk piece definition lines:
   /dev/dsk/2s1		35	1956072
   /dev/dsk/3s2		100	9984
   /dev/dsk/vdisk14	0	24000
The following are examples of virtual disk piece definition lines with optional arguments:
   /dev/dsk/1s1	 	100	400000	spare
   /dev/dsk/2s1		100	680000	parity
   /dev/dsk/3s2		100	280000	reads
   /dev/dsk/4s2		100	   100	dktab
   /dev/dsk/5s1		100	  3000	spool
The following are sample /etc/dktab file segments for a variety of virtual disk configurations:

Block-interleaved distributed parity virtual disk

A RAID 5 virtual disk array using 2.33GB of disk space (16KB cluster size across five hard drives) and providing 1.86GB of usable storage:
   /dev/dsk/vdisk3	array		5 	32
   	/dev/dsk/1s1		100	977000
   	/dev/dsk/2s1		100	977000
   	/dev/dsk/3s1		100	977000
   	/dev/dsk/4s1		100	977000
   	/dev/dsk/5s1		100	977000

Block-interleaved parity virtual disk

A RAID 4 virtual disk array using 2.33GB of disk space (4KB cluster size across five hard disks including one used exclusively for parity) and providing 1.86GB of usable storage:
   /dev/dsk/vdisk3	array		5	8
   	/dev/dsk/1s1		100	977000
   	/dev/dsk/2s1		100	977000
   	/dev/dsk/3s1		100	977000
   	/dev/dsk/4s1		100	977000
   	/dev/dsk/5s1		100	977000	parity

Mirrored virtual disk

A RAID 1 virtual disk using 622MB of disk space and providing 311MB of usable storage. A 16KB catch-up block size (restore cluster size) is defined:
   /dev/dsk/vdisk3	mirror		2	32
   	/dev/dsk/1s1		100	636928
   	/dev/dsk/2s1		100	636928

Concatenated virtual disk

A concatenated virtual disk composed of four hard disks using 1.92GB of disk space and providing 1.92GB of usable storage:
   /dev/dsk/vdisk4	concat	4
   	/dev/dsk/2s1	100	977363
   	/dev/dsk/3s1	100	977200
   	/dev/dsk/4s1	100	977365
   	/dev/dsk/5s1	100	977360

Striped virtual disk

A RAID 0 virtual disk on two disks using 622MB of disk space, a 4KB cluster size, and providing 622MB of usable storage.
   /dev/dsk/vdisk5	stripe		2	8
   	/dev/dsk/1s1		100	636928
   	/dev/dsk/2s1		100	636928

Interleaved virtual disk

An interleaved virtual disk providing 153MB of storage on a SCSI optical disk with its performance optimized to use a 1KB cluster size (equal to the logical block size for the disk) and an interleave block gap of 4KB (four times the cluster size):
   /dev/dsk/vdisk9	interl		2	4
   	/dev/dsk/4s1		100	313414

Nested virtual disks

A virtual disk vdisk3 formed from the concatenation of two simple virtual disks:
   /dev/dsk/vdisk1	simple
   	/dev/dsk/1s1		100	260000
   /dev/dsk/vdisk2	simple
   	/dev/dsk/2s1		100	260000
   /dev/dsk/vdisk3	concat            2
   	/dev/dsk/vdisk1		  0	260000
   	/dev/dsk/vdisk2		  0	260000
A RAID 53 virtual disk (vdisk8) formed by mirroring two three-piece RAID 5 virtual disk arrays:
   /dev/dsk/vdisk3	array             3     32
   	/dev/dsk/1s1		100	260000
   	/dev/dsk/2s1		100	260000
   	/dev/dsk/3s1		100	260000
   /dev/dsk/vdisk4	array             3     32
   	/dev/dsk/4s1		100	260000
   	/dev/dsk/5s1		100	260000
   	/dev/dsk/6s1		100	260000
   /dev/dsk/vdisk8	stripe            2     32
   	/dev/dsk/vdisk1		  0	260000
   	/dev/dsk/vdisk2		  0	260000
Note that the offset for the virtual disk pieces is 0 (zero) in both the above examples.

Warning

Only root should be allowed write permission on /etc/dktab.

Allow a large enough offset for each disk piece to avoid overwriting the reserved area (the disk blocks that a partition uses for its division and bad track tables). Use either the -R or the -RV options to divvy to discover the size of the reserved area in 1KB and 512-byte units respectively.

Files


/etc/dktab
virtual disk configuration file

See also

divvy(ADM), dkconfig(ADM), hd(HW), vdisk(HW)

``Administering virtual disks'' in the System Administration Guide


© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003