Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ md(4S) — Solstice DiskSuite 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dkio(4s)

md.conf(5)

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(4S)  —  DEVICES AND NETWORK INTERFACES

NAME

md − user configurable pseudo device driver for metadevices

AVAILABILITY

This driver is available with the Sun Online: DiskSuite software package. 

DESCRIPTION

md is not a device driver in itself.  Rather, it is a user configurable pseudo device driver for metadevices. 

The standard metadevice name begins with “md” and is followed by a number in the range 0-to-15 and a letter in the range a-to-h.  Metadevices use the same naming convention used for other Sun devices.  However, these are pseudo devices used to build metamirrors, concatenations, and stripes of real devices. 

The numbers 0-to-15 would normally represent a drive and the letter would represent a partition, but in the case of pseudo devices, it is present to give a unique name to the device.  For example, md0a and md0b may or may not have a relationship depending on how the pseudo devices are configured. 

The block interface accesses the disk using the system’s normal buffering mechanism and is read and written without regard to disk records.  There is also a “raw” interface that provides for direct transmission between the disk and the user’s read or write buffer.  A single read or write call usually results in one I/O operation; raw I/O is therefore considerably more efficient when many bytes are transmitted.  The names of the raw devices conventionally begin with a prefix, ‘r.’

Disk Support

The md pseudo device drivers support IPI, SMD, and SCSI devices on all Sun SPARC systems. 

IOCTLS

The ioctls supported by the metadisk driver, along with their definitions and the parameters each expect are given in this section.  Other ioctls are used by the DiskSuite utilities, but these are not documented, as they are for internal Sun use only. 

Normal ioctls

The following ioctls are valid when issued to the raw metadevice such as /dev/rmd0a.  See dkio(4s) for additional information. 

DKIOCGGEOM
It is used to get the disk geometry. The metadisk driver fills in the dkg_nhead, dkg_nsect, dkg_ncyl, dkg_rpm, and dkg_apc from the first component of the metadevice.  dkg_ncyl always returns a zero (0).  For mirrors, these value are the same as the last submirror metadevice.  If the metadevice is not set up, then ENXIO is returned.  If the underlying device returns an error, that error is returned.

DKIOCGPART
It returns the partition table.  If the metadevice is set up, the metadisk driver sets dkl_cylno to 0 or 1 depending whether the first component of the metadevice starts at cylinder 0 or not and sets dkl_nblk to the number of blocks for the metadevice. 

DKIOCINFO
When issued to the administrative device or metadevice, this ioctl sets dki_ctlr and dki_unit to a value of 0 and sets dki_ctype to a value of DKC_MD. 

DIAGNOSTICS

The informative log messages include:

md: State database not found

Metadevice state database replicas have not been configured in.  However the driver has been attempted to run. 

md?[a-h]: devnum(%d, %d) has been hot spared with devnum(%d, %d)

The first block-device number listed has been hot spare replaced with the second block-device number listed. 

md?[a-h]: resync killed by signal %d, %d blocks copied

The resync operation was killed or interrupted by the system or user.  The number of blocks copied during the reysnc is displayed. 

md?[a-h]: starting <resync type> resync to md?[a-h]
md?[a-h]: blocksize = %d bytes

This is an informative messages logged at the beginning of each resync. The type of resync is displayed (i.e., full, optimized, online, partial).  The blocksize displayed is the buffersize which will be used by the resync. 

md?[a-h] resync finished

This informative message is logged when each component has finished resyncing.  Note that the metamirror may not necessarily be fully replicated. 

Error Log Messages

The error log messages include:

md?[a-h]: attach open error dev(%d, %d)

This error message comes from the ioctl which performs the dynamic concatenation, when it cannot open the specified block-device for the metadevice listed at the front of the log message. 

md: State database is stale

This error message comes when there are not enough usable replicas for the state database to be able to update records in the database.  All accesses to the metadevice driver will fail.  To fix this problem more replicas need to be added or unaccessible replicas need to be deleted. 

md?[a-h]: Unusable, there are no running submirrors

The metamirror listed at the front of the log message is not usable, because none of the submirrors are runnable.  At least one submirror has components which are unopenable, the unopenable components were usable the last time the system was booted.  If the failed components can be fixed then,  the next open of the metamirror will resolve the situation. 

md: State database marked stale, due to commit failure

At boot-time state database commits failed, and the database was marked as stale.   All accesses to the metadevice driver will fail.  To fix this problem more replicas need to be added or some need to be deleted. 

md?[a-h]: open error dev(%d, %d)

The specified metadevice had the listed block-device which was unopenable.  This can happen at metainit or boot-time.  If at boot-time, then the metadevice is not usable until the failed device is repaired.  After the metadevice is repaired then the first open to the metadevice will resolve the situation. 

md?[a-h]: Submirror %s error
md?[a-h]: Offlining dev(%d, %d) error at blk = %d len = %d

A read or write error has occurred on the specified submirror, at the specified block number and byte count for the block device which is displayed as being offlined.  This happens if the number of read errors exceeds the error threshold or one write error occurs on a submirror. 

md?[a-h]: Last running submirror has erred
md?[a-h]: devnum (%d, %d) had a %s error

If the last running submirror of a metamirror gets an error, then the submirror and component which errored is displayed.  In this particular case the error is propagated back to the application. 

md?[a-h]: Hot spare resync aborted

If a hot spare resync is aborted, then this log message is displayed. 

md?[a-h]: replace open error dev(%d, %d)

This error message comes from the ioctl which performs the metareplace (replacing components) operation, when it cannot open the specified block-device for the metadevice listed at the front of the log message. 

md?[a-h]: enable open error dev(%d, %d)

This error message comes from the ioctl which performs the metareplace -e (enabling components) operation, when it cannot open the specified block-device for the metadevice listed at the front of the log message. 

md: enable hot spare open error dev(%d, %d)

This error message comes from the ioctl which performs the metahs -e (enabling hot spares) operation, when it cannot open the specified block-device for the metadevice listed at the front of the log message. 

md?[a-h]: resync read fail, copied %d blks dev = 0x%x blkno = %d bcount = %d

This error message indicates a read error on a submirror that is being sourced during resync.  The metadisk driver looks for another submirror and continues to perform a resync. 

md?[a-h]: optimized resync failed
md?[a-h]: %d-%d is unsyncable

This error message indicated all source submirrors failed.  The resync is aborted due to this error. 

md?[a-h]: resync write failure, copied = %d dev = 0x%x blkno = %d bcount = %d

This error message indicates a write error on the submirror that is being resync.  The resync is aborted due to this error. 

md?[a-h]: resync killed by signal %d, %d blocks copied

This error message indicates a resync process was killed by the system or the user.  The resync is aborted due to this error. 

md?[a-h]: mirror resync failed. md%d%c marked as erred

This error message indicates a destination submirror has errored and the component has been offlined and the resync continues providing there are other submirrors. 

md: metadevice state database commit failed
md: metadevice state database delete failed

These messages occur when there have been device errors on components where the state database replicas reside.  These errors only occur when more than half of the replicas have had device errors returned to them.  For instance, if you have three components with state database replicas and two of the components report errors, than these errors may occur.  The state database commit or delete is retried periodically.  If a replica is added then the commit or delete will finish and the system will be operational, otherwise the system may slowly hang. 

FILES

/etc/md.conf Contains list of metadevice configurations. 

SEE ALSO

dkio(4s), md.conf(5), 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
System and Network Administration

Sun Release 4.1  —  Last change: 25 June 1991

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