MD.TAB(4)
NAME
md.tab, md.cf − metadisk utility files
SYNOPSIS
/etc/opt/SUNWmd/md.tab /etc/opt/SUNWmd/md.cf
AVAILABILITY
These files are part of the Solstice DiskSuite software package (SUNWmd).
DESCRIPTION
/etc/opt/SUNWmd/md.tab is a workspace file used by metainit(1M) and metadb(1M). Each metadevice may have a unique entry in the /etc/opt/SUNWmd/md.tab file. An entry can be a metamirror, a metatrans, a RAID device, or a concat/stripe (commonly referred to as a metadevice). /etc/opt/SUNWmd/md.tab does not necessarily represent the current configuration of metadevices on the system at any given time.
Tabs, spaces, comments (using a pound sign, #), and continuation of lines (using a backslash-newline), are allowed.
Metadevices specified in /etc/opt/SUNWmd/md.tab are activated or set up by metainit(1M).
Stripes or concatenations are defined as:
metadevice stripes width component ... [ -i size ] \
[ width component ... [ -i size ] ] ... [ -h hspnnn ]
where stripes is the number of stripes. A stripe is made up of one or more physical components that are striped. Multiple stripes are concatenated. width is the number of devices that make up a stripe. When the width is greater than 1, the devices are striped. component is the component (e.g., /dev/dsk/c0t0d0s0). The -i specifies the interlace size. The interlace size is a number (e.g., 8, 16, 32, etc.) followed by either “k” for kilobytes, “m” for megabytes, or “b” for 512 byte blocks. The units can be either uppercase or lowercase. The specified interlace size can not be less than 16 blocks, or greater than 100 megabytes. The -h specifies the hot spare pool to be associated with the metadevice.
Metamirrors are represented in the /etc/opt/SUNWmd/md.tab file as:
metadevice -m submirrors ... options
which defines a metamirror that consists of one or more submirrors. The size of the metamirror is the size of the smallest of the submirrors. The -m specifies the configuration is a metamirror. Each submirror is defined separately in /etc/opt/SUNWmd/md.tab, as a metadevice. options are documented under the metamirror options section. The maximum number of submirrors supported is three. Two- or three-way mirrors should be created with the metainit command only when there is no data on any of the submirrors. When data exists, use metainit to create a one-way mirror and then use the metattach(1M) command to attach the other submirrors.
Metatrans devices are represented in the /etc/opt/SUNWmd/md.tab file as:
metadevice -t master_device [logging_device]
which defines a metatrans device that consists of a master device and a logging device or just a master device. If logging_device is not specified, no logging will take place until a logging device is provided using metattach(1M). The master device and logging device can be components or metadevices, including metamirrors but not metatrans devices. The master device should be a UFS file system. The size of the metatrans device is the size of the master device. The -t specifies the configuration is a metatrans device.
The /etc/opt/SUNWmd/md.tab file can also contain user defined hot spare pools. The maximum number of hot spare pools that can be defined is 1,000, numbered 000 through 999. Hot spare pools can be shared with multiple metadevices. Hot spare pools are represented as follows:
hot_spare_pool [ component ... ]
Where hot_spare_pool is a number that is prefixed with hsp (e.g., hsp001, hsp015) and component is a physical component (e.g., /dev/dsk/c0t1d0s2).
The /etc/opt/SUNWmd/md.tab file also contains entries for replicas of the state database. This database contains information about the current metadevice configuration and status on the system. Configuration changes of all metadevice commands are stored in the state database. This includes the configuration of trans, mirrors, submirrors, concatenations, stripes, and hot spares. The state database also keeps track of error conditions that have occurred. Replicas are represented as follows:
mddbnumber options [ component ... ]
Where mddbnumber is the mddb characters followed by a two digit number that identifies the state database. component is a physical component. For example:
mddb05 /dev/dsk/c0t1d0s2
RAID metadevices are represented in the /etc/opt/SUNWmd/mdtab file as:
metadevice −r component1 component2 component3 ... options
which creates a metadevice of at least three components. Three components are necessary to allow striping of the parity segments across the components. The −r specifies the configuration is a RAID metadevice.
OPTIONS
Four sets of options can be used in the /etc/opt/SUNWmd/md.tab file. The first applies specifically to metamirrors, the second is only applicable to other metadevices, the third applies to RAID devices only, and the fourth applies to database replicas.
Metamirror Options
The following flags control the mode of operation for disk mirroring:
−S Makes all writes occur serially. If −S is not specified, writes are done in parallel.
−g Enables the geometric read option. This option allows for faster performance on sequential reads. If neither the −g nor −r options are specified, reads are made by in a round robin method through the submirrors. This allows load balancing of the disks.
−r Read only from the first submirror. This flag can not be used with the −g flag. When neither the −r or −g flags are specified, the metamirror will alternate reads among the submirrors.
pass_number
A number in the range 0-to-9 that specifies the order in which a mirror is resynced during reboot. Smaller pass numbers are resynced first. Equal pass numbers are run concurrently. When 0 is entered, the mirror resync is skipped (this should only be used for swap). The default is 1.
Metadevice and RAID Options
The following flags control the mode of operation for metadevices (concatenations, stripes, and RAID). Note that they cannot be used on the line in the /etc/opt/SUNWmd/md.tab file that defines a metamirror:
−h hot_spare_pool
Specifies the hot spare pool to be used. Hot spare pools must be of the form hspnnn, where nnn is a number in the range 000-999.
−i size
Specifies the interlace value for stripes (or segment size for RAID). Where size is a value specified in either kilobytes, megabytes, or blocks. The interlace size number is followed by either “k” for kilobytes, “m” for megabytes, or “b” for 512 byte blocks. The characters can be either uppercase or lowercase. The interlace size specified can not be less than 16 blocks, or greater than 100 megabytes. If size is not specified, the size defaults to the cylinder size of the first disk in the stripe. When an interlace size change is made on a stripe, it will be carried forward on all stripes that follow.
RAID-only Options
The following flags control the mode of operation for RAID devices:
−k Informs the driver that it is not to initialize (zero the disk blocks) due to existing data.
−o Used in conjunction with the −k option to define the number of original components in the event that the originally defined metadevice was grown. This is necessary since the parity segments are not striped across concatenated devices.
WARNING
Use extreme caution when using the −k and −o options. When these options are used, the disk blocks are set to the OK state. If any errors exist on disk blocks within the metadevice, DiskSuite may begin fabricating data. Instead of using these options, you may want to initialize the device and restore data from tape.
Database Options
The following flags control the creation of state database replicas:
−c number
Specifies the number of state database replicas to be placed on each component.
−l length
Specifies the size of each replica. The default length is 1034 blocks, which should be appropriate for most configurations.
EXAMPLES
Examples are given below that show concatenation, striping, and mirroring. All drives in the following examples have the same size of 2006130 sectors.
Concatenation
This example shows a metadevice, /dev/md/dsk/d7, consisting of a concatenation of four disks.
#
# (concatenation of four disks)
#
d7 4 1 /dev/dsk/c0t0d0s0 1 /dev/dsk/c0t1d0s0
1 /dev/dsk/c0t2d0s0 1 /dev/dsk/c0t3d0s0
The first disk sector in all of the above devices contains a disk label. In order to preserve the labels on devices /dev/dsk/c0t1d0s0, /dev/dsk/c0t2d0s0, and /dev/dsk/c0t3d0s0, the metadisk driver must skip at least the first sector of those disks when mapping accesses across the concatenation boundaries. Since skipping only the first sector would create an irregular disk geometry, the entire first cylinder of these disks will be skipped. This will allow higher level file system software to optimize block allocations correctly.
Stripe
This example shows a metadevice, /dev/md/dsk/d75, consisting of a concatenation of two stripes of three disks.
#
# (concatenation of two stripes, each consisting of three disks)
#
d75 2 3 /dev/dsk/c0t1d0s2 /dev/dsk/c0t2d0s2 /dev/dsk/c0t3d0s2 -i 16k \
3 /dev/dsk/c1t1d0s2 /dev/dsk/c1t2d0s2 /dev/dsk/c1t3d0s2 -i 32k
The above example shows a concatenation of two stripes of three disks. On the first line, the -i followed by 16k specifies that the stripes interlace size is 16 Kbytes. The second set specifies the stripe interlace size will be 32 Kbytes. If the second set did not specify 32 Kbytes, the set would use the same interlace size as the first set, 16 Kbytes. The blocks of each set of three disks are interlaced across three disks. The default interlaced is the cylinder size of the first disk in the stripe.
Mirroring
This example shows a three-way mirror, /dev/md/dsk/d50, consisting of three submirrors.
#
# (mirror)
#
d50 -m d51
d51 1 1 /dev/dsk/c0t1d0s2
d52 1 1 /dev/dsk/c0t2d0s2
d53 1 1 /dev/dsk/c0t3d0s2
In the above example, a one-way mirror is first defined using the -m option. The submirrors are attached later using the metattach(1M) command and are made up of one partition. However, any combination of stripes and concatenation can be used. The default read and write options in this example are a round-robin read algorithm and parallel writes to all submirrors. The order in which mirrors appear in the /etc/opt/SUNWmd/md.tab file is unimportant.
Logging (metatrans)
This example shows a metatrans with metadevices for the master and logging devices.
#
# (trans)
#
d1 -t d10 d20
d10 -m d11
d11 1 1 /dev/dsk/c0t1d0s2
d12 1 1 /dev/dsk/c0t2d0s2
d20 -m d21
d21 1 1 /dev/dsk/c1t1d0s2
d22 1 1 /dev/dsk/c1t2d0s2
In the above example, the two metamirrors, d10 and d20, are defined using the -m option. d10 is defined as the master device and d20 is defined as the logging device for the metatrans, d1, by using the -t option. The order in which mirrors or trans appear in the /etc/opt/SUNWmd/md.tab file is unimportant. The submirrors d12 and d22 are attached later (using the metattach(1M) command) to the d10 and d20 mirrors.
Hot Spare
This example shows a three-way mirror, /dev/md/dsk/d10, consisting of three submirrors and three hot spare pools.
#
# (mirror and hot spares)
#
d10 -m d20
d20 1 1 /dev/dsk/c1t0d0s2 -h hsp001
d30 1 1 /dev/dsk/c2t0d0s2 -h hsp002
d40 1 1 /dev/dsk/c3t0d0s2 -h hsp003
hsp001 /dev/dsk/c2t2d0s2 /dev/dsk/c3t2d0s2 /dev/dsk/c1t2d0s2
hsp002 /dev/dsk/c3t2d0s2 /dev/dsk/c1t2d0s2 /dev/dsk/c2t2d0s2
hsp003 /dev/dsk/c1t2d0s2 /dev/dsk/c2t2d0s2 /dev/dsk/c3t2d0s2
In the above example, a one-way mirror is first defined using the -m option. The submirrors are attached later using the metattach(1M) command. The hot spare pools to be used are tied to the submirrors with the -h option. In this example, there are three disks used as hot spares, defined in three separate hot spare pools. The hot spare pools are given the names hsp001, hsp002, and hsp003. Setting up three hot spare pools rather than assigning just one hot spare with each component helps to maximize the use of hardware. This configuration enables the user to specify selecting the most desirable hot spare first and improves the availability by having more hot spares available. At the end of the entry, the hot spares to be used are defined.
RAID
This example shows a RAID device consisting of three components:
#
# (RAID devices)
#
d80 -r /dev/dsk/c0t0d0s1 /dev/dsk/c1t0d0s1 /dev/dsk/c2t0d0s1 -i 20k
In the above example, a RAID metadevice is defined using the −r option with a segment size of 20 kilobytes. The data and parity segments will be striped across the components, c0t0d0s1, c1t0d0s1, and c2t0d0s1.
State Database Replicas
This example shows how to set up an initial state database and three replicas on a server that has three disks.
#
# (state database and replicas)
#
mddb01 -c3 /dev/dsk/c0t1d0s0 /dev/dsk/c0t0d0s0 /dev/dsk/c0t2d0s0
In the above example, three state database replicas are stored on each of the three components.
Once the above entry is made in the /etc/opt/SUNWmd/md.tab file, the metadb(1M) command must be run with both the −a and −f options. For example, entering the following:
# metadb -a -f mddb01
creates one state database replica on each of the three disks.
FILES
/etc/opt/SUNWmd/md.tab
SEE ALSO
metaclear(1M), metadb(1M), metadetach(1M), metahs(1M), metainit(1M), metaoffline(1M), metaonline(1M), metaparam(1M), metareplace(1M), metaroot(1M), metastat(1M), metasync(1M), metattach(1M), mddb.cf(4)
Solstice DiskSuite Administration Guide
LIMITATIONS
Recursive mirroring is not allowed; that is, a metamirror cannot appear in the definition of another metamirror.
Recursive logging is not allowed; that is, a metatrans cannot appear in the definition of another metadevice.
Stripes and RAID devices must be comprised of components only.
Mirroring of RAID devices is not allowed.
SunOS DiskSuite_4.0 — Last change: 03 February 1995