Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
System Administration Commandsmetaset(1M)


NAME

 metaset - configure shared disksets

SYNOPSIS

 /usr/sbin/metaset -s setname -a -h hostname...
 /usr/sbin/metaset -s setname -a [-l length] drivename...
 /usr/sbin/metaset -s setname -d [-f] -h hostname...
 /usr/sbin/metaset -s setname -d [-f] drivename...
 /usr/sbin/metaset -s setname -r
 /usr/sbin/metaset -s setname -t [-f]
 /usr/sbin/metaset -s setname -b
 /usr/sbin/metaset -s setname -o [-h hostname]
 /usr/sbin/metaset [-s setname]
 /usr/sbin/metaset [-s setname] -a | -d [ [m] mediator_host_list]

DESCRIPTION

 

In a diskset configuration, two hosts are physically connected to the same set of disks. When one host fails, the other host has exclusive access to the disks. The metaset command administers sets of disks shared for exclusive (but not concurrent) access between such hosts. While disksets enable a high-availability configuration, Solaris Volume Manager itself does not actually provide a high-availability environment.

Shared metadevices/hot spare pools can be created only from drives which are in the diskset created by metaset. To create a set, one or more hosts must be added to the set. To create metadevices within the set, one or more devices must be added to the set. The drivename specified must be in the form cxtxdx with no slice specified.

Drives are repartitioned when they are added to a diskset only if Slice 7 is not set up correctly. A small portion of each drive is reserved in Slice 7 for use by Volume Manager. The remainder of the space on each drive is placed into Slice 0. Any existing data on the disks is lost after repartitioning. After adding a drive to a diskset, you can repartition the drive as necessary. However, Slice 7 should not be moved, removed, or overlapped with any other partition.

After a diskset is created and metadevices are set up within the set, the metadevice name will be in the following form:

/dev/md/setname/{dsk,rdsk}/dnumber

where setname is the name of the diskset, and number is the number of the metadevice (0-127).

Hot spare pools within local disksets use standard Volume Manager naming conventions. Hot spare pools with shared disksets use the following convention:

setname/hspnumber

where setname is the name of the diskset, and number is the number of the hot spare pool (0-999).

Mediator Configuration

 

SVM provides support for a low-end HA solution consisting of two hosts that share only two strings of drives. The hosts in this type of configuration, referred to as mediators or mediator hosts, run a special daemon, rpc.metamedd(1M). The mediator hosts take on additional responsibilities to ensure that data is available in the case of host or drive failures.

A mediator configuration can survive the failure of a single host or a single string of drives, without administrative intervention. If both a host and a string of drives fail (multiple failures), the integrity of the data cannot be guaranteed. At this point, administrative intervention is required to make the data accessible. See mediator(7D) for further details.

Use the -m option, described below, to add or delete a mediator host.

