- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Live monitoring of DIsk Mirroring
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
тАО02-11-2010 02:29 AM
тАО02-11-2010 02:29 AM
How can I monitor the Root Disk Mirroring activity in my system - LIVE, besides doing a:-
lvdisplay -v /dev/vg00/lvolX and grep for stale
Is there a better way. Are there any other logs being generated by 'lvextend' besides the system's syslog.log
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2010 02:37 AM
тАО02-11-2010 02:37 AM
Solutionfor i in `vgdisplay -v vg00 | grep available | awk '{print $3}' | cut -c 1-9`
do
if [ $i = stale ]
then
echo " disk fail "
else
echo " disk ok "
fi
done
also you can just put a mailx syntax in this script if disk will fail
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2010 02:38 AM
тАО02-11-2010 02:38 AM
Re: Live monitoring of DIsk Mirroring
#!/bin/ksh
# script to check mirror(s) on vg00
# Geoff Wild 3/19/2003
#set -x
admin1=you@yourdomain.com
host_name=`hostname`
do_mirrordisk() {
echo "------------------------------------------------"
echo " checking the root disk vg00 on $host_name "
echo "------------------------------------------------"
for lvol in `/usr/sbin/vgdisplay -v vg00 |grep "LV Name" |awk '{print $3}'`
do
mirror=`/usr/sbin/lvdisplay -v ${lvol} |grep Mirror |awk '{print $3}'`
if [ $mirror -lt 1 ]
then
echo "Root Mirror disk for ${lvol} has no mirror..."
/usr/sbin/lvdisplay -v ${lvol} |grep Mirror > /tmp/MIRRPT
mailx -s "ALERT: $host_name Root Mirror for ${lvol} has no mirror..." $admin1 fi
stale=`/usr/sbin/lvdisplay -v ${lvol} | grep stale | wc -l`
if [ $stale -ge 1 ]
then
echo "Root Mirror disk for lvol${lvol} is down, please check ..."
/usr/sbin/lvdisplay -v ${lvol} | grep stale | head > /tmp/MIRRPT
mailx -s "ALERT: $host_name Root Mirror Disk for ${lvol} is down !" $admin1 < /tmp/MIRRPT
else
echo "Root Mirror Disk for ${lvol} is Okay !"
fi
done
}
do_mirrordisk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2010 03:03 AM
тАО02-11-2010 03:03 AM
Re: Live monitoring of DIsk Mirroring
Thanks! This is great
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2010 03:14 AM
тАО02-11-2010 03:14 AM
Re: Live monitoring of DIsk Mirroring
This is basically all you can do. You can count all the stale entries and do some calculations in a script too ...
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2010 03:14 AM
тАО02-11-2010 03:14 AM
Re: Live monitoring of DIsk Mirroring
is the better way to check the current mirroring progress.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-12-2010 06:24 AM
тАО02-12-2010 06:24 AM
Re: Live monitoring of DIsk Mirroring
# VGNAME=vgtarget
# while true;do lvdisplay -v `vgdisplay -v $VGNAME | awk '/LV Name/ {print $3}'` | grep -c stale; sleep 1; done
This is an infinite loop, which checks the target VG and prints the total number of stale LEs. (On a Linux system there is a command called 'watch' which does a similar task)
Unix operates with beer.