linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] pvmove --abort
@ 2020-01-27 16:22 Matthias Leopold
  2020-01-27 16:38 ` Stuart D Gathman
  2020-01-28 14:34 ` Matthias Leopold
  0 siblings, 2 replies; 4+ messages in thread
From: Matthias Leopold @ 2020-01-27 16:22 UTC (permalink / raw)
  To: linux-lvm

Hi,

I consciously used "pvmove --abort" for the first time now and I'm 
astonished it doesn't behave like described in the man page. No matter 
if I've used "--atomic" for the original command, when I interrupt the 
process with "pvmove --abort" lvm always completely rolls back my copy 
operation. I would expect that if I don't use "--atomic" then "--abort" 
will result in "segments that have been moved will remain on the 
destination PV, while unmoved segments will remain on the source PV" 
(from man page). Am I missing something?

I'm using CentOS 7.7.

thx
matthias

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

* Re: [linux-lvm] pvmove --abort
  2020-01-27 16:22 [linux-lvm] pvmove --abort Matthias Leopold
@ 2020-01-27 16:38 ` Stuart D Gathman
  2020-01-27 18:29   ` Zdenek Kabelac
  2020-01-28 14:34 ` Matthias Leopold
  1 sibling, 1 reply; 4+ messages in thread
From: Stuart D Gathman @ 2020-01-27 16:38 UTC (permalink / raw)
  To: LVM general discussion and development

On Mon, 27 Jan 2020, Matthias Leopold wrote:

> I consciously used "pvmove --abort" for the first time now and I'm astonished 
> it doesn't behave like described in the man page. No matter if I've used 
> "--atomic" for the original command, when I interrupt the process with 
> "pvmove --abort" lvm always completely rolls back my copy operation. I would 
> expect that if I don't use "--atomic" then "--abort" will result in "segments 
> that have been moved will remain on the destination PV, while unmoved 
> segments will remain on the source PV" (from man page). Am I missing 
> something?

I'm not an LVM guru, but I think I got this one!  pvmove effectively
creates a mirror on the destination, and begins syncing the mirror.
Any writes to the LV go to *both* the source and destination.
When you abort, it simply discards the partially synced mirror.
When the sync is complete, it discards the source leg of the mirror
instead.

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

* Re: [linux-lvm] pvmove --abort
  2020-01-27 16:38 ` Stuart D Gathman
@ 2020-01-27 18:29   ` Zdenek Kabelac
  0 siblings, 0 replies; 4+ messages in thread
From: Zdenek Kabelac @ 2020-01-27 18:29 UTC (permalink / raw)
  To: LVM general discussion and development

Dne 27. 01. 20 v 17:38 Stuart D Gathman napsal(a):
> On Mon, 27 Jan 2020, Matthias Leopold wrote:
> 
>> I consciously used "pvmove --abort" for the first time now and I'm 
>> astonished it doesn't behave like described in the man page. No matter if 
>> I've used "--atomic" for the original command, when I interrupt the process 
>> with "pvmove --abort" lvm always completely rolls back my copy operation. I 
>> would expect that if I don't use "--atomic" then "--abort" will result in 
>> "segments that have been moved will remain on the destination PV, while 
>> unmoved segments will remain on the source PV" (from man page). Am I missing 
>> something?
> 
> I'm not an LVM guru, but I think I got this one!� pvmove effectively
> creates a mirror on the destination, and begins syncing the mirror.
> Any writes to the LV go to *both* the source and destination.
> When you abort, it simply discards the partially synced mirror.
> When the sync is complete, it discards the source leg of the mirror
> instead.
>


Yep - lvm2 does not look at mirrored percentage to estimate and recalculate
'probably' moved portion of some LVs to other 'devices'.

Either full mirror is 'completed' or the whole 'mirroring' is simply discarded.

Option --atomic is then about having finished ALL mirrors - aka whole thing is 
either finished or canceled.

Unfortunately resolving some sort of 'partial' abort (aka keep 'mirrored' 
data) is pretty complex task and such operation is so infrequently used that 
I'm not expecting implantation any time soon if ever...


Zdenek

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

* Re: [linux-lvm] pvmove --abort
  2020-01-27 16:22 [linux-lvm] pvmove --abort Matthias Leopold
  2020-01-27 16:38 ` Stuart D Gathman
@ 2020-01-28 14:34 ` Matthias Leopold
  1 sibling, 0 replies; 4+ messages in thread
From: Matthias Leopold @ 2020-01-28 14:34 UTC (permalink / raw)
  To: linux-lvm



Am 27.01.20 um 17:22 schrieb Matthias Leopold:
> Hi,
> 
> I consciously used "pvmove --abort" for the first time now and I'm 
> astonished it doesn't behave like described in the man page. No matter 
> if I've used "--atomic" for the original command, when I interrupt the 
> process with "pvmove --abort" lvm always completely rolls back my copy 
> operation. I would expect that if I don't use "--atomic" then "--abort" 
> will result in "segments that have been moved will remain on the 
> destination PV, while unmoved segments will remain on the source PV" 
> (from man page). Am I missing something?
> 
> I'm using CentOS 7.7.
> 
thx for answers. apparently I misunderstood the "--atomic" and "--abort" 
options.

matthias

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

end of thread, other threads:[~2020-01-28 14:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-27 16:22 [linux-lvm] pvmove --abort Matthias Leopold
2020-01-27 16:38 ` Stuart D Gathman
2020-01-27 18:29   ` Zdenek Kabelac
2020-01-28 14:34 ` Matthias Leopold

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).