Discussion:
[linux-lvm] root: Failed query for merging percentage. Aborting merge
Roger Morton
2017-04-09 07:17:25 UTC
Permalink
I wanted to merge a old snap shot (root_snap10) of my root file system back
into root.


LV VG Attr LSize Pool Origin Data% Meta%
Move Log Cpy%Sync Convert
home_lv kubuntu-vg rwi-aor--- 1000.00g
100.00
root kubuntu-vg owi-aor--- 50.00g
100.00
root_snap10 kubuntu-vg swi-a-s--- 50.00g root 28.42
root_snap14 kubuntu-vg swi-a-s--- 50.00g root 0.00


So I boot from a USB and ensure /dev/kubuntu-vg/root is not mounted and I
issue the lvconvert command below.
And it errors with "Failed query for merging percentage. Aborting merge"

sudo lvconvert --merge /dev/kubuntu-vg/root_snap10
Merging of volume root_snap10 started
root: Failed query for merging percentage. Aborting merge

root_snap10 would appear to be gone.
I can boot to this system and the system does appear to have been restored
to the state it was when the snapshot was taken.

However, if I try snapshot root now

sudo lvcreate -s -n root_snap10b -L 50G /dev/kubuntu-vg/root
Snapshots of an origin that has a merging snapshot is not supported

So the system still thinks /dev/kubuntu-vg/root is in the middle of
merging.
Which worries me - my root file system might be in some half and half state
between two different snapshots

* Is there a way out of this conundrum? *

I do have a snapshot I took just before attempting the merge (root_snap14).
I guess I could try and merge that to root.

I am on kubuntu 16.04

lvm version
LVM version: 2.02.133(2) (2015-10-30)
Library version: 1.02.110 (2015-10-30)
Zdenek Kabelac
2017-04-10 10:54:25 UTC
Permalink
Post by Roger Morton
I wanted to merge a old snap shot (root_snap10) of my root file system back
into root.
LV VG Attr LSize Pool Origin Data% Meta% Move
Log Cpy%Sync Convert
home_lv kubuntu-vg rwi-aor--- 1000.00g
100.00
root kubuntu-vg owi-aor--- 50.00g
100.00
root_snap10 kubuntu-vg swi-a-s--- 50.00g root 28.42
root_snap14 kubuntu-vg swi-a-s--- 50.00g root 0.00
In genernal -


Once the merge IS started - you see immediately 'the merged state' and the
blocks are moved in background (they are moved back from COW to origin -
while you already see a device in 'merged-state').

While the merge IS happening you can't merge another LV.

So you need to wait till merge of snap10 is finished (0%).
Post by Roger Morton
sudo lvcreate -s -n root_snap10b -L 50G /dev/kubuntu-vg/root
Snapshots of an origin that has a merging snapshot is not supported
So the system still thinks /dev/kubuntu-vg/root is in the middle of merging.
Which worries me - my root file system might be in some half and half state
between two different snapshots
As said there is never 'half and half state' - this would clearly never work
;) you can't see old & new data mixed at the same time.


Regards


Zdenek
Roger Morton
2017-04-10 13:41:52 UTC
Permalink
Thanks for the reply Zdenek,

So just to make sure I have this correct - you think that my merge was
probably working just fine and that all I needed was patience.
I just needed to wait until the merge completed?

An answer on
http://serverfault.com/questions/559649/see-progress-of-lvm-merge tells me
that

" lvs -a: Data% columns will go down to 0% while merging "

So here is my lvs -a - Data% is nothing on root now. So I guess that means
it has completed.

***@new-desktop:~$ sudo lvs -a
LV VG Attr LSize Pool Origin Data% Meta%
Move Log Cpy%Sync Convert
home_lv kubuntu-vg rwi-aor--- 1000.00g
100.00
root kubuntu-vg owi-aor--- 50.00g
100.00


And in fact today I can create a new snapshot of root. So the merge has
completed - I guess.

