All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Ren <zren@suse.com>
To: lvm-devel@redhat.com
Subject: master - pvmove: reinstantiate clustered pvmove
Date: Thu, 8 Feb 2018 09:45:16 +0800	[thread overview]
Message-ID: <8bec25ed-2510-a31e-ba01-6bfd26257b52@suse.com> (raw)
In-Reply-To: <d278fca1-00a6-d29b-925f-047aed4c949e@redhat.com>

Hi Zdenek,

Thanks for your response :)

On 02/08/2018 12:49 AM, Zdenek Kabelac wrote:
> Dne 7.2.2018 v 08:17 Eric Ren napsal(a):
>> Hello Zdenek,
>>
>> I've tried this patch with clvmd and cmirrord running, and all LVs in 
>> clustered VG being activated
>> on both nodes. But, pvmove still cannot work as expect - move data on 
>> underlying PV of the the
>> non-exclusive activated LV.
>>
>> ==========
>> tw1:~ # pgrep -a mirrord
>> 11931 cmirrord
>> tw1:~ # pgrep -a clvmd
>> 11748 /usr/sbin/clvmd -T90 -d0
>>
>> tw1:~ # vgs -o+vg_clustered vgtest2
>> ???? VG????? #PV #LV #SN Attr?? VSize VFree Clustered
>> ???? vgtest2?? 2?? 2?? 0 wz--nc 9.30g 6.30g? clustered
>> tw1:~ # lvs -o+lv_active_exclusively,lv_active_locally vgtest2
>> ???? LV?? VG????? Attr?????? LSize Pool Origin Data%? Meta% Move Log 
>> Cpy%Sync Convert ActExcl??? ActLocal
>> ???? lv1? vgtest2 -wi-a----- 2.00g active locally
>> ???? lv2? vgtest2 -wi-a----- 1.00g active locally
>> tw1:~ # pvs -S vg_name=vgtest2
>> ???? PV???????? VG????? Fmt? Attr PSize PFree
>> ???? /dev/vdb1? vgtest2 lvm2 a--? 4.65g 4.65g
>> ???? /dev/vdb2? vgtest2 lvm2 a--? 4.65g 1.65g
>>
>> tw1:~ # pvmove /dev/vdb2
>> ???? Cannot move in clustered VG vgtest2, clustered mirror (cmirror) 
>> not detected and LVs are activated non-exclusively.
>> ============
>>
>>
>> GDB it a little bit. The problem seems because:
>>
>> _pvmove_target_present(cmd, 1)
>>
>>
>> will always return 0 - "not found".
>>
>> During one pvmove command, the _pvmove_target_present() is invoked 
>> twice. At first call,
>> "segtype->ops->target_present()", i.e _mirrored_target_present() will 
>> set "_mirrored_checked = 0".
>>
>> At the second call, _mirrored_target_present() will not go through 
>> the following code to get the
>> "_mirror_attributes":
>>
>
>
> Hi
>
> I think I've intentionally kept away locally active LVs,

You mean so far pvmove can only work like this:

- pvmove on the node that the LV is _not_active, but the LV can
 ?be active on another node, so that users will not suffer downtime
 ?issue

Do I understand it right?

But it still cannot work in such case that doing pvmove the inactive-LV 
node.

====
tw1:~ # lvs
 ??? LV?? VG????? Attr?????? LSize Pool Origin Data%? Meta%? Move Log 
Cpy%Sync Convert
 ??? lv1? vgtest2 -wi------- 2.00g
 ??? lv2? vgtest2 -wi------- 1.00g
tw2:~ # lvs
 ??? LV?? VG????? Attr?????? LSize Pool Origin Data%? Meta%? Move Log 
Cpy%Sync Convert
 ??? lv1? vgtest2 -wi-a----- 2.00g
 ??? lv2? vgtest2 -wi-a----- 1.00g

tw1:~ # pvmove /dev/vdb1
 ??? Cannot move in clustered VG vgtest2, clustered mirror (cmirror) not 
detected and LVs are activated non-exclusively.
====

It even cannot work on the node that the LV is exclusively activated:

