linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Failed merge, still running?
@ 2020-01-22 10:58 Mauricio Tavares
  2020-01-22 13:06 ` Stuart D. Gathman
  2020-01-22 13:12 ` Zdenek Kabelac
  0 siblings, 2 replies; 5+ messages in thread
From: Mauricio Tavares @ 2020-01-22 10:58 UTC (permalink / raw)
  To: LVM general discussion and development

So after a botched package update I decided to revert to the snapshot
I took just before doing the update. After shutting guest down, I
started

lvconvert --merge vmhost_vg0/desktop_snap_20200121

and instead of seeing the usual percentage of how far it has
completed, I got nothing. lvs -a -o +devices shows

  LV                      VG         Attr       LSize  Pool Origin
Data%  Meta%  Move Log Cpy%Sync Convert Devices
  desktop                 vmhost_vg0 Owi-a-s--- 20.00g
                                     /dev/sdb3(14848)
  [desktop_snap_20200121] vmhost_vg0 Swi-a-s--- 10.00g      desktop 100.00

I see nothing when I do lsof against both the lv (lsof
/dev/vmhost_vg0/desktop) and its snapshot. dmsetup tells me:

[root@vmhost ~]# dmsetup info /dev/vmhost_vg0/desktop
Name:              vmhost_vg0-desktop
State:             ACTIVE
Read Ahead:        256
Tables present:    LIVE
Open count:        0
Event number:      0
Major, minor:      253, 5
Number of targets: 1
UUID: LVM-qa4WnlE7w8V7pasHwdNH6bnpz2ajYY1F2ZXwTWzpUE2r6eE2DftMGLHdeATE8XAq

[root@vmhost ~]# dmsetup info /dev/vmhost_vg0/desktop_snap_20200121
Name:              vmhost_vg0-desktop_snap_20200121
State:             ACTIVE
Read Ahead:        256
Tables present:    LIVE
Open count:        0
Event number:      0
Major, minor:      253, 15
Number of targets: 1
UUID: LVM-qa4WnlE7w8V7pasHwdNH6bnpz2ajYY1FkyXcvv8ai1Sc0q5zlsXeenYOqCPUXs3M

[root@vmhost ~]#

Before I blow that lv up, what else should I be checking?

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

* Re: [linux-lvm] Failed merge, still running?
  2020-01-22 10:58 [linux-lvm] Failed merge, still running? Mauricio Tavares
@ 2020-01-22 13:06 ` Stuart D. Gathman
  2020-01-22 13:56   ` Mauricio Tavares
  2020-01-22 13:12 ` Zdenek Kabelac
  1 sibling, 1 reply; 5+ messages in thread
From: Stuart D. Gathman @ 2020-01-22 13:06 UTC (permalink / raw)
  To: LVM general discussion and development

On Wed, 22 Jan 2020, Mauricio Tavares wrote:

> lvconvert --merge vmhost_vg0/desktop_snap_20200121
>
> and instead of seeing the usual percentage of how far it has
> completed, I got nothing. lvs -a -o +devices shows
>
>  LV                      VG         Attr       LSize  Pool Origin
> Data%  Meta%  Move Log Cpy%Sync Convert Devices
>  desktop                 vmhost_vg0 Owi-a-s--- 20.00g
>                                     /dev/sdb3(14848)
>  [desktop_snap_20200121] vmhost_vg0 Swi-a-s--- 10.00g      desktop 100.00

While not a guru, I think I can tell you the issue.  It looks like
the snapshot was full (says 100.00).  The snapshot is unusable at
that point.  Maybe it wasn't before you started the merge, and the
merge sets it to 100.00 when it starts, I haven't noticed.

> Before I blow that lv up, what else should I be checking?

What was the snapshot percent used before you started the merge?

-- 
 	      Stuart D. Gathman <stuart@gathman.org>
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

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

* Re: [linux-lvm] Failed merge, still running?
  2020-01-22 10:58 [linux-lvm] Failed merge, still running? Mauricio Tavares
  2020-01-22 13:06 ` Stuart D. Gathman
@ 2020-01-22 13:12 ` Zdenek Kabelac
  2020-01-22 13:44   ` Mauricio Tavares
  1 sibling, 1 reply; 5+ messages in thread
From: Zdenek Kabelac @ 2020-01-22 13:12 UTC (permalink / raw)
  To: LVM general discussion and development, Mauricio Tavares