So really what was that error that told me "Aborting merge" ? You are
telling me that it did not abort the merge. It was just doing it in the
back ground? I would humbly suggest that this message be changed!!
Because "Aborting merge" sure sounds like the system is giving up on doing
the merge. Which causes concerns to the joe shmo user like me.
Post by Zdenek Kabelac
Post by Roger Morton
I wanted to merge a old snap shot (root_snap10) of my root file system back
into root.
LV VG Attr LSize Pool Origin Data% Meta%
Move
Log Cpy%Sync Convert
home_lv kubuntu-vg rwi-aor--- 1000.00g
100.00
root kubuntu-vg owi-aor--- 50.00g
100.00
root_snap10 kubuntu-vg swi-a-s--- 50.00g root 28.42
root_snap14 kubuntu-vg swi-a-s--- 50.00g root 0.00
In genernal -
Once the merge IS started - you see immediately 'the merged state' and
the
blocks are moved in background (they are moved back from COW to origin -
while you already see a device in 'merged-state').
While the merge IS happening you can't merge another LV.
So you need to wait till merge of snap10 is finished (0%).
Post by Roger Morton
sudo lvcreate -s -n root_snap10b -L 50G /dev/kubuntu-vg/root
Snapshots of an origin that has a merging snapshot is not supported
So the system still thinks /dev/kubuntu-vg/root is in the middle of merging.
Which worries me - my root file system might be in some half and half state
between two different snapshots
As said there is never 'half and half state' - this would clearly never
work ;) you can't see old & new data mixed at the same time.
Regards
Zdenek
Roger Morton
2017-04-11 09:42:26 UTC
Permalink
Thanks for the reply Zdenek,

So just to make sure I have this correct - you think that my merge was
probably working just fine and that all I needed was patience.
I just needed to wait until the merge completed?

An answer on http://serverfault.com/questions/559649/see-progress-
of-lvm-merge tells me that

" lvs -a: Data% columns will go down to 0% while merging "

So here is my lvs -a - Data% is nothing on root now. So I guess that means
it has completed.

***@new-desktop:~$ sudo lvs -a
LV VG Attr LSize Pool Origin Data% Meta%
Move Log Cpy%Sync Convert
home_lv kubuntu-vg rwi-aor--- 1000.00g
100.00
root kubuntu-vg owi-aor--- 50.00g
100.00


And in fact today I can create a new snapshot of root. So the merge has
completed - I guess.

So really what was that error that told me "Aborting merge" ? You are
telling me that it did not abort the merge. It was just doing it in the
back ground? I would humbly suggest that this message be changed!!
Because "Aborting merge" sure sounds like the system is giving up on doing
the merge. Which causes concerns to the joe shmo user like me.
Post by Zdenek Kabelac
Post by Roger Morton
I wanted to merge a old snap shot (root_snap10) of my root file system
back
into root.
LV VG Attr LSize Pool Origin Data% Meta%
Move
Log Cpy%Sync Convert
home_lv kubuntu-vg rwi-aor--- 1000.00g
100.00
root kubuntu-vg owi-aor--- 50.00g
100.00
root_snap10 kubuntu-vg swi-a-s--- 50.00g root 28.42
root_snap14 kubuntu-vg swi-a-s--- 50.00g root 0.00
In genernal -
Once the merge IS started - you see immediately 'the merged state' and
the
blocks are moved in background (they are moved back from COW to origin -
while you already see a device in 'merged-state').
While the merge IS happening you can't merge another LV.
So you need to wait till merge of snap10 is finished (0%).
Post by Roger Morton
sudo lvcreate -s -n root_snap10b -L 50G /dev/kubuntu-vg/root
Snapshots of an origin that has a merging snapshot is not supported
So the system still thinks /dev/kubuntu-vg/root is in the middle of
merging.
Which worries me - my root file system might be in some half and half
state
between two different snapshots
As said there is never 'half and half state' - this would clearly never
work ;) you can't see old & new data mixed at the same time.
Regards
Zdenek
Loading...