linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] [BUG] segmentation fault on snapshot with beta8
@ 2001-07-26 12:27 Ed Tomlinson
  2001-07-27 15:21 ` AJ Lewis
  0 siblings, 1 reply; 5+ messages in thread
From: Ed Tomlinson @ 2001-07-26 12:27 UTC (permalink / raw)
  To: linux-lvm

Hi,

After upgrading to beta8 I tried to backup.   I do this by taking a 
snapshot and backing it up.  

oscar# lvcreate -L1G -s -n snap /dev/lv/root /dev/hda3
lvcreate -- WARNING: the snapshot will be automatically disabled once it gets full
lvcreate -- INFO: using default snapshot chunk size of 64.00 KB for "/dev/lv/snap"
lvcreate -- doing automatic backup of "lv"
lvcreate -- logical volume "/dev/lv/snap" successfully created

oscar# mount /snap
oscar# time tob -f - -full snap > snap-0725.tob
 Ok, got resource /etc/tob/tob.rc.
 Using alternative backup device -
 This is the tob script.
 About to make a full backup of volume snap.
 Building list of all files of volume snap.. patience.
 Now starting backup program to write to -.
/sbin/tob: line -142:  3954 Segmentation fault      afio $BLOCKSIZE $BUFFERBLK $GZIPFACTOR -o $BACKUPDEV <$FILELIST
  Fatal tob error: backup command failed.
 Bye.
tob -f - -full snap > snap-0725.tob  1134.65s user 153.65s system 75% cpu 28:37.45 total

tob is a wrapper script for afio that can installed from a debian
package.  The snapshotted fs is reiserfs.  I have the vfs locking
patch installed along with:

--------
diff -Nru a/fs/reiserfs/super.c b/fs/reiserfs/super.c
--- a/fs/reiserfs/super.c       Sun Apr 29 20:44:38 2001
+++ b/fs/reiserfs/super.c       Sun Apr 29 20:44:38 2001
@@ -80,7 +80,7 @@
     reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), 1);
     journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB (s));
     reiserfs_block_writes(&th) ;
-    journal_end(&th, s, 1) ;
+    journal_end_sync(&th, s, 1) ;
   }
   s->s_dirt = dirty;
   unlock_kernel() ;
--------

which may or may not be needed with beta8 - without it beta7 and friends would
often fail to snapshot.  ie the lvcreate would work but mounting the lv would
fail.  The patch is from Chris Mason and was created shortly after the VFS locking
update for 2.4.4

The snapshot is unusable after the error.  Even ls gets a segfault, umount /snap hangs.
After killing it /snap is busy an cannot be umounted.  lvdisplay shows:

oscar# lvdisplay snap
--- Logical volume ---
LV Name                /dev/lv/snap
VG Name                lv
LV Write Access        read only
LV snapshot status     INACTIVE destination for /dev/lv/root
LV Status              NOT available
LV #                   5
# open                 1
LV Size                14.00 GB
Current LE             3584
Allocated LE           3584
snapshot chunk size    64.00 KB
Allocated to snapshot  100.00% [1008.00 MB/1008.00 MB]
Allocated to COW-table 16.00 MB
Allocation             next free
Read ahead sectors     120
Block device           58:4

which is strange since the snapshot, created with 1G, should take about a day to
fill (or did with beta7).

kernel is 2.4.7

Ideas?
Ed Tomlinson

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

* Re: [linux-lvm] [BUG] segmentation fault on snapshot with beta8
  2001-07-26 12:27 [linux-lvm] [BUG] segmentation fault on snapshot with beta8 Ed Tomlinson
@ 2001-07-27 15:21 ` AJ Lewis
  2001-07-27 16:27   ` Ed Tomlinson
  0 siblings, 1 reply; 5+ messages in thread
From: AJ Lewis @ 2001-07-27 15:21 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 2084 bytes --]

On Thu, Jul 26, 2001 at 08:27:38AM -0400, Ed Tomlinson wrote:
> tob is a wrapper script for afio that can installed from a debian
> package.  The snapshotted fs is reiserfs.  I have the vfs locking
> patch installed along with:
> 
> --------
> diff -Nru a/fs/reiserfs/super.c b/fs/reiserfs/super.c
> --- a/fs/reiserfs/super.c       Sun Apr 29 20:44:38 2001
> +++ b/fs/reiserfs/super.c       Sun Apr 29 20:44:38 2001
> @@ -80,7 +80,7 @@
>      reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), 1);
>      journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB (s));
>      reiserfs_block_writes(&th) ;
> -    journal_end(&th, s, 1) ;
> +    journal_end_sync(&th, s, 1) ;
>    }
>    s->s_dirt = dirty;
>    unlock_kernel() ;
> --------

Hmm...trying to reproduce this on 2.4.6...and after applying the lvm 0.9.1
beta8 patch, the linux-2.4.4-VFS-lock patch and the above patch (in that
order), I still get this when trying to create and mount a snapshot:

reiserfs: checking transaction log (device 3a:00) ...
Using r5 hash to sort names
ReiserFS version 3.6.25
reiserfs: checking transaction log (device 3a:01) ...
clm-2076: device is readonly, unable to replay log
Replay Failure, unable to mount
reiserfs_read_super: unable to initialize journal space

Is there some other patch or magic I need to do to get ReiserFS snapshots
working?  I thought the VFS-lock patch was supposed to fix that...

Regards,
-- 
AJ Lewis
Sistina Software Inc.                  Voice:  612-638-0500
1313 5th St SE, Suite 111              Fax:    612-638-0500
Minneapolis, MN 55414                  E-Mail: lewis@sistina.com
http://www.sistina.com

Current GPG fingerprint = 3B5F 6011 5216 76A5 2F6B  52A0 941E 1261 0029 2648
Get my key at: http://www.sistina.com/~lewis/gpgkey
 (Unfortunately, the PKS-type keyservers do not work with multiple sub-keys)

-----Begin Obligatory Humorous Quote----------------------------------------
Error: Keyboard not attached. Press F1 to continue.
-----End Obligatory Humorous Quote------------------------------------------

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

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

* Re: [linux-lvm] [BUG] segmentation fault on snapshot with beta8
  2001-07-27 15:21 ` AJ Lewis
