1833056 Members
2417 Online
110049 Solutions
New Discussion

Monitoring LVM mirror

 
SOLVED
Go to solution
Scott McMullen
New Member

Monitoring LVM mirror

New to hp-ux. We have and hp9000 use lVM and mirroring and i was wonder how to monitor the status of the mirrored volumes.
10 REPLIES 10
Craig Rants
Honored Contributor

Re: Monitoring LVM mirror

There is an ITO plug in which will give you graphical monitoring capabilites of LVM stuff. I don't know what you specifically want to monitor. If you want to script everything use the lvdisplay -v and find the info you want to use...
GL,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Steven Sim Kok Leong
Honored Contributor

Re: Monitoring LVM mirror

Hi,

Check for stale extents in lvdisplay or pvdisplay.

Hope this helps. Regards.

Steven Sim Kok Leong
Ian Dennison_1
Honored Contributor

Re: Monitoring LVM mirror

What we used to do in the olden days was perform an 'lvdisplay -v /dev/vg01/lvol1|grep stale |wc -l', then produce a warning if the counter was 1 or more.

These days, I imagine dmesg + syslog.log are adequate enough.

Cheers, Ian Dennison
Building a dumber user
Uday_S_Ankolekar
Honored Contributor
Solution

Re: Monitoring LVM mirror

Hi,

Easy way is to run lvdisplay -v /dev/vgname/lvolname

This will display status of both primary and mirrored disk. And you want to see is 'current' on both
Goodluck.

-USA..
Good Luck..
Helen French
Honored Contributor

Re: Monitoring LVM mirror

Hi,

Check this complete guide. Read "Mirroring Data using LVM" for more information:

http://www.docs.hp.com/hpux/onlinedocs/B2355-90672/B2355-90672.html

HTH,
Shiju

Life is a promise, fulfill it!
Krishna Prasad
Trusted Contributor

Re: Monitoring LVM mirror


lvdisplay -v /dev/vg##/lvol | grep stale > /dev/null

if [ $? = 0 ]
then
echo "Stale extent for lvol."
fi

You could easily write a script that would loop to check each logical volume in every volume group on our you systems and report to what every you needed.
Positive Results requires Positive Thinking
melvyn burnard
Honored Contributor

Re: Monitoring LVM mirror

you may want to look at using EMS monitoring to do this.
Go look at the EMS manuals at:
http://docs.hp.com
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
fg_1
Trusted Contributor

Re: Monitoring LVM mirror

Scott

Use the commands:

vgdisplay -v /dev/vg*

-Check the status of each lvol and look to see if it says available/syncd or available/stale.

lvdisplay -v /dev/vg##/lvol##

Check for stale extents

Gl
Darrell Allen
Honored Contributor

Re: Monitoring LVM mirror

Hi Scott,

I've attached a quickie script that may help. If a lv is not synced a message will be returned else "no news is good news".

Darrell

"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
James R. Ferguson
Acclaimed Contributor

Re: Monitoring LVM mirror

Hi Scott:

If you want to build something yourself, then here's the guts of a script to collect all the logical volume names that represent mirrored logical volumes but do not show all *current* extents. If the returned list is not empty you could email a message to yourself. This kind of script can be cron'ed and executed every n-minutes.

You can capture its output, if any, with:

LV=`$HOME/mirrors.sh`

Regards!

...JRF...