linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* Re: [linux-lvm] LVM RAID1 syncing component
       [not found] ` <CAJCQCtQauJQkKjYL6-hxYkquCHL2yXSo4034jfiJxUPO7Nw2dQ@mail.gmail.com>
@ 2014-11-26 13:20   ` Joe Lawrence
  2014-11-27 12:52     ` Heinz Mauelshagen
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Lawrence @ 2014-11-26 13:20 UTC (permalink / raw)
  To: Chris Murphy; +Cc: linux-raid, linux-lvm

On Tue, 25 Nov 2014 22:42:38 -0700
Chris Murphy <lists@colorremedies.com> wrote:

> On Mon, Nov 24, 2014 at 9:07 PM, Joe Lawrence <joe.lawrence@stratus.com> wrote:
> > Does anyone know how its possible to determine which side of an LVM RAID 1
> > is the stale partner during RAID resync?
> >
> > In ordinary MD RAID, I believe you can check
> > /sys/block/md0/md/dev-XXX/state, but LVM RAID seems to hide those files
> > when leveraging the MD code.  I've looked though pvs/vgs/lvs manpages, but
> > can't figure anything out there either.
> 
> Rather indirectly: iotop which will show you which devices are mostly
> being read from and written to.
> 
> # lvs -a -o copy_percent
> Anything less than 100% is syncing. I think.
> 

From the manpages I see the following attribute bits:

* lvs, lv_attr bit Volume Health: (p)artial
* vgs, vg_attr bit (p)artial: one or more physical volumes belonging
       to the volume group are missing from the system
* pvs, pv_attr bit (m)issing

along with the lvs copy_percent (is this similar to sync_percent) that
you mentioned.  That's about it.

Since there seems to be no real underlying MD device, I'm assuming that
ioctls are out of the question as well.

-- Joe

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [linux-lvm] LVM RAID1 syncing component
  2014-11-26 13:20   ` [linux-lvm] LVM RAID1 syncing component Joe Lawrence
@ 2014-11-27 12:52     ` Heinz Mauelshagen
  0 siblings, 0 replies; 2+ messages in thread
From: Heinz Mauelshagen @ 2014-11-27 12:52 UTC (permalink / raw)
  To: linux-lvm


With DM/LVM it is always the last images added when converting (to)
raid1; see "lvs -a".

If you for instance convert from linear to raid1 with "lvconvert -m1 
--type raid1  $LV",
the second (and last) device named /dev/$VG/${LV}_rimage_1 will be 
resynchronized
from the first /dev/$VG/${LV}_rimage_0 (i.e. the former linear device).

As mentioned below, the copy_percent aka sync_percent tells you how far 
the sync process got
unless 100% when it's finished.

-- lvmguy


On 11/26/2014 02:20 PM, Joe Lawrence wrote:
> On Tue, 25 Nov 2014 22:42:38 -0700
> Chris Murphy <lists@colorremedies.com> wrote:
>
>> On Mon, Nov 24, 2014 at 9:07 PM, Joe Lawrence <joe.lawrence@stratus.com> wrote:
>>> Does anyone know how its possible to determine which side of an LVM RAID 1
>>> is the stale partner during RAID resync?
>>>
>>> In ordinary MD RAID, I believe you can check
>>> /sys/block/md0/md/dev-XXX/state, but LVM RAID seems to hide those files
>>> when leveraging the MD code.  I've looked though pvs/vgs/lvs manpages, but
>>> can't figure anything out there either.
>> Rather indirectly: iotop which will show you which devices are mostly
>> being read from and written to.
>>
>> # lvs -a -o copy_percent
>> Anything less than 100% is syncing. I think.
>>
> >From the manpages I see the following attribute bits:
>
> * lvs, lv_attr bit Volume Health: (p)artial
> * vgs, vg_attr bit (p)artial: one or more physical volumes belonging
>         to the volume group are missing from the system
> * pvs, pv_attr bit (m)issing
>
> along with the lvs copy_percent (is this similar to sync_percent) that
> you mentioned.  That's about it.
>
> Since there seems to be no real underlying MD device, I'm assuming that
> ioctls are out of the question as well.
>
> -- Joe
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-27 12:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <alpine.DEB.2.02.1411242255300.12886@jlaw-desktop.mno.stratus.com>
     [not found] ` <CAJCQCtQauJQkKjYL6-hxYkquCHL2yXSo4034jfiJxUPO7Nw2dQ@mail.gmail.com>
2014-11-26 13:20   ` [linux-lvm] LVM RAID1 syncing component Joe Lawrence
2014-11-27 12:52     ` Heinz Mauelshagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).