Search This Blog

Thursday, July 10, 2014

Monitor volume group synchronization

Monitor volume group synchronization
If you need to monitor the advance of the volume group synchronization, you can use this script to quickly monitor extends that are still "stale". Running this command should give a lower value each iteration until it reaches zero.

while true
do
   for lv in $(vgdisplay -v <vgname> | grep "LV Name" | awk '{print $3}')
   do
      lvdisplay -v $lv
   done | grep -i stale | wc -l
    sleep 10
done


Example:

while true
do
   for lv in $(vgdisplay -v vg00 | grep "LV Name" | awk '{print $3}')
   do
      lvdisplay -v $lv
   done | grep -i stale | wc -ldone | grep -i stale | wc -l
   sleep 10
done
5
0

No comments:

Post a Comment