Operating System - HP-UX
1833053 Members
2878 Online
110049 Solutions
New Discussion

Re: percentage of mirroring

 
changee
Occasional Advisor

percentage of mirroring

hi,

i am mirroring an lvol. Is there any way i can find out what is the completed percentage of mirroring.Any command which shows "so much percentage is completed ".

thanks,
changee
11 REPLIES 11
A. Clay Stephenson
Acclaimed Contributor

Re: percentage of mirroring

Not as such but you changed run lvdisplay -v and see which extents are current and which are stale.
If it ain't broke, I can fix that.
Jov
Honored Contributor

Re: percentage of mirroring

Hi,

Read up on 'vgdisplay' and/or 'lvdisplay' as it should show the status of mirroing in progress. I am pretty sure its 'vgdisplay -d'.


Jov
James R. Ferguson
Acclaimed Contributor

Re: percentage of mirroring

Hi:

# lvdisplay /dev/vgXX/lvolNN|grep -c stale

...will display the number of stale extents remaining.

Regards!

...JRF...
changee
Occasional Advisor

Re: percentage of mirroring

i am already using the following command to see the number of 'stale' LE's.
lvdisplay -v /dev/vg01/lvol6 |grep -i stale|wc -l

what i was looking in particular is a way to find the percentage of mirroring.
i donnow wether something of this kind is available in hp.
Jov
Honored Contributor

Re: percentage of mirroring

Now some of these LVM stuff is coming back. No there is no simple command to give a mirror sync progress bar.


Jov
James R. Ferguson
Acclaimed Contributor

Re: percentage of mirroring

Hi (again):

You can easily write a simple script that finds the number of logical extents for a given logical volume passed as the script's argument. Then, loop while the number of stale extents exceeds zero, calculating and printing the percentage of non-stale extents. Sleep for 15-30 seconds during each iteration.

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: percentage of mirroring

As I said there is no such command but you have the basic ingredients in place to craft one. I rather doubt the usefullness of such a command as the lvsync takes as long as it takes (generally a few tens of minutes) and they are rare events.
If it ain't broke, I can fix that.
changee
Occasional Advisor

Re: percentage of mirroring

Thanks to all the experts for your valuable replies.
I wanted to c if theres any way of making life simple rather than grep' for stale LE's.

thanks once again.
changee
Nguyen Anh Tien
Honored Contributor

Re: percentage of mirroring

YES. There is:
Just image that your volume named /dev/vg02/lvol2

Command to check is:
#lvdisplay -v /dev/vg02/lvol2|grep stale|wc
--> to find all PE NOT COMPETED
#lvdisplay -v /dev/vg02/lvol2|wc
To count all PE on LV
HTH


HP is simple
changee
Occasional Advisor

Re: percentage of mirroring

Thank You all for your valuable suggestions..
Vivek_Pendse
Valued Contributor

Re: percentage of mirroring

# lvdisplay -v /dev/vgxx/lvolx | grep stale | wc -l
this will show you the remaining stale extenets which is to be mirrored.
& the time to complete depends on the pe extent size.
Thanks,
Vivek