lismeta - displays raw or processed output from metastat.
Arguments
Author
Bugs
Calls
Description
Diagnostics
Documented Version
Exit Status
Options
Output
Permissions
Rcs Information
Rcs.sh Version
Restrictions
See Also
Synopsis
Warning(s)
1.5 - 2008/11/27 00:27:05
lismeta [[-S] | [-h | -p -i -tt -s setname]] [-x]* [-X]* {metastat_arguments}
This script displays raw or processed output from metastat.
{metastat_arguments}*
-S print summarized metastat output (default=print raw metastat output) -h passed through to metastat -p passed through to metastat -x does set -x (may be used in functions and external script calls) (see DIAGNOSTICS below) -X sets debugging level--the number of times -X is specified" (see DIAGNOSTICS below)
1) Raw output corresponds to the output from metastat
2) Processed output looks like this.
column 1: the array index of the element
column 2: the metadevice name
column 3: type of meta device; one of [stripe|concat|mirror|raid|logging|hotspare|SMconcat|SMstripe] (where SMconcat is a submirror-concat, and SMstripe is a submirror-stripe)
column 4: the state of the metadevice; for mirrored devices, this will be the state of all subdevices concatinated together
column 5: if the stat of a device is resync, this will be the percentage of the resync that has completed
column 6: the size of the metadevice in megabytes
column 7: the disk slices associated with the metadevice--the first submirror if mirrored
column 8: the disk slices associated with the second submirror if mirrored
column 9: the disk slices associated with the third submirror if mirrored
a# md md_type cpy State %sync SizeMB diskpart_1 diskpart_2 diskpart_3 __ [1]_ __[2]___ [3] ____________ _____ ________ ____________[4]____________ ____________[5]____________ ____________[6]____________ 1 d2 mirror 1 Okay 27153 c0t9d0s4,c0t9d0s5,c0t1d0s3 2 d22 SMconcat 1 Okay 27153 c0t9d0s4,c0t9d0s5,c0t1d0s3
- Only a limited subset of possible configurations are available for testing, and, hence the processed output processer does not know how to handle all possible cases.
- The script assumes old style meta device names which must start with "d" are used
1) The script is hard-coded to only print up to 3 mirrors.
2) The output columns for physical partitions is about 30 characters wide and will overflow if there are more than 3 slices
00008
$Id: lismeta,v 1.5 2008/11/27 00:27:05 earneson Exp $
$Author: earneson $
$Date: 2008/11/27 00:27:05 $
$Revision: 1.5 $
$Source: /Users/cvs/scripts/all/Users/earneson/bin/lismeta,v $
$State: Exp $
rwxr-xr-x userUID staff
40 - localize not found
41 - Can not find meta stat. Checked /usr/opt/SUNWmd/sbin/metastat and /usr/sbin/metastat.
41 - Can not find meta stat. Checked /usr/opt/SUNWmd/sbin/metastat and /usr/sbin/metastat
51 - An unknown option was passed to the script, or syntax of the parameters is wrong.
51 - Unknown option >$errflag<
uname, metastat, awk
metastat(1M)
Edwin Arneson
-X Prints strings that are build in awk to be executed. The output of the command is read by awk. Marked with "cmd=". -XX Nothing. -XXX Nothing. -XXXX Various debugging message as input lines are processed. The processing of metastat -p records are marked with "mdIN".
The processing of metastat records are marked with "mdsIN" and "submdsIN"
\\$4 | lismeta (1) | EJA UTILITY |