metastat - display status for metadevice or hot spare pool
/usr/sbin/metastat -h
/usr/sbin/metastat [-a] [-B] [-D] [-c] [-i] [-p] [-q] [-s setname] [-t] [metadevice...] [hot_spare_pool...]
/usr/sbin/metastat [-a] [-B] [-D] [-c] [-i] [-p] [-q] [-s setname] component...
The metastat command displays the current status for each metadevice (including stripes, concatenations, concatenations 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 RAID-1 volume on the system. The possible states include:
Okay
Needs maintenance
Last erred
Unavailable
After the storage has been made available, run the metastat command with the -i option to update the status of the metadevices. This clears the unavailable state for accessible devices.
See the for instructions on replacing disks and handling volumes in Needs maintenance or Last erred states.
The following options are supported:
-a
-B
-c
There is one line of output for each metadevice. The output shows the basic structure and the error status, if any, for each metadevice.
The -c output format is distinct from the -p output format. The -p option does not display metadevice status and is not intended as human-readable output.
-D
-h
-i
-p
The -p output is designed for snapshotting the configuration for later recovery or setup.
-q
-s setname
-t
The following operands are supported:
component
hot_spare_pool
metadevice
Example 1 Output Showing Mirror with Two Submirrors
The following example shows the partial output of the metastat command after creating a mirror, opt_mirror, consisting of two submirrors, opt_sub1 and opt_sub2.
# metastat opt_mirror opt_mirror: Mirror Submirror 0: opt_sub1 State: Okay Submirror 1: opt_sub2 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 metastat 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 Trans Metadevice
The following example shows the output of the metastat command after creating a trans metadevice.
# 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 4 Multi-owner disk set
The following example shows the output of the metastat command with a multi-owner disk set and application-based mirror resynchronization option. Application-based resynchronization 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: None 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
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:
The following exit values are returned:
0
>0
See attributes(5) for descriptions of the following attributes:
|
mdmonitord(1M), metaclear(1M), metadb(1M), metadetach(1M), metahs(1M), metainit(1M), metaoffline(1M), metaonline(1M), metaparam(1M), metarecover(1M), metarename(1M), metareplace(1M), metaroot(1M), metaset(1M), metassist(1M), metasync(1M), metattach(1M), md.tab(4), md.cf(4), mddb.cf(4), md.tab(4), attributes(5), md(7D)
Trans metadevices have been replaced by UFS logging. Existing trans devices are not logging--they pass data directly through to the underlying device. See mount_ufs(1M) for more information about UFS logging.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |