- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: script to verify root disk mirrors on hp-ux 11...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2010 09:31 AM
тАО10-14-2010 09:31 AM
script to verify root disk mirrors on hp-ux 11.11
Looking for something like this as the output.
I am just not sure where to start on this one as i have several servers...some using Vxvm and some using LVM.
servername -> OK (if they are mirrored)
servername -> FAIL (if they aren't correctly mirrored.)
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2010 09:57 AM
тАО10-14-2010 09:57 AM
Re: script to verify root disk mirrors on hp-ux 11.11
Here's what I use:
#!/bin/ksh
Host=$(hostname)
vg=${1:-vg00}
for lv in $(vgdisplay -v ${vg} | grep -i 'lv name' | awk '{print $NF}')
do
mc=$(lvdisplay ${lv} | grep -i 'mirro copies' | awk '{print $NF}')
stat=$(lvdisplay ${lv} | grep -i 'lv status' | awk '{print $NF}')
printf "%-8s %-25s %-15s " ${Host} ${lv} ${stat}
[[ ${mc} -gt 0 ]] && echo "mirrored" || echo "NOT MIRROED"
done
#eof
HTH;
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2010 10:00 AM
тАО10-14-2010 10:00 AM
Re: script to verify root disk mirrors on hp-ux 11.11
The script is good, but one caveat. The only way to be sure the mirror is complete is to boot off it.
lslifs and other information should be displayed
lvlnboot -v
another very good idea as well.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2010 10:07 AM
тАО10-14-2010 10:07 AM
Re: script to verify root disk mirrors on hp-ux 11.11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2010 01:43 PM
тАО10-14-2010 01:43 PM
Re: script to verify root disk mirrors on hp-ux 11.11
The script emits an appropriate return message and returns 0 if all is OK, 1 for a warning and 2 if summat is deemed to be fatal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-14-2010 11:19 PM
тАО10-14-2010 11:19 PM
Re: script to verify root disk mirrors on hp-ux 11.11
Depending on the VxVM version
and the bundles you have installed:
Option 1
Veritas Storage Expert rule vxse_rootmir can
be used to confirm that the root mirrors are set up correctly.
# vxse_rootmir check
Option 2
Find the name of boot data group (normally "rootdg" BUT not compulsory any more):
# vxdg bootdg
List status of boot data group, say called
"bdg":
# vxdg list bdg
Easy to script it and extract lines with
"invalid", "offline", "disabled", "detached",
and similar...
Also, you can use commands:
# vxprint -g bdg -ht
# vxinfo -g bdg
I can probably find some scripts that I wrote over many years (I am not at home now).
One of the many courses I teach is Veritas
Volume Manager. I have been using it for
many years now.
In the HP Edu labs in Australia I actually
have HP-UX servers that run VxVM since of
HP-UX admins normally know LVM only :)
c) A simple (albeit old), Shell script is here:
http://www.scribd.com/doc/3241406/Veritas-Volume-Manager-status-checker
d) I also enclose one of Nagios plugins for
Veritas Volume Manager checks.
This should suffice :)
Cheers,
VK2COT