Script to verify veritas mirror

Hi Experts,

I have lot of Solaris servers and in most of them, root disk is mirrored in rootdg. I just want to check all servers, if there is any server whose root disk is not mirrored. Either it may be with detached plexes or not mirrored at all. I can run a for loop for all servers. Can anybody help in getting me some command or a small script, which can verify if all volumes are mirrored in rootdg ?

Thanks

Instead of us writing a script, tinker with the

metastat

command, come back and tell us what you think you need to see from that output.

The issue is that a lot of stuff can appear as the output of that command, and only you are going to know specifically what you need to see.

Correct Jim, but I will be checking for veritas mirroring and not SVM. I can check 'vxprint -htg rootdg', but ofcource it will show me a large output. There I can see if root, var and swap are having two plexes for each.
I have over 200 servers, so I was thinking if there is a easy way to check instead of login to check server and check it one by one.

I think, that the ideal is generate a cron in each server that run a

vxprint -XXXXX > /tmp/vxprint_date_hostname

and after send each file to one server that receive all files of all servers, with scp for example

scp /tmp/vxprint_date_hostname user@oneserver:/tmp/outputs

at the end you will have all files in only 1 server, and in this server you can make a script that review all files.

1 Like

Yes, this made my life easier. Thanks