* [linux-lvm] rc4 can't take snaphots of 0.9.1_beta7 lvs
@ 2001-10-09 15:32 Chris Mason
2001-10-09 15:58 ` Joe Thornber
0 siblings, 1 reply; 7+ messages in thread
From: Chris Mason @ 2001-10-09 15:32 UTC (permalink / raw)
To: linux-lvm
Hello everyone,
Looks like the compatibility code in rc4 doesn't properly snapshot beta7
logical volumes (2.4.10 kernel).
To reproduce, I did this:
Install 0.9.1 beta7 tools
pvcreate /dev/sdb2
vgcreate big /dev/sdb2
lvcreate --size 6G -n lv1 big
vgchange -a n
rmmod lvm-mod
Install rc4 tools
vgscan
vchange -a y
mkfs /dev/big/lv1
mount /dev/big/lv1 /data
lvcreate --size 1G -n snap --snapshot /dev/big/lv1
(trigger COW to snapshot)
And I get these messages:
lvm -- _pv_get_number failed for rdev = 0
lvm -- giving up to snapshot /dev/big/lv1 on /dev/big/snap: couldn't
prepare kiovec blocks (start probably isn't block aligned).
Now that I can reliably reproduce on stock kernels/tools, I'm trying to
trace it further. If anyone has ideas I'd love to hear them.
-chris
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] rc4 can't take snaphots of 0.9.1_beta7 lvs
2001-10-09 15:32 [linux-lvm] rc4 can't take snaphots of 0.9.1_beta7 lvs Chris Mason
@ 2001-10-09 15:58 ` Joe Thornber
2001-10-09 16:30 ` Chris Mason
0 siblings, 1 reply; 7+ messages in thread
From: Joe Thornber @ 2001-10-09 15:58 UTC (permalink / raw)
To: linux-lvm
On Tue, Oct 09, 2001 at 11:32:47AM -0400, Chris Mason wrote:
>
> Hello everyone,
>
> Looks like the compatibility code in rc4 doesn't properly snapshot beta7
> logical volumes (2.4.10 kernel).
>
> To reproduce, I did this:
>
> Install 0.9.1 beta7 tools
>
> pvcreate /dev/sdb2
> vgcreate big /dev/sdb2
> lvcreate --size 6G -n lv1 big
> vgchange -a n
> rmmod lvm-mod
>
> Install rc4 tools
> vgscan
> vchange -a y
> mkfs /dev/big/lv1
> mount /dev/big/lv1 /data
> lvcreate --size 1G -n snap --snapshot /dev/big/lv1
> (trigger COW to snapshot)
>
> And I get these messages:
>
> lvm -- _pv_get_number failed for rdev = 0
> lvm -- giving up to snapshot /dev/big/lv1 on /dev/big/snap: couldn't
> prepare kiovec blocks (start probably isn't block aligned).
>
> Now that I can reliably reproduce on stock kernels/tools, I'm trying to
> trace it further. If anyone has ideas I'd love to hear them.
Some of the betas misaligned the logical volumes. If the volumes
aren't page aligned the snapshot code (which uses kiovecs) cannot
work. You have this problem. Fixing it isn't easy; you need to
shuffle your extents up or down by the appropriate amount. No one has
written a program to do this as of yet. Sorry.
- Joe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] rc4 can't take snaphots of 0.9.1_beta7 lvs
2001-10-09 15:58 ` Joe Thornber
@ 2001-10-09 16:30 ` Chris Mason
2001-10-09 19:30 ` Joe Thornber
0 siblings, 1 reply; 7+ messages in thread
From: Chris Mason @ 2001-10-09 16:30 UTC (permalink / raw)
To: linux-lvm; +Cc: mge
On Tuesday, October 09, 2001 04:58:01 PM +0100 Joe Thornber
<thornber@btconnect.com> wrote:
>
> Some of the betas misaligned the logical volumes. If the volumes
> aren't page aligned the snapshot code (which uses kiovecs) cannot
> work. You have this problem. Fixing it isn't easy; you need to
> shuffle your extents up or down by the appropriate amount. No one has
> written a program to do this as of yet. Sorry.
>
Well, it worked in beta7 so it certainly should be possible in rc4. I'm
sorry if I missed this in the thread(s) where backwards compatibility was
discussed, but this does not work as a clean upgrade.
I really do appreciate the compatibility work done so far, but snapshots
don't count as a minor feature that can be ignored.
Joe, thanks for the quick response.
-chris
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] rc4 can't take snaphots of 0.9.1_beta7 lvs
2001-10-09 16:30 ` Chris Mason
@ 2001-10-09 19:30 ` Joe Thornber
2001-10-09 19:42 ` Joe Thornber
2001-10-09 19:48 ` Chris Mason
0 siblings, 2 replies; 7+ messages in thread
From: Joe Thornber @ 2001-10-09 19:30 UTC (permalink / raw)
To: linux-lvm
On Tue, Oct 09, 2001 at 12:30:36PM -0400, Chris Mason wrote:
>
>
> On Tuesday, October 09, 2001 04:58:01 PM +0100 Joe Thornber
> <thornber@btconnect.com> wrote:
> >
> > Some of the betas misaligned the logical volumes. If the volumes
> > aren't page aligned the snapshot code (which uses kiovecs) cannot
> > work. You have this problem. Fixing it isn't easy; you need to
> > shuffle your extents up or down by the appropriate amount. No one has
> > written a program to do this as of yet. Sorry.
> >
>
> Well, it worked in beta7
did it ? It may not have segfaulted, but did you check the data
really carefully ? After all it took a while for anyone to realise the
problem existed.
- Joe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] rc4 can't take snaphots of 0.9.1_beta7 lvs
2001-10-09 19:30 ` Joe Thornber
@ 2001-10-09 19:42 ` Joe Thornber
2001-10-09 20:01 ` Chris Mason
2001-10-09 19:48 ` Chris Mason
1 sibling, 1 reply; 7+ messages in thread
From: Joe Thornber @ 2001-10-09 19:42 UTC (permalink / raw)
To: linux-lvm
On Tue, Oct 09, 2001 at 08:30:31PM +0100, Joe Thornber wrote:
> On Tue, Oct 09, 2001 at 12:30:36PM -0400, Chris Mason wrote:
> >
> >
> > On Tuesday, October 09, 2001 04:58:01 PM +0100 Joe Thornber
> > <thornber@btconnect.com> wrote:
> > >
> > > Some of the betas misaligned the logical volumes. If the volumes
> > > aren't page aligned the snapshot code (which uses kiovecs) cannot
> > > work. You have this problem. Fixing it isn't easy; you need to
> > > shuffle your extents up or down by the appropriate amount. No one has
> > > written a program to do this as of yet. Sorry.
> > >
> >
> > Well, it worked in beta7
>
> did it ? It may not have segfaulted, but did you check the data
> really carefully ? After all it took a while for anyone to realise the
> problem existed.
Now I think about it maybe the change was made in order to allow LV's
to be used as raw devices. In which case we are being harsh on you.
I'll talk to Heinz.
- Joe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] rc4 can't take snaphots of 0.9.1_beta7 lvs
2001-10-09 19:30 ` Joe Thornber
2001-10-09 19:42 ` Joe Thornber
@ 2001-10-09 19:48 ` Chris Mason
1 sibling, 0 replies; 7+ messages in thread
From: Chris Mason @ 2001-10-09 19:48 UTC (permalink / raw)
To: linux-lvm
On Tuesday, October 09, 2001 08:30:31 PM +0100 Joe Thornber
<thornber@btconnect.com> wrote:
>> Well, it worked in beta7
>
> did it ? It may not have segfaulted, but did you check the data
> really carefully ? After all it took a while for anyone to realise the
> problem existed.
Perhaps I just got really lucky when testing beta7 and didn't end up with
any unaligned lvs. Regardless, we should be able to make new snapshots of
those volumes now. I'm less worried about supporting existing unaligned
snapshots.
So, I'm trying some things, I'll either post patches or beg for help
later ;-)
-chris
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [linux-lvm] rc4 can't take snaphots of 0.9.1_beta7 lvs
2001-10-09 19:42 ` Joe Thornber
@ 2001-10-09 20:01 ` Chris Mason
0 siblings, 0 replies; 7+ messages in thread
From: Chris Mason @ 2001-10-09 20:01 UTC (permalink / raw)
To: linux-lvm
On Tuesday, October 09, 2001 08:42:49 PM +0100 Joe Thornber
<thornber@btconnect.com> wrote:
> Now I think about it maybe the change was made in order to allow LV's
> to be used as raw devices. In which case we are being harsh on you.
> I'll talk to Heinz.
>
BTW, could you also read through lvm_snapshot_COW(), the while(chunksize)
loop seems a little wrong. What happens when it takes more than one
interation? org_start and snap_start are never incremented, so every
interation copies the same physical blcoks.
-chris
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2001-10-09 20:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-09 15:32 [linux-lvm] rc4 can't take snaphots of 0.9.1_beta7 lvs Chris Mason
2001-10-09 15:58 ` Joe Thornber
2001-10-09 16:30 ` Chris Mason
2001-10-09 19:30 ` Joe Thornber
2001-10-09 19:42 ` Joe Thornber
2001-10-09 20:01 ` Chris Mason
2001-10-09 19:48 ` Chris Mason
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).