The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
SVM metastat -- needs maintenance dangral SUN Solaris 14 02-02-2006 11:18 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-05-2006
Registered User
 

Join Date: Dec 2006
Posts: 2
Stumble this Post!
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
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 12-05-2006
zazzybob's Avatar
Registered Geek
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Stumble this Post!
When I need to do stuff like this I create a "dummy" metastat script.

e.g.

Code:
# metastat > /tmp/metastat
# vi /tmp/metastat
## change the output to how you'd like it to appear
Then, in your script
Code:
#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
Reply With Quote
  #3 (permalink)  
Old 12-05-2006
System Shock's Avatar
Registered User
 

Join Date: May 2006
Location: Tau Ceti V
Posts: 378
Stumble this Post!
Issue the metastat command in a mirrored system, redirect the output to a file, change one of the Okays to Needs Maintenance.
Reply With Quote
  #4 (permalink)  
Old 12-06-2006
Registered User
 

Join Date: Dec 2006
Posts: 2
Stumble this Post!
Query again in metastat

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
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:10 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0