Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ md.conf(5) — Solstice DiskSuite 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

md(4s)

mddb.conf(5)

metatab(5)

metaclear(8)

metad(8)

metadb(8)

metahs(8)

metainit(8)

metaoffline(8)

metaparam(8)

metareplace(8)

metastat(8)

metasync(8)

metattach(8)

MD.CONF(5)  —  FILE FORMATS

NAME

md.conf − metadisk configuration file

SYNOPSIS

/etc/md.conf

AVAILABILITY

This file is part of the Sun Online: DiskSuite software package. 

DESCRIPTION

/etc/md.conf is a configuration file used by metainit(8) and metadb(8).  Each metadisk metadevice has a unique entry in the /etc/md.conf file.  Each metadevice is either a concatenation or stripe of up to maximum real disk partitions, where maximum is a total of 16 stripes.  The maximum number of real disks within a stripe is four.  A metadevice can be a concatenation of stripes, therefore maximum configuration would be 16 stripes of four disks (64 total disks).  It can also be a metamirror comprised of one or more regular metadevices, also referred to as submirrors. 

The /etc/md.conf file is constructed in a similar manner to the /etc/fstab file.  Tabs, spaces, comments (using a pound sign, #), and continuation of lines (using a backslash, \) are allowed.

Metadevices specified in /etc/md.conf are activated or set up by metainit(8). 

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/id020c).  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 upper case or lower case.  The -h specifies the hot spare pool to be associated with the metadevice. 

Metamirrors are represented in the /etc/md.conf 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/md.conf, as a metadevice.  options are documented under the metamirror options section.  The maximum number of submirrors supported is three. 

The /etc/md.conf file can also contain user defined hot spare pools.  The maximum number of physical devices in a hot spare pool is 64.  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/id020c). 

The /etc/md.conf 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 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 [ 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/id020c

OPTIONS

There are two sets of options can be used in the /etc/md.conf file.  The first apply to metamirrors and the second are only applicable to metadevices (concatenations and stripes). 

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. 

-e number
Specifies the number of read errors that will be tolerated before taking a physical device off-line.  Note that a physical device is taken off-line as soon as the first write error occurs.

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 Options

The following flags control the mode of operation for metadevices (concatenations and stripes), they can not be used on the line in the /etc/md.conf 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.  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 upper case or lower case.  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. 

EXAMPLES

Examples are given below that show concatenation, striping, and mirroring.  All IPI drives in the following examples have the same size of 2006130 sectors. 

Concatenation

This example shows a metadevice, /dev/md7b, consisting of a concatenation of four disks. 


#
# (concatenation of four disks)
#
/dev/md7b 4 1 /dev/id020c 1 /dev/id021c 1 /dev/id022c 1 /dev/id023c

The first disk sector in all of the above devices contains a disk label. In order to preserve the labels on devices /dev/id021c, /dev/id022c, and /dev/id023c, 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/md2b, consisting of a concatenation of two stripes of four disks. 


#
# (concatenation of two stripes, each consisting of four disks)
#
/dev/md2b 2 4 /dev/id020c /dev/id021c /dev/id022c /dev/id023c -i 16k \
            4 /dev/id024c /dev/id025c /dev/id026c /dev/id027c -i 32k

The above example shows a concatenation of two stripes of four 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 four disks are interlaced across four disks.  The default interlaced is the cylinder size of the first disk in the stripe. 

Mirroring

This example shows a three-way mirror, /dev/md1a that consists of three submirrors. 


#
# (mirror)
#
/dev/md1a -m /dev/md1b /dev/md1c /dev/md1d
/dev/md1b 1 1 /dev/id002h
/dev/md1c 1 1 /dev/id003h
/dev/md1d 1 1 /dev/id004h

In the above example, the three-way mirror is first defined using the -m option.  The submirrors are made up of one partition, however any combination of stripes and concatenation can be made.  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/md.conf file is unimportant. 

Hot Spare

This example shows a three-way mirror, /dev/md1a that consists of three submirrors and three hot spare pools. 


#
# (mirror and hot spares)
#
/dev/md1a -m /dev/md1b /dev/md1c /dev/md1d
/dev/md1b 1 1 /dev/id002h -h hsp001
/dev/md1c 1 1 /dev/id003h -h hsp002
/dev/md1d 1 1 /dev/id004h -h hsp003
hsp001 /dev/id005h /dev/id006h /dev/id007h
hsp002 /dev/id006h /dev/id007h /dev/id005h
hsp003 /dev/id007h /dev/id005h /dev/id006h

In the above example, the three-way mirror is first defined using the -m option.  The hot spare pools to be used are tied to the submirror by 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. 

State Database Replicas

This example shows how to set up an initial state database and three replicas on a new SPARCserver 490 that has been delivered with three IPI disks. 


#
# (state database and replicas)
#
mddb01 /dev/id001c /dev/id010h /dev/id011c

In the above example, state database replicas are stored on each of the three components.

Once the above entry is made in the /etc/md.conf file, the metadb(8) 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 IPI disks.

FILES

/etc/md.conf

SEE ALSO

md(4s), mddb.conf(5), metatab(5), metaclear(8), metad(8), metadb(8), metahs(8), metainit(8), metaoffline(8), metaparam(8), metareplace(8), metastat(8), metasync(8), metattach(8)
Sun Online: DiskSuite Administration Guide

LIMITATIONS

Recursive mirroring is not allowed; that is, a metamirror cannot be a component in the definition of another metamirror. 

Sun Release 4.1  —  Last change: 24 July 1991

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026