metastat(1M)




NAME

     metastat - display status for metadevice or hot spare pool


SYNOPSIS

     /usr/sbin/metastat -h

     /usr/sbin/metastat [-B] [-i] [-p] [-s setname]  [-t]  [meta-
     device...] [hot_spare_pool...]

     /usr/sbin/metastat [-B] [-i] [-p] [-s setname] component...


DESCRIPTION

     The metastat command displays the current  status  for  each
     metadevice  (including  stripes,  concatenations, concatena-
     tions of stripes, mirrors, RAID5, soft partitions, and trans
     devices)  or  hot  spare  pool, or of specified metadevices,
     components, or hot spare pools.

     It is helpful to run the metastat command  after  using  the
     metattach command to view the status of the metadevice.

     metastat displays the state of each Solaris  Volume  Manager
     volume on the system. The possible states include:

     Okay  The device reports no errors.

     Needs maintenance
           A problem has been detected. This  requires  that  the
           system  administrator replace the failed physical dev-
           ice.  Volumes  displaying   Needs   maintenance   have
           incurred  no  data  loss, although additional failures
           could risk data loss. Take action as quickly as possi-
           ble.

     Last erred
           A problem has been detected. Data loss is a  possibil-
           ity.  This  might  occur if a component of a submirror
           fails and is not replaced by a  hot  spare,  therefore
           going into Needs maintenance state. If the correspond-
           ing component also fails, it would go into Last  erred
           state and, as there is no remaining valid data source,
           data loss could be a possibility.

     Unavailable
           A device cannot be  accessed,  but  has  not  incurred
           errors. This might occur if a physical device has been
           removed  with  Solaris  Dynamic  Reconfiguration  (DR)
           features,  thus  leaving  the  Solaris  Volume Manager
           volume unavailable. It could also occur if an array or
           disk  is powered off at system initialization, or if a
           >1TB volume is present when the system  is  booted  in
           32-bit mode.

     See the Solaris  Volume  Manager  Administration  Guide  for
     instructions  on  replacing  disks  and  handling volumes in
     Needs maintenance or Last erred states.


OPTIONS

     The following options are supported:

     -B    Print the current status of all of the 64-bit metadev-
           ices and hot spares.

     -h    Display usage message.

     -i    Check the status of all  active  metadevices  and  hot
           spares.  The  inquiry  causes  all  components of each
           metadevice to be checked for  accessibility,  starting
           at   the  top  level  metadevice.  When  problems  are
           discovered, the metadevice state databases are updated
           as if an error had occurred.

     -p    Display the list of active metadevices and  hot  spare
           pools in the same format as md.tab.

     -r    Display whether sub-devices are  relocatable.  At  the
           end  of  the  output,  displays  the devices and their
           associated device IDs.

     -s setname
           Specify the name of  the  diskset  on  which  metastat
           works.  Using the -s option causes the command to per-
           form its administrative function within the  specified
           diskset. Without this option, the command performs its
           function on metadevices and hot  spare  pools  in  the
           local diskset.

     -t    Print the current status and timestamp for the  speci-
           fied  metadevices  and  hot spare pools. The timestamp
           provides the date and time of the last state change.


OPERANDS

     The following operands are supported:

     component
           Display the status of the  component  hosting  a  soft
           partition,  including  extents,  starting  blocks, and
           block count.

     hot_spare_pool
           Display the status of the specified hot spare pool(s).

     metadevice
           Display the status of the specified metadevice(s).  If
           a  trans  metadevice  is  specified, the status of the
           master and log devices is also displayed.


EXAMPLES

     Example 1: Output Showing Mirror with Two Submirrors

     The following example shows the partial output of the metas-
     tat  command  after creating a mirror, d0, consisting of two
     submirrors, d70 and d80.

     # metastat d0
     d0: Mirror
         Submirror 0: d80
           State: Okay
         Submirror 1: d70
           State: Resyncing
         Resync in progress: 15 % done
         Pass: 1
         Read option: roundrobin (default)
         Write option: parallel (default)
         Size: 2006130 blocks
         .
         .
         .

     Example 2: Soft Partition on Mirror with Submirror

     The following example shows the partial output of the metas-
     tat  command  after creating a soft partition, d3, on concat
     d2, which is built on a soft partition.

     # metastat
     d2: Concat/Stripe
         Size: 204800 blocks
         Stripe 0:
             Device              Start Block  Dbase State        Hot Spare
             d0                         0     No    Okay

     d0: Soft Partition
         Component: c0t3d0s0
         Status: Okay
         Size: 204800 blocks
             Extent              Start Block  Block count
                  0                      129       204800

     d3: Soft Partition
         Component: d2
         Status: Okay
         Size: 202752 blocks
              Extent              Start Block  Block count
                   0                      129       202752

     Example 3: Multi-node Disk Set

     The following example shows the output of the metastat  com-
     mand with a multi-node disk set and application-based mirror
     resynchronization option.  Application-based  resynchroniza-
     tion is set automatically if needed.

     # metastat -s oban
     oban/d100: Mirror
         Submirror 0: oban/d10
           State: Okay
         Submirror 1: oban/d11
           State: Okay
         Pass: 1
         Read option: roundrobin (default)
         Write option: parallel (default)
         Resync option: application based
         Owner: Node 2
         Size: 1027216 blocks (501 MB)

     oban/d10: Submirror of oban/d100
         State: Okay
         Size: 1027216 blocks (501 MB)
         Stripe 0:
             Device     Start Block  Dbase        State Reloc Hot Spare
             c1t3d0s0          0     No            Okay

     oban/d11: Submirror of oban/d100
         State: Okay
         Size: 1027216 blocks (501 MB)
         Stripe 0:
             Device     Start Block  Dbase        State Reloc Hot Spare
             c1t4d0s0          0     No            Okay


WARNINGS

     metastat displays states as  of  the  time  the  command  is
     entered.  It  is unwise to use the output of the metastat -p
     command to create a md.tab(4) file for a number of reasons:

        o  The output of metastat -p might show hot spares  being
           used.

        o  It might show mirrors with  multiple  submirrors.  See
           metainit(1M)  for  instructions for creating multi-way
           mirrors using metainit and metattach.

        o  A slice may go into an error state after  metastat  -p
           is issued.


EXIT STATUS

     The following exit values are returned:

          0     Successful completion.

          >0    An error occurred.


ATTRIBUTES

     See attributes(5) for descriptions of the  following  attri-
     butes:

     ____________________________________________________________
    |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
    |_____________________________|_____________________________|
    | Availability                | SUNWmdr                     |
    |_____________________________|_____________________________|
    | Stability                   | Evolving                    |
    |_____________________________|_____________________________|


SEE ALSO

     cfgadm(1M),   mdmonitord(1M),   metaclear(1M),   metadb(1M),
     metadetach(1M),  metahs(1M),  metainit(1M), metaoffline(1M),
     metaonline(1M),       metaparam(1M),        metarecover(1M),
     metareplace(1M),  metaroot(1M),  metaset(1M),  metasync(1M),
     metattach(1M),    mount_ufs(1M),    md.tab(4),     md.cf(4),
     mddb.cf(4), attributes(5)

     Solaris Volume Manager Administration Guide


NOTES

     Trans metadevices have been replaced by UFS logging.  Exist-
     ing  trans  devices are not logging. They pass data directly
     through to the underlying device. See mount_ufs(1M) for more
     information about UFS logging.


Man(1) output converted with man2html