metachk - check DiskSuite metadevices, state-databases and configuration
checks all metadevices of all disksets owned by the local system for
faults or misconfiguration.
reports situations that have data-integrity implications (either immediately
or in the event of a single hardware failure), and
not those that merely effect
performance or capacity.
There are a few types of risky configuration
that are not reported because it is
assumed that the increased risk is
intentional in these specific, common cases - see NOTES.
If neccessary, metachk can be run in single-user mode to diagnose
faults that may be preventing the system from reaching multi-user mode.
You may want to run metachk periodically, scheduled by cron(1m).
Suppress warnings about one-way mirrors.
to handle one of the author's own very unusual DiskSuite configurations,
and is not intended for general use.
Print version information and exit immediately.
Error-messages describe conditions that have (probably) already
compromised data-integrity, for instance:
- the entire state-database is unreadable
- overlapping component of all submirrors of a mirror have failed
- multiple components of a RAID-5 metadevice have failed
Not all possible errors are detectable - see BUGS.
Warning-messages describe conditions that could subsequently
compromise data-integrity if not corrected, for instance:
- state-database replica is out of date, too small or corrupt
- mirror or RAID-5 metadevice references a non-existant hot-spare pool.
- hot-spare is in use
- hot-spare is broken (unusable)
- hot-spare pool is empty
- submirror has been manually offlined
- a one-way mirror exists
- trans has been configured without a log device
- a mirror or RAID-5
has multiple components on the same disk
- trans has mirrored (or RAID-5) master and unmirrored (or not RAID-5) log
- the DiskSuite template file (md.tab) defines multi-way mirrors,
on a populated device could destroy data: mirrors should be created
with a single submirror, and other submirrors attached afterwards.
- with the exception of one-way mirrors (see above),
the DiskSuite template file (md.tab) does not match the active configuration,
ie: "metainit -a" could destroy data.
If invalid command-line options are specified, an exit status of 1 is returned.
If any error-conditions are detected (see above),
an exit-status of 2 is returned.
If any warning-conditions are detected,
metachk returns 1.
Otherwise, metachk returns 0 (success).
metachk 2.3.4 18may2003 MJS
metachk runs on any system capable of hosting
DiskSuite version 2.0.1 or later. It has been tested against all releases
of DiskSuite from 2.0.1 through 4.2.1; and Solaris versions 2.3 through 9, on
both SPARC and x86 platforms.
For reasons that should be obvious, metachk should
within the local diskset.
In theory, data housed on devices that are not mirrors or RAID-5 devices is
inherently at risk, but metachk does not report such configurations
because they are usually deliberate (eg: a filesystem housed on
a raw disk partition).
In spite of the implied reduction in data-integrity,
metachk does not report mirror or RAID-5
metadevices that are
completely contained within a single controller, bus or string.
Such configurations are fairly common, because
many systems have a very limited number of controllers and buses.
metachk also does not report concat/stripe metadevices that are
not part of a mirror or RAID-5 but
are still spread over more than one disk/controller/bus/string. Such
configurations are fairly common because many systems do not have
enough disks, controllers or buses to arrange such enhanced performance
metadevices with mirroring or RAID-5 protection.
metachk cannot detect failures of components that are not part
of a mirror or RAID-5 metadevice (eg: a filesystem housed directly on
a raw disk partition or directly on a concat/stripe).
does not report failures of such devices unless they are part of a mirror
or RAID-5 metadevice.
metachk parses the output of metastat(1m), and
(in spite of efforts to make minimal assumptions) may be
future changes to the format of the report produced by metastat(1m).
metachk currently does not recognise "soft-partitions" (introduced with
DiskSuite 4.2.1 on Solaris 8): metadevices made up of soft-partitions
are not fully checked.
Solaris 9 introduced an optional new naming scheme for physical disk devices:
MPxIO-style names (as used by the Sun add-on "Storage Traffic Management System"
metachk currently does not recognise mpxio(7)-format physical
device names on Solaris 9:
metadevices made up from such components are not fully checked. See the
Solaris 9 manpage for
Generated by untbl 0.6
Generated by unroff 1.0, October 10, 2002.