metaset (1M)
Table of Contents

NAME

metaset - configure shared disksets

SYNOPSIS

metaset -s setname -a -h hostname...
metaset -s setname -a [ -l length ] drivename...
metaset -s setname -d [ -f ] -h hostname...
metaset -s setname -d [ -f ] drivename...
metaset -s setname -r
metaset -s setname -t [ -f ]
metaset -s setname -b
metaset -s setname -o [ -h hostname ]
metaset [ -s setname ]

AVAILABILITY

/usr/opt/SUNWmd/sbin

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, DiskSuite 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 DiskSuite. 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 DiskSuite 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).

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.

-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.

-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

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.

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.

FILES

/etc/opt/SUNWmd/md.tab
Contains list of metadevice configurations.

NOTES

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

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)

Solstice DiskSuite User's Guide, Solstice DiskSuite Reference