@ 2001-07-27 16:27   ` Ed Tomlinson
  2001-07-30 13:35     ` AJ Lewis
  0 siblings, 1 reply; 5+ messages in thread
From: Ed Tomlinson @ 2001-07-27 16:27 UTC (permalink / raw)
  To: linux-lvm, AJ Lewis

On July 27, 2001 11:21 am, AJ Lewis wrote:
> On Thu, Jul 26, 2001 at 08:27:38AM -0400, Ed Tomlinson wrote:
> > tob is a wrapper script for afio that can installed from a debian
> > package.  The snapshotted fs is reiserfs.  I have the vfs locking
> > patch installed along with:
> >
> > --------
> > diff -Nru a/fs/reiserfs/super.c b/fs/reiserfs/super.c
> > --- a/fs/reiserfs/super.c       Sun Apr 29 20:44:38 2001
> > +++ b/fs/reiserfs/super.c       Sun Apr 29 20:44:38 2001
> > @@ -80,7 +80,7 @@
> >      reiserfs_prepare_for_journal(s, SB_BUFFER_WITH_SB(s), 1);
> >      journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB (s));
> >      reiserfs_block_writes(&th) ;
> > -    journal_end(&th, s, 1) ;
> > +    journal_end_sync(&th, s, 1) ;
> >    }
> >    s->s_dirt = dirty;
> >    unlock_kernel() ;
> > --------
>
> Hmm...trying to reproduce this on 2.4.6...and after applying the lvm 0.9.1
> beta8 patch, the linux-2.4.4-VFS-lock patch and the above patch (in that
> order), I still get this when trying to create and mount a snapshot:
>
> reiserfs: checking transaction log (device 3a:00) ...
> Using r5 hash to sort names
> ReiserFS version 3.6.25
> reiserfs: checking transaction log (device 3a:01) ...
> clm-2076: device is readonly, unable to replay log
> Replay Failure, unable to mount
> reiserfs_read_super: unable to initialize journal space
>
> Is there some other patch or magic I need to do to get ReiserFS snapshots
> working?  I thought the VFS-lock patch was supposed to fix that...

