linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Snapshot merge in the background?
@ 2010-10-20 20:05 Phillip Susi
  2010-10-20 20:55 ` Mike Snitzer
  0 siblings, 1 reply; 4+ messages in thread
From: Phillip Susi @ 2010-10-20 20:05 UTC (permalink / raw)
  To: LVM general discussion and development

Last night I tested out the new snapshot merge feature by taking a
snapshot, running a dist-upgrade, then lvconvert --merge.  After
rebooting, it merged the snapshot back into the origin, but it waited
for the merge to complete before finishing the boot.  Can't the merge be
completed in the background while the volume is mounted and the boot
continues?

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

* Re: [linux-lvm] Snapshot merge in the background?
  2010-10-20 20:05 [linux-lvm] Snapshot merge in the background? Phillip Susi
@ 2010-10-20 20:55 ` Mike Snitzer
  2010-10-20 21:08   ` Phillip Susi
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Snitzer @ 2010-10-20 20:55 UTC (permalink / raw)
  To: LVM general discussion and development

On Wed, Oct 20 2010 at  4:05pm -0400,
Phillip Susi <psusi@cfl.rr.com> wrote:

> Last night I tested out the new snapshot merge feature by taking a
> snapshot, running a dist-upgrade, then lvconvert --merge.  After
> rebooting, it merged the snapshot back into the origin, but it waited
> for the merge to complete before finishing the boot.

"Before finishing the boot"... can you be more specific?  Where was it
stopped waiting for a snapshot merge?  How did you know it was waiting
for snapshot merge?  Which distro are you using?

> Can't the merge be completed in the background while the volume is
> mounted and the boot continues?

Yes that is how it _should_ work.

Mike

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

* Re: [linux-lvm] Snapshot merge in the background?
  2010-10-20 20:55 ` Mike Snitzer
@ 2010-10-20 21:08   ` Phillip Susi
  2010-10-22  0:32     ` Phillip Susi
  0 siblings, 1 reply; 4+ messages in thread
From: Phillip Susi @ 2010-10-20 21:08 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: Mike Snitzer

On 10/20/2010 4:55 PM, Mike Snitzer wrote:
> "Before finishing the boot"... can you be more specific?  Where was it
> stopped waiting for a snapshot merge?  How did you know it was waiting
> for snapshot merge?  Which distro are you using?

It seemed to be stopped waiting for the initial activation of the root
lv before continuing with the boot.  This manifested as a several minute
delay before the gui came up, and when I checked the bootchart image, it
was indeed sitting running lvm for a long time before everything else.
This is with Ubuntu 10.10.

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

* Re: [linux-lvm] Snapshot merge in the background?
  2010-10-20 21:08   ` Phillip Susi
@ 2010-10-22  0:32     ` Phillip Susi
  0 siblings, 0 replies; 4+ messages in thread
From: Phillip Susi @ 2010-10-22  0:32 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: Mike Snitzer

After some more testing, I have found that the udev rule was running 
lvchange -a y whenever a PV is added or changed.  It seems that nearly 
any lvm command causes a change event to be emitted on the PVs.  Why is 
this?  After I removed the |change clause from the udev rule so that 
lvchange is no longer run on these change events, I now see that indeed, 
running lvchange -a manually to reactivate an origin volume with a 
pending merge does cause it to activate and merge in the background, 
during which time it can be mounted.  Strangely though, while the merge 
is taking place in the background, I still see change events on the 
underlying PVs being emitted.  Also running lvs while the merge is still 
on going reports IO errors trying to read the snapshot volume, which 
makes sense since according to dmsetup table, it consists only of the 
error target.

With the change to the udev rule, the system boots immediately and 
finishes the merge in the background, as it should, leading me to 
conclude that the problem was all of the udev event ping-pong causing 
udevadm settle to hold up the boot.

On 10/20/2010 05:08 PM, Phillip Susi wrote:
> On 10/20/2010 4:55 PM, Mike Snitzer wrote:
>> "Before finishing the boot"... can you be more specific?  Where was it
>> stopped waiting for a snapshot merge?  How did you know it was waiting
>> for snapshot merge?  Which distro are you using?
>
> It seemed to be stopped waiting for the initial activation of the root
> lv before continuing with the boot.  This manifested as a several minute
> delay before the gui came up, and when I checked the bootchart image, it
> was indeed sitting running lvm for a long time before everything else.
> This is with Ubuntu 10.10.

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

end of thread, other threads:[~2010-10-22  0:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-20 20:05 [linux-lvm] Snapshot merge in the background? Phillip Susi
2010-10-20 20:55 ` Mike Snitzer
2010-10-20 21:08   ` Phillip Susi
2010-10-22  0:32     ` Phillip Susi

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