OPTIONS

 
-a
Adds drives or hosts to the named set. For a drive to be accepted into a set, the drive must not be in use within another metadevice or diskset, mounted on, or swapped on. When the drive is accepted into the set, it is repartitioned and the metadevice state database replica (for the set) may be placed on it. However, if a Slice 7 starts at cylinder 0, and is large enough to hold a state database replica, then the disk is not repartioned. Also, a drive is not accepted if it cannot be found on all hosts specified as part of the set. This means that if a host within the specified set is unreachable due to network problems, or is administratively down, the add will fail.
-b
Insures that the replicas are distributed according to the replica layout algorithm. This can be invoked at any time, and will do nothing if the replicas are correctly distributed. In cases where the user has used the metadb command to manually remove or add replicas, this command can be used to insure that the distribution of replicas matches the replica layout algorithm.
-d
Deletes drives or hosts from the named diskset. For a drive to be deleted, it must not be in use within the set. The last host cannot be deleted unless all of the drives within the set are deleted. Note that deleting the last host in a diskset destroys the diskset.
-f
Forces one of three actions to occur: takes ownership of a diskset when used with -t; deletes the last disk drive from the diskset; or deletes the last host from the diskset. (Deleting the last drive or host from a diskset requires the -d option.) When used to forcibly take ownership of the diskset, this causes the diskset to be grabbed whether or not another host owns the set. All of the disks within the set are taken over (reserved) and fail fast is enabled, causing the other host to panic if it had diskset ownership. The metadevice state database will be read in by the host performing the take, and the shared metadevices contained in the set will be accessible. The -f option is also used to delete the last drive in the diskset, because this drive would implicitly contain the last state database replica. The -f option is also used for deleting hosts from a set. When specified with a partial list of hosts, it can be used for one-host administration. One-host administration could be useful when a host is known to be non-functional, thus avoiding timeouts and failed commands. When specified with a complete list of hosts, the set is completely deleted. It is generally specified with a complete list of hosts to clean up after one-host administration has been performed.
-h hostname...
Specifies one or more host names to be added to or deleted from a diskset. Adding the first host creates the set. The last host cannot be deleted unless all of the drives within the set have been deleted. The host name is not accepted if all of the drives within the set cannot be found on the specified host. The host name is the same name found in /etc/nodename.
-l length
Sets the size (in blocks) for the metadevice state database replica. The length can only be set when adding a new drive; it cannot be changed on an existing drive. The default (and maximum) size is 8192 blocks, which should be appropriate for most configurations. The minimum size of the length is 64 blocks.
-a | -d -m mediator_host_list
Adds (-a) or deletes (-d) mediator hosts to the specified diskset. A mediator_host_list is the nodename(4) of the mediator host to be added and (for adding) up to two other aliases for the mediator host. The nodename and aliases for each mediator host are separated only by commas. Up to two mediator hosts can be specified for the named diskset. For deleting a mediator host, specify only the nodename of that host as the argument to -m.

In a single metaset command you can add or delete two mediator hosts. See EXAMPLES.

-o
Returns an exit status of 0 if the local host or the host specified with the -h option is the owner of the diskset.
-r
Releases ownership of a diskset. All of the disks within the set are released. The metadevices set up within the set are no longer accessible.
-s setname
Specifies the name of a diskset on which metaset will work. If no setname is specified, all disksets are returned.
-t
Takes ownership of a diskset safely. If metaset finds that another host owns the set, this host will not be allowed to take ownership of the set. If the set is not owned by any other host, all the disks within the set will be owned by the host on which metaset was executed. The metadevice state database is read in, and the shared metadevices contained in the set become accessible. The -t option will take a diskset that has stale databases. When the databases are stale, metaset will exit code 66, and a message will be printed. At that point, the only operations permitted are the addition and deletion of replicas. Once the addition or deletion of the replicas has been completed, the diskset should be released and retaken to gain full access to the data.

EXAMPLES

 Example 1. Defining a Diskset
 

This example defines a diskset.

 
# metaset -s relo-red -a -h red blue

The name of the diskset is relo-red. The names of the first and second hosts added to the set are red and blue, respectively. (The hostname is found in /etc/nodename.) Adding the first host creates the diskset. A diskset can be created with just one host, with the second added later. The last host cannot be deleted until all of the drives within the set have been deleted.

Example 2. Adding Drives to a Diskset
 

This example adds drives to a diskset.

 
# metaset -s relo-red -a c2t0d0 c2t1d0 c2t2d0 c2t3d0 c2t4d0 c2t5d0

The name of the previously created diskset is relo-red. The names of the drives are c2t0d0, c2t1d0, c2t2d0, c2t3d0, c2t4d0, and c2t5d0. Note that there is no slice identifier ("sx") at the end of the drive names.

Example 3. Adding Multiple Mediator Hosts
 

The following command adds two mediator hosts to the specified diskset.

 
# metaset -s mydiskset -a -m myhost1,alias1 myhost2,alias2

FILES

 
/etc/lvm/md.tab
Contains list of metadevice configurations.

EXIT STATUS

 

The following exit values are returned:

0
Successful completion.
>0
An error occurred.

ATTRIBUTES

 

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
AvailabilitySUNWmdu

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), md.cf(4), md.tab(4), mddb.cf(4), attributes(5)

Solaris Volume Manager Administration Guide

NOTES

 

Diskset administration, including the addition and deletion of hosts and drives, requires all hosts in the set to be accessible from the network.


SunOS 5.9Go To TopLast Changed 24 Oct 2001

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.