Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

md(4s)

md.conf(5)

mddb.conf(5)

metatab(5)

metaclear(8)

metad(8)

metahs(8)

metainit(8)

metaoffline(8)

metaparam(8)

metareplace(8)

metastat(8)

metasync(8)

metattach(8)

METADB(8)  —  MAINTENANCE COMMANDS

NAME

metadb − create and delete replicas of the metadevice state database

SYNOPSIS

metadb
metadb −a [ −f ] [ −k vmunix-name ] mddbnnn
metadb −a [ −f ] [ −k vmunix-name ] [ −c number ] [ −s size ] /dev/device-name ...
metadb −d [ −f ] [ −k vmunix-name ] mddbnnn
metadb −d [ −f ] [ −k vmunix-name ] /dev/device-name ...
metadb −i
metadb −p [ −k vmunix-name ] [ mddb.conf-file ]

AVAILABILITY

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

DESCRIPTION

metadb creates and deletes replicas of the metadevice state database. 

The metadevice state database contains information about the current metadevice configuration on the system.  The results of all metadevice configuration or status changes 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. 

Because the state database information is critical to the operation of all metadevices, multiple copies of the metadevice state database are maintained.  Each copy is referred to as a replica. 

When used with no options, metadb gives a short form of the status of the metadevice state database. 

The initial state database is created using the metadb command with both the −a and −f options, followed by the device name where the replica is to reside.  The −a option specifies that a replica (in this case, the initial) state database should be created.  The −f option forces the creation to occur, even though a state database does not exist.  (The −a and −f options should only be used together when no state databases exist.) 

There must be a minimum of two replicas located on the system at any time.  If there is only one replica and the system crashes, it is possible all metadevice configuration data may be lost. 

Additional replicas, containing identical information, are necessary to prevent the loss of the configuration information.   Loss of the configuration makes operation of the metadevices impossible.  To create additional replicas, use the metadb −a command, followed by the name of the new devices.  All replicas that are located on the same partition of a physical device must be created at the same time. 

To delete all replicas that are located on the same partition of a physical device, the metadb −d command is used, followed by the name of the physical partition. 

When used with the −i option, metadb displays the status of the metadevice state databases.  The status can change if a hardware failure occurs or when state databases have been added or deleted. 

The default location of the mddb.conf-file is in /etc/mddb.conf. 

OPTIONS

The following options can be used with metadb .  Not all the options are compatible on the same command line.  Refer to the above synopsis line to see the supported use of the options. 

−a Attach a new database device.  The kernel image is automatically patched with the new information and the /etc/mddb.conf file is updated.  Replicas defined in the /etc/md.conf file can also be attached by specifying the assigned name at the command line in the form, mddbnn, where nn is a two-digit number given to the replica.  Refer to the /etc/md.conf(8) man page for instructions on setting up replicas in that file. 

−d To delete all replicas that are located on the same partition of a physical device, the metadb −d command is used, followed by the name of the physical partition.  The kernel image is automatically patched with the new information and the /etc/mddb.conf file is updated. 

−c number
Specifies the number of replicas to be placed on each device.  The default number of replicas is 1.

−f Force the deletion of replicas below the minimum of two.  The −f option is also used to create the initial state database. 

−i Inquire about the status of the replicas. 

−k vmunix-name
Specify the name of the kernel file where the replica information should be patched.  The default vmunix-name is /vmunix. 

−p Specifies patching the kernel that is located in the current working directory (./vmunix) with entries from the /etc/mddb.conf file.  This option is normally used to patch a newly built kernel before it is booted for the first time.  If the kernel has been built on a system other than the one where it will run, the location of the mddb.conf on the local machine can be passed as an argument.   This can be changed using the −k option. 

−s size
Specify the size of each replica.  The default size is 1034 blocks, which should be appropriate for all configurations. 

FILES

/etc/mddb.conf Contains the location of each copy of the metadevice state database. 

etc/md.conf Contains the metadisk configuration database. 

vmunix The UNIX kernel file. 

SEE ALSO

md(4s), md.conf(5), mddb.conf(5), metatab(5), metaclear(8), metad(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: 23 July 1991

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