Help on metastat

hi all,
can someone pls pass on your suggestion?
Firs thing I am testing a script which checks for the pattern 'Needs Maintenance' from metastat output and prints some messages in the screen. So i need to simulate an error in mirrored disk for metastat to give this message 'Needs Maintenance'.
Any simple way to achieve this?

thanks

When I need to do stuff like this I create a "dummy" metastat script.

e.g.

# metastat > /tmp/metastat
# vi /tmp/metastat
## change the output to how you'd like it to appear 

Then, in your script

#METASTAT="/usr/sbin/metastat"
METASTAT=/bin/cat /tmp/metastat"
...
${METASTAT} | while read line; do
  # whatever
done

Then when you're ready to go "live" with your script, just swap the dummy metastat command for the real one.

Cheers
ZB

Issue the metastat command in a mirrored system, redirect the output to a file, change one of the Okays to Needs Maintenance.

can someone pls suggest me ?
if i run 'metastat', i need to have atleast one or 2 devices in 'Unavailable' and 'last erred' or 'Need Maintanence' states..
Any simple way of doing this other than actualy failing the mirrored disks..Even if i can get any of these States should be fine to me..

thanks