* [linux-lvm] Snapshot resizing bug (LVM1)
@ 2003-02-05 12:08 Dale J. Stephenson
2003-02-06 4:31 ` Heinz J . Mauelshagen
0 siblings, 1 reply; 7+ messages in thread
From: Dale J. Stephenson @ 2003-02-05 12:08 UTC (permalink / raw)
To: linux-lvm
I've discovered a problem with using lvreduce/lvextend on LVM. The
resized snapshot will have a new exception table and hash table
allocated for it. But lvm_hash_link will be called for these in a loop
that depends on the lv_remap_ptr counter passed down from userspace --
which will always be zero. The result is that existing COW on the
snapshot are ignored, and the contents of the snapshot can magically
change to reflect the current state of the source volume. Reboot (or
deactivating and reactivating the volume group) should solve the
problem, although it may be possible in the meantime to store a new COW
exception for a chunk that already has one.
The fix is simple:
--- lvm.c.orig Tue Feb 4 18:36:58 2003
+++ lvm.c Tue Feb 4 18:43:26 2003
@@ -2792,7 +2792,7 @@
old_lv->lv_snapshot_hash_mask =
new_lv->lv_snapshot_hash_mask;
- for (e = 0; e < new_lv->lv_remap_ptr; e++)
+ for (e = 0; e < old_lv->lv_remap_ptr; e++)
lvm_hash_link(new_lv->lv_block_exception + e,
new_lv->lv_block_exception[e].
rdev_org,
As a side note, why not revert the main LVM cvs tree back to LVM 1.0.6?
1.1 is dead.
Dale J. Stephenson
dalestephenson@mac.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] Snapshot resizing bug (LVM1)
2003-02-05 12:08 [linux-lvm] Snapshot resizing bug (LVM1) Dale J. Stephenson
@ 2003-02-06 4:31 ` Heinz J . Mauelshagen
2003-02-06 6:03 ` Jon Bendtsen
0 siblings, 1 reply; 7+ messages in thread
From: Heinz J . Mauelshagen @ 2003-02-06 4:31 UTC (permalink / raw)
To: linux-lvm
Dale,
thanks for finding this bug.
Obviously people don't resize populated snapshots very often or we'ld
seen this one much earlier ;)
Your fix is in LVM_BRANCH_1-0 for everybody to test.
We plan to revert CVS and will announce the change seperately.
Regards,
Heinz -- The LVM Guy --
On Wed, Feb 05, 2003 at 01:07:01PM -0500, Dale J. Stephenson wrote:
> I've discovered a problem with using lvreduce/lvextend on LVM. The
> resized snapshot will have a new exception table and hash table
> allocated for it. But lvm_hash_link will be called for these in a loop
> that depends on the lv_remap_ptr counter passed down from userspace --
> which will always be zero. The result is that existing COW on the
> snapshot are ignored, and the contents of the snapshot can magically
> change to reflect the current state of the source volume. Reboot (or
> deactivating and reactivating the volume group) should solve the
> problem, although it may be possible in the meantime to store a new COW
> exception for a chunk that already has one.
>
> The fix is simple:
>
> --- lvm.c.orig Tue Feb 4 18:36:58 2003
> +++ lvm.c Tue Feb 4 18:43:26 2003
> @@ -2792,7 +2792,7 @@
> old_lv->lv_snapshot_hash_mask =
> new_lv->lv_snapshot_hash_mask;
>
> - for (e = 0; e < new_lv->lv_remap_ptr; e++)
> + for (e = 0; e < old_lv->lv_remap_ptr; e++)
> lvm_hash_link(new_lv->lv_block_exception + e,
> new_lv->lv_block_exception[e].
> rdev_org,
>
> As a side note, why not revert the main LVM cvs tree back to LVM 1.0.6?
> 1.1 is dead.
>
> Dale J. Stephenson
> dalestephenson@mac.com
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Am Sonnenhang 11
56242 Marienrachdorf
Germany
Mauelshagen@Sistina.com +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] Snapshot resizing bug (LVM1)
2003-02-06 4:31 ` Heinz J . Mauelshagen
@ 2003-02-06 6:03 ` Jon Bendtsen
2003-02-06 12:45 ` Heinz J . Mauelshagen
0 siblings, 1 reply; 7+ messages in thread
From: Jon Bendtsen @ 2003-02-06 6:03 UTC (permalink / raw)
To: linux-lvm
"Heinz J . Mauelshagen" wrote:
>
> Dale,
>
> thanks for finding this bug.
yeah, thanks from me too, i plan to TEST it.
> Obviously people don't resize populated snapshots very often or we'ld
> seen this one much earlier ;)
thats not true. I tried to resize polulated snapshots quite often, like
several times a day, but i gave up on that because it didnt work. Being
production machines they need to be stable.
So, why didnt i report the bug well... i didnt feel i had the time to
play arround with our production machines, and i have nowhere to test
it, so i just stopped doing snapshots. But i did email this mailing list
and described the usage and the errors i got. Not a patch no, but i feel
it was reported arround the end of october where i ran into it. Possibly
someone else did it before me.
See these links for more info:
http://lists.sistina.com/pipermail/linux-lvm/2002-October/012602.html
Okay, maybe i wasnt clear on reporting that problems continued after
downgrading, sorry about that.
http://lists.sistina.com/pipermail/linux-lvm/2002-October/012631.html
\x03
Not trying to sound negative and all it's great that this bug is gone,
but i feel that the effects of this bug was seen before. Maybe what is
needed is a better way to see what is bugs and what is
missconfiguration.
JonB
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] Snapshot resizing bug (LVM1)
2003-02-06 6:03 ` Jon Bendtsen
@ 2003-02-06 12:45 ` Heinz J . Mauelshagen
2003-02-12 13:27 ` Debian User
0 siblings, 1 reply; 7+ messages in thread
From: Heinz J . Mauelshagen @ 2003-02-06 12:45 UTC (permalink / raw)
To: linux-lvm
On Thu, Feb 06, 2003 at 01:02:39PM +0100, Jon Bendtsen wrote:
> "Heinz J . Mauelshagen" wrote:
> >
> > Dale,
> >
> > thanks for finding this bug.
>
> yeah, thanks from me too, i plan to TEST it.
Good :)
Please checkout from MAIN.
We reverted 1.0.6 as mentioned in my other email today.
>
>
> > Obviously people don't resize populated snapshots very often or we'ld
> > seen this one much earlier ;)
>
> thats not true. I tried to resize polulated snapshots quite often, like
> several times a day, but i gave up on that because it didnt work. Being
> production machines they need to be stable.
> So, why didnt i report the bug well... i didnt feel i had the time to
> play arround with our production machines, and i have nowhere to test
> it, so i just stopped doing snapshots. But i did email this mailing list
> and described the usage and the errors i got. Not a patch no, but i feel
> it was reported arround the end of october where i ran into it. Possibly
> someone else did it before me.
> See these links for more info:
> http://lists.sistina.com/pipermail/linux-lvm/2002-October/012602.html
>
> Okay, maybe i wasnt clear on reporting that problems continued after
> downgrading, sorry about that.
> http://lists.sistina.com/pipermail/linux-lvm/2002-October/012631.html
> \x03
>
> Not trying to sound negative and all it's great that this bug is gone,
> but i feel that the effects of this bug was seen before. Maybe what is
> needed is a better way to see what is bugs and what is
> missconfiguration.
Maybe we missed the report(s) ? :(
Anyway, it should be gone with your help.
Thanks,
Heinz -- The LVM Guy --
>
>
>
>
> JonB
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Am Sonnenhang 11
56242 Marienrachdorf
Germany
Mauelshagen@Sistina.com +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] Snapshot resizing bug (LVM1)
2003-02-06 12:45 ` Heinz J . Mauelshagen
@ 2003-02-12 13:27 ` Debian User
2003-02-13 6:15 ` Heinz J . Mauelshagen
0 siblings, 1 reply; 7+ messages in thread
From: Debian User @ 2003-02-12 13:27 UTC (permalink / raw)
To: linux-lvm
"Heinz J . Mauelshagen" wrote:
>
> On Thu, Feb 06, 2003 at 01:02:39PM +0100, Jon Bendtsen wrote:
> > "Heinz J . Mauelshagen" wrote:
> > >
> > > Dale,
> > >
> > > thanks for finding this bug.
> >
> > yeah, thanks from me too, i plan to TEST it.
>
> Good :)
>
> Please checkout from MAIN.
> We reverted 1.0.6 as mentioned in my other email today.
so, i got to test it, and... i dont think i did the correct CVS.
i followed what was written on
http://www.sistina.com/products_CVS.htm
but it appears that the patch isnt in, or that i have lvm-rc1 ?
from the changelog
"
Logical Volume Manager Changelog
Changelog for 1.1-rc1 to 1.1-rc2
"
hmmm
How do i checkout MAIN ?
I did try writing MAIN instead of LVM, but that failed.
JonB
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] Snapshot resizing bug (LVM1)
2003-02-12 13:27 ` Debian User
@ 2003-02-13 6:15 ` Heinz J . Mauelshagen
2003-02-13 17:16 ` Heinz J . Mauelshagen
0 siblings, 1 reply; 7+ messages in thread
From: Heinz J . Mauelshagen @ 2003-02-13 6:15 UTC (permalink / raw)
To: linux-lvm
On Wed, Feb 12, 2003 at 08:26:15PM +0100, Debian User wrote:
> "Heinz J . Mauelshagen" wrote:
> >
> > On Thu, Feb 06, 2003 at 01:02:39PM +0100, Jon Bendtsen wrote:
> > > "Heinz J . Mauelshagen" wrote:
> > > >
> > > > Dale,
> > > >
> > > > thanks for finding this bug.
> > >
> > > yeah, thanks from me too, i plan to TEST it.
> >
> > Good :)
> >
> > Please checkout from MAIN.
> > We reverted 1.0.6 as mentioned in my other email today.
>
> so, i got to test it, and... i dont think i did the correct CVS.
> i followed what was written on
> http://www.sistina.com/products_CVS.htm
>
> but it appears that the patch isnt in, or that i have lvm-rc1 ?
> from the changelog
>
> "
> Logical Volume Manager Changelog
>
> Changelog for 1.1-rc1 to 1.1-rc2
>
> "
>
> hmmm
> How do i checkout MAIN ?
> I did try writing MAIN instead of LVM, but that failed.
Obviously an update problem with our external CVS.
Will be fixed later today.
>
>
>
>
> JonB
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
--
Regards,
Heinz -- The LVM Guy --
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Am Sonnenhang 11
56242 Marienrachdorf
Germany
Mauelshagen@Sistina.com +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] Snapshot resizing bug (LVM1)
2003-02-13 6:15 ` Heinz J . Mauelshagen
@ 2003-02-13 17:16 ` Heinz J . Mauelshagen
0 siblings, 0 replies; 7+ messages in thread
From: Heinz J . Mauelshagen @ 2003-02-13 17:16 UTC (permalink / raw)
To: linux-lvm
On Thu, Feb 13, 2003 at 01:11:05PM +0100, Heinz J . Mauelshagen wrote:
> On Wed, Feb 12, 2003 at 08:26:15PM +0100, Debian User wrote:
> > "Heinz J . Mauelshagen" wrote:
> > >
> > > On Thu, Feb 06, 2003 at 01:02:39PM +0100, Jon Bendtsen wrote:
> > > > "Heinz J . Mauelshagen" wrote:
> > > > >
> > > > > Dale,
> > > > >
> > > > > thanks for finding this bug.
> > > >
> > > > yeah, thanks from me too, i plan to TEST it.
> > >
> > > Good :)
> > >
> > > Please checkout from MAIN.
> > > We reverted 1.0.6 as mentioned in my other email today.
> >
> > so, i got to test it, and... i dont think i did the correct CVS.
> > i followed what was written on
> > http://www.sistina.com/products_CVS.htm
> >
> > but it appears that the patch isnt in, or that i have lvm-rc1 ?
> > from the changelog
> >
> > "
> > Logical Volume Manager Changelog
> >
> > Changelog for 1.1-rc1 to 1.1-rc2
> >
> > "
> >
> > hmmm
> > How do i checkout MAIN ?
> > I did try writing MAIN instead of LVM, but that failed.
>
> Obviously an update problem with our external CVS.
> Will be fixed later today.
Should be fixed now.
Please try again.
> >
> > JonB
> >
> > _______________________________________________
> > linux-lvm mailing list
> > linux-lvm@sistina.com
> > http://lists.sistina.com/mailman/listinfo/linux-lvm
> > read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Regards,
Heinz -- The LVM Guy --
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Am Sonnenhang 11
56242 Marienrachdorf
Germany
Mauelshagen@Sistina.com +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-02-13 17:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-05 12:08 [linux-lvm] Snapshot resizing bug (LVM1) Dale J. Stephenson
2003-02-06 4:31 ` Heinz J . Mauelshagen
2003-02-06 6:03 ` Jon Bendtsen
2003-02-06 12:45 ` Heinz J . Mauelshagen
2003-02-12 13:27 ` Debian User
2003-02-13 6:15 ` Heinz J . Mauelshagen
2003-02-13 17:16 ` Heinz J . Mauelshagen
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.