Dne 22. 01. 20 v 11:58 Mauricio Tavares napsal(a):
> So after a botched package update I decided to revert to the snapshot
> I took just before doing the update. After shutting guest down, I
> started
> 
> lvconvert --merge vmhost_vg0/desktop_snap_20200121
> 
> and instead of seeing the usual percentage of how far it has
> completed, I got nothing. lvs -a -o +devices shows
> 
>    LV                      VG         Attr       LSize  Pool Origin
> Data%  Meta%  Move Log Cpy%Sync Convert Devices
>    desktop                 vmhost_vg0 Owi-a-s--- 20.00g
>                                       /dev/sdb3(14848)
>    [desktop_snap_20200121] vmhost_vg0 Swi-a-s--- 10.00g      desktop 100.00
> 
> I see nothing when I do lsof against both the lv (lsof
> /dev/vmhost_vg0/desktop) and its snapshot. dmsetup tells me:
> 
> [root@vmhost ~]# dmsetup info /dev/vmhost_vg0/desktop
> Name:              vmhost_vg0-desktop
> State:             ACTIVE
> Read Ahead:        256
> Tables present:    LIVE
> Open count:        0
> Event number:      0
> Major, minor:      253, 5
> Number of targets: 1
> UUID: LVM-qa4WnlE7w8V7pasHwdNH6bnpz2ajYY1F2ZXwTWzpUE2r6eE2DftMGLHdeATE8XAq
> 
> [root@vmhost ~]# dmsetup info /dev/vmhost_vg0/desktop_snap_20200121
> Name:              vmhost_vg0-desktop_snap_20200121
> State:             ACTIVE
> Read Ahead:        256
> Tables present:    LIVE
> Open count:        0
> Event number:      0
> Major, minor:      253, 15
> Number of targets: 1
> UUID: LVM-qa4WnlE7w8V7pasHwdNH6bnpz2ajYY1FkyXcvv8ai1Sc0q5zlsXeenYOqCPUXs3M
> 
> [root@vmhost ~]#
> 
> Before I blow that lv up, what else should I be checking?


Hi


Merging can ONLY start when devices are not in-use - so if you've issued merge 
command while devices were still opened - the 'merge' operation has
been just committed into lvm2 metadata and the actual merge would normally 
happen/start with next activation of the merged LV.

You can invoke it also by issuing 'lvchange --refresh' which may start to 
merging (if the conditions do allow the operation to start).

Regard

Zdenek

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

* Re: [linux-lvm] Failed merge, still running?
  2020-01-22 13:12 ` Zdenek Kabelac
@ 2020-01-22 13:44   ` Mauricio Tavares
  0 siblings, 0 replies; 5+ messages in thread
From: Mauricio Tavares @ 2020-01-22 13:44 UTC (permalink / raw)
  To: Zdenek Kabelac; +Cc: LVM general discussion and development

On Wed, Jan 22, 2020 at 8:12 AM Zdenek Kabelac <zkabelac@redhat.com> wrote:
>
> Dne 22. 01. 20 v 11:58 Mauricio Tavares napsal(a):
> > So after a botched package update I decided to revert to the snapshot
> > I took just before doing the update. After shutting guest down, I
> > started
> >
> > lvconvert --merge vmhost_vg0/desktop_snap_20200121
> >
> > and instead of seeing the usual percentage of how far it has
> > completed, I got nothing. lvs -a -o +devices shows
> >
> >    LV                      VG         Attr       LSize  Pool Origin
> > Data%  Meta%  Move Log Cpy%Sync Convert Devices
> >    desktop                 vmhost_vg0 Owi-a-s--- 20.00g
> >                                       /dev/sdb3(14848)
> >    [desktop_snap_20200121] vmhost_vg0 Swi-a-s--- 10.00g      desktop 100.00
> >
> > I see nothing when I do lsof against both the lv (lsof
> > /dev/vmhost_vg0/desktop) and its snapshot. dmsetup tells me:
> >
> > [root@vmhost ~]# dmsetup info /dev/vmhost_vg0/desktop
> > Name:              vmhost_vg0-desktop
> > State:             ACTIVE
> > Read Ahead:        256
> > Tables present:    LIVE
> > Open count:        0
> > Event number:      0
> > Major, minor:      253, 5
> > Number of targets: 1
> > UUID: LVM-qa4WnlE7w8V7pasHwdNH6bnpz2ajYY1F2ZXwTWzpUE2r6eE2DftMGLHdeATE8XAq
> >
> > [root@vmhost ~]# dmsetup info /dev/vmhost_vg0/desktop_snap_20200121
> > Name:              vmhost_vg0-desktop_snap_20200121
> > State:             ACTIVE
> > Read Ahead:        256
> > Tables present:    LIVE
> > Open count:        0
> > Event number:      0
> > Major, minor:      253, 15
> > Number of targets: 1
> > UUID: LVM-qa4WnlE7w8V7pasHwdNH6bnpz2ajYY1FkyXcvv8ai1Sc0q5zlsXeenYOqCPUXs3M
> >
> > [root@vmhost ~]#
> >
> > Before I blow that lv up, what else should I be checking?
>
>
> Hi
>
>
> Merging can ONLY start when devices are not in-use - so if you've issued merge
> command while devices were still opened - the 'merge' operation has
> been just committed into lvm2 metadata and the actual merge would normally
> happen/start with next activation of the merged LV.
>
      Interesting. I guess when I told guest to shutdown I did not