that should be it.  My fstab has:

/dev/lv/snap    /snap           reiserfs  defaults,ro,noauto    0       0 

I did not add any other patches for lvm/reiserfs other than what you have above.

My impression with the above bug is that the snapshot is filling much too quickly
and getting disabled.  At this point seg faults start happening.

Ed Tomlinson

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

* Re: [linux-lvm] [BUG] segmentation fault on snapshot with beta8
  2001-07-27 16:27   ` Ed Tomlinson
@ 2001-07-30 13:35     ` AJ Lewis
  2001-07-31 21:09       ` Ed Tomlinson
  0 siblings, 1 reply; 5+ messages in thread
From: AJ Lewis @ 2001-07-30 13:35 UTC (permalink / raw)
  To: Ed Tomlinson

[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]

On Fri, Jul 27, 2001 at 12:27:47PM -0400, Ed Tomlinson wrote:
> My impression with the above bug is that the snapshot is filling much too quickly
> and getting disabled.  At this point seg faults start happening.

I saw some Oopses and segfaults on 2.4.6 on Friday, but after I put the kdb
into the kernel I can't reproduce it.  I never see this with 2.4.7.  

This was with LVM 0.9.1 Beta8 and the patches you previously mentioned.
-- 
AJ Lewis
Sistina Software Inc.                  Voice:  612-638-0500
1313 5th St SE, Suite 111              Fax:    612-638-0500
Minneapolis, MN 55414                  E-Mail: lewis@sistina.com
http://www.sistina.com

Current GPG fingerprint = 3B5F 6011 5216 76A5 2F6B  52A0 941E 1261 0029 2648
Get my key at: http://www.sistina.com/~lewis/gpgkey
 (Unfortunately, the PKS-type keyservers do not work with multiple sub-keys)

-----Begin Obligatory Humorous Quote----------------------------------------
File not found. Should I fake it? (Y/N)
-----End Obligatory Humorous Quote------------------------------------------

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

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

* Re: [linux-lvm] [BUG] segmentation fault on snapshot with beta8
  2001-07-30 13:35     ` AJ Lewis
@ 2001-07-31 21:09       ` Ed Tomlinson
  0 siblings, 0 replies; 5+ messages in thread
From: Ed Tomlinson @ 2001-07-31 21:09 UTC (permalink / raw)
  To: linux-lvm, AJ Lewis

On July 30, 2001 09:35 am, AJ Lewis wrote:
> On Fri, Jul 27, 2001 at 12:27:47PM -0400, Ed Tomlinson wrote:
> > My impression with the above bug is that the snapshot is filling much too
> > quickly and getting disabled.  At this point seg faults start happening.
>
> I saw some Oopses and segfaults on 2.4.6 on Friday, but after I put the kdb
> into the kernel I can't reproduce it.  I never see this with 2.4.7.
>
> This was with LVM 0.9.1 Beta8 and the patches you previously mentioned.

I have seen this happen only once here too.  It was with 2.4.7 though.  I will see
if I can get trigger it again.

Ed Tomlinson

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

end of thread, other threads:[~2001-07-31 21:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-26 12:27 [linux-lvm] [BUG] segmentation fault on snapshot with beta8 Ed Tomlinson
2001-07-27 15:21 ` AJ Lewis
2001-07-27 16:27   ` Ed Tomlinson
2001-07-30 13:35     ` AJ Lewis
2001-07-31 21:09       ` Ed Tomlinson

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