====
tw1:~ # vgchange -aly vgtest2
 ??? 2 logical volume(s) in volume group "vgtest2" now active
tw2:~ # lvs
 ??? LV?? VG????? Attr?????? LSize Pool Origin Data%? Meta%? Move Log 
Cpy%Sync Convert
 ??? lv1? vgtest2 -wi------- 2.00g
 ??? lv2? vgtest2 -wi------- 1.00g

tw1:~ # lvs
 ??? LV?? VG????? Attr?????? LSize Pool Origin Data%? Meta%? Move Log 
Cpy%Sync Convert
 ??? lv1? vgtest2 -wi-a----- 2.00g
 ??? lv2? vgtest2 -wi-a----- 1.00g
tw1:~ # pvmove /dev/vdb1
 ??? Cannot move in clustered VG vgtest2, clustered mirror (cmirror) not 
detected and LVs are activated non-exclusively.
====


> but in your case where LV is locally active just on a single node,

Actually, the LVs in vgtest2 are active on both of two nodes:

====
tw1:~ # lvs
 ??? LV?? VG????? Attr?????? LSize Pool Origin Data%? Meta%? Move Log 
Cpy%Sync Convert
 ??? lv1? vgtest2 -wi-a----- 2.00g
 ??? lv2? vgtest2 -wi-a----- 1.00g
tw1:~ # lvs 
-o+lv_active_exclusively,lv_active_locally,lv_active_remotely vgtest2
 ??? LV?? VG????? Attr?????? LSize Pool Origin Data%? Meta%? Move Log 
Cpy%Sync Convert ActExcl??? ActLocal?????? ActRemote
 ??? lv1? vgtest2 -wi-a----- 2.00g active locally??? unknown
 ??? lv2? vgtest2 -wi-a----- 1.00g active locally??? unknown

tw2:~ # lvs vgtest2
 ??? LV?? VG????? Attr?????? LSize Pool Origin Data%? Meta%? Move Log 
Cpy%Sync Convert
 ??? lv1? vgtest2 -wi-a----- 2.00g
 ??? lv2? vgtest2 -wi-a----- 1.00g
tw2:~ # lvs 
-o+lv_active_exclusively,lv_active_locally,lv_active_remotely vgtest2
 ??? LV?? VG????? Attr?????? LSize Pool Origin Data%? Meta%? Move Log 
Cpy%Sync Convert ActExcl??? ActLocal?????? ActRemote
 ??? lv1? vgtest2 -wi-a----- 2.00g active locally??? unknown
 ??? lv2? vgtest2 -wi-a----- 1.00g
====

But, I don't know why the "ActRemote" is "unknown" :)

> it still possible we can use such LV for pvmove - although during
> pvmove 'restart' it? will be only? 'exclusively' activated.

Yes, I also noticed this interesting behavior - I'm doubt that it might 
bring
trouble in HA cluster if cluster FS is sitting on that LV.

>
> I'll try to think how to 'integrate' back support for? locally
> active LVs on a single node back as well.

Sorry, I'm little puzzled that what is our expectation scenarios that 
pvmove can be used :-/

You mean pvmove can only support for concurrent LV activation on 
multiple nodes so far?
But, it seems not working on my setup as described above :)

Thanks,
Eric



  reply	other threads:[~2018-02-08  1:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-01 20:58 master - pvmove: reinstantiate clustered pvmove Zdenek Kabelac
2018-02-07  7:17 ` Eric Ren
2018-02-07 10:06   ` Eric Ren
2018-02-07 16:49   ` Zdenek Kabelac
2018-02-08  1:45     ` Eric Ren [this message]
2018-02-08 12:42       ` Zdenek Kabelac
2018-02-09  2:21         ` Eric Ren
2018-02-09 12:05           ` Zdenek Kabelac
2018-02-09 13:29             ` Eric Ren
2018-02-15 13:20               ` Zdenek Kabelac
2018-02-23  8:40                 ` Eric Ren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8bec25ed-2510-a31e-ba01-6bfd26257b52@suse.com \
    --to=zren@suse.com \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.