kernel panic: raid1 + loop

From: bug1 (bug1@netconnect.com.au)
Date: Sun Jun 18 2000 - 09:54:02 EST


Im trying to create a raid1 mirror comprised of two loop filesytems.

Its probably an unusual thing to do, but i did get it working under
2.4.0test1-ac18 a couple of times and even managed to remove one of the
two loop filesystems, move it and then reintegrate it once.

I get errors under 2.2 as well as 2.4.

In 2.2.16 and 2.4.0test1-ac18 it was generating errors like the output
below (this from 2.4.0test1-ac18)

In 2.4.0test1-ac20 i get the kernel panic trying to create the array.

This is what im trying to doing, it worked once (i swear).
        # Create two loop filesystems in some directory,
        # practically disk1 and disk2 should be different drives, at
least
different partition.
        # for the test will use the same dir

        dd if=/dev/zero of=./loopfs1 bs=1k count=20000
        dd if=/dev/zero of=./loopfs2 bs=1k count=20000

        # mount the two files on loop devices
        losetup /dev/loop1 ./loopfs1
        losetup /dev/loop2 ./loopfs2

        # Create an etc/raidtab file containing
        raiddev /dev/md0
        raid-level 1
        persistent-superblock 1 # or 0, shouldn't matter
        chunk-size 16
        nr-raid-disks 2
        nr-spare-disks 0
        device /dev/loop1
        raid-disk 0
        device /dev/loop2
        raid-disk 1

        # make the loop files into raid devices
        mkraid /dev/md0

        # now treat it like a normal block device
        mkfs.ext2 /dev/md0
        mount -t ext2 /dev/md0 /mnt

        # Say the filesystem/partition containing the loop1 file had to
be
destroyed
        # to enable repartitioning of that area of storage,
        # i got an error filesystem is busy (or something like that)
around
here,
        # i had to recompile raidtools.
        raidsetfaulty /dev/md0 /dev/loop1
        raidhotremove /dev/md0 /dev/loop1
        losetup -d /dev/loop1
        # the loopfs is now running in deraded mode from only loop2
        
        # we can now move ./loopfs1 to another location
        mv ./loopfs1 //newdir/

        # now reintegrate loopfs1 from its new location
        losetup /dev/loop1 /newdir/loopfs1
        raidhotadd /dev/md0 /dev/loop1

The machine im testing on is a dual celeron, bp6 mobo, no probs with it.

Kernel panic: loop: block not locked
NMI Watchdog detected LOCKUP on CPU0, registers:
CPU: 0
EIP: 0010:[<c02480e5>]
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00000086
eax: 00000120 ebx: 00000012 ecx: c0357f40 edx: 00000001
esi: 00000305 edi: 00000000 ebx: c13cddb8 esp: c13cdd5c
ds: 0018 es: 0018 ss: 0018
Process mdrecoveryd (pid: 5, stackpage=c13cd000)
Stack: 00000003 00000000 c01a85d8 00000305 c6369e60 00000000 00000000
00000000
       c031fd46 c01a8796 00000001 00000001 c13cddb8 00000000 c0135489
00000001
       00000001 c13cddb8 00000246 00000000 c033d290 c13cde68 00000000
c6331140
Call Trace: [<c01a85d8>] [<c01a8796>] [<c0135489>] [<c0135597>]
[<c0135613>] [<c011b5fa>] [<c01a9429>]
       [<c02847c0>] [<c01a8033>] [<c01a85a0>] [<c01bd1a1>] [<c011bd61>]
[<c01bcaec>] [<c01af53e>] [<c01af5c1>]
       [<c01af4c1>] [<c01afb7f>] [c01ae6cf>] [<c01ae7f4>] [<c0108ffc>]
Code: f3 90 7e f5 e9 0c f6 f5 ff 80 3d 00 3e 2c c0 00 f3 90 7e f5

>>EIP; c02480e5 <stext_lock+3a91/9f30> <=====
Trace; c01a85d8 <__ll_rw_block+1c/1c4>
Trace; c01a8796 <ll_rw_block+16/1c>
Trace; c0135489 <sync_buffers+125/200>
Trace; c0135597 <fsync_dev+f/84>
Trace; c0135613 <sys_sync+7/10>
Trace; c011b5fa <panic+6a/f0>
Trace; c01a9429 <do_lo_request+41/3a4>
Trace; c02847c0 <cpdext+1c980/2238c>
Trace; c01a8033 <generic_make_request+24b/7d4>
Trace; c01a85a0 <generic_make_request+7b8/7d4>
Trace; c01bd1a1 <raid1_sync_request+795/7e4>
Trace; c011bd61 <printk+169/178>
Trace; c01bcaec <raid1_sync_request+e0/7e4>
Trace; c01af53e <md_do_sync+286/788>
Trace; c01af5c1 <md_do_sync+309/788>
Trace; c01af4c1 <md_do_sync+209/788>
Trace; c01afb7f <md_do_recovery+13f/328>
Code; c02480e5 <stext_lock+3a91/9f30>
00000000 <_EIP>:
Code; c02480e5 <stext_lock+3a91/9f30> <=====
   0: f3 90 repz nop <=====
Code; c02480e7 <stext_lock+3a93/9f30>
   2: 7e f5 jle fffffff9 <_EIP+0xfffffff9>
c02480de <stext_lock+3a8a/9f30>
Code; c02480e9 <stext_lock+3a95/9f30>
   4: e9 0c f6 f5 ff jmp fff5f615 <_EIP+0xfff5f615>
c01a76fa <blk_get_queue+1a/50>
Code; c02480ee <stext_lock+3a9a/9f30>
   9: 80 3d 00 3e 2c c0 00 cmpb $0x0,0xc02c3e00
Code; c02480f5 <stext_lock+3aa1/9f30>
  10: f3 90 repz nop
Code; c02480f7 <stext_lock+3aa3/9f30>
  12: 7e f5 jle 9 <_EIP+0x9> c02480ee
<stext_lock+3a9a/9f30>

2 warnings issued. Results may not be reliable.

I can still get to another console,
//proc/mdstat states
Personalities : [linear] [raid0] [raid1] [raid5]
read_ahead 1024 sectors
md1 : active raid1 [dev 07:02][2] [dev 07:01][0]
      19904 blocks [2/1] [U_]
      [>....................] recovery = 0.0% (1/19904) finish=2932.3
min speed=0K/sec
unused devices: <none>

Anyone have any clues?

Thanks

Glenn

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:15 EST