wait for it to be completely shutdown as far as kvm was concerned; it
might have been doing some housekeeping when I unleashed lvconvert.

> You can invoke it also by issuing 'lvchange --refresh' which may start to
> merging (if the conditions do allow the operation to start).
>
      Thanks! As soon as I ran

lvchange --refresh vmhost_vg0/desktop

I was able to see progress:

[root@vmhost ~]# lvs -a -o +devices
[desktop_snap_20200121] vmhost_vg0 Swi-a-s--- 10.00g      desktop 30.78
[desktop_snap_20200121] vmhost_vg0 Swi-a-s--- 10.00g      desktop 30.76
[...]

After a few more minutes, the vm gues was "rewinded." Now I can run it again.

Thanks again!

> Regard
>
> Zdenek
>
>

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

* Re: [linux-lvm] Failed merge, still running?
  2020-01-22 13:06 ` Stuart D. Gathman
@ 2020-01-22 13:56   ` Mauricio Tavares
  0 siblings, 0 replies; 5+ messages in thread
From: Mauricio Tavares @ 2020-01-22 13:56 UTC (permalink / raw)
  To: LVM general discussion and development

On Wed, Jan 22, 2020 at 8:50 AM Stuart D. Gathman <stuart@gathman.org> wrote:
>
> On Wed, 22 Jan 2020, Mauricio Tavares wrote:
>
> > lvconvert --merge vmhost_vg0/desktop_snap_20200121
> >
> > and instead of seeing the usual percentage of how far it has
> > completed, I got nothing. lvs -a -o +devices shows
> >
> >  LV                      VG         Attr       LSize  Pool Origin
> > Data%  Meta%  Move Log Cpy%Sync Convert Devices
> >  desktop                 vmhost_vg0 Owi-a-s--- 20.00g
> >                                     /dev/sdb3(14848)
> >  [desktop_snap_20200121] vmhost_vg0 Swi-a-s--- 10.00g      desktop 100.00
>
> While not a guru, I think I can tell you the issue.  It looks like
> the snapshot was full (says 100.00).  The snapshot is unusable at
> that point.  Maybe it wasn't before you started the merge, and the
> merge sets it to 100.00 when it starts, I haven't noticed.
>
> > Before I blow that lv up, what else should I be checking?
>
> What was the snapshot percent used before you started the merge?
>
      Based on the 3 times I tried to do the patching (unsuccessfully)
and then rewind and try again, I would say under 30%. I had shut guest
down, created snapshot, boot it up, and then let it try to download
some 2G worth of patches. I do not know why it is showing 100% above.

> --
>               Stuart D. Gathman <stuart@gathman.org>
> "Confutatis maledictis, flammis acribus addictis" - background song for
> a Microsoft sponsored "Where do you want to go from here?" commercial.
>
>
> _______________________________________________
> 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] 5+ messages in thread

end of thread, other threads:[~2020-01-22 13:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-22 10:58 [linux-lvm] Failed merge, still running? Mauricio Tavares
2020-01-22 13:06 ` Stuart D. Gathman
2020-01-22 13:56   ` Mauricio Tavares
2020-01-22 13:12 ` Zdenek Kabelac
2020-01-22 13:44   ` Mauricio Tavares

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