Hi,

Is there any hope of raid1 over loopback mounts working? I wanted to put
together some regression tests for sparclinux (eg I found out yesterday our
xor is broken, don't know how long it was broken for). Avoiding the need
for real partitions would make it easier to run the tests on other machines.

I could successfully use a raid0 and raid5 partition made up of loopback
mounts, but as soon as I mount a raid1 partition it died with:

Kernel panic: loop: block not locked

I guess the reconstruction thread was not happy. This is on an ide disk, so
I assume the error came from drivers/ide/ide.c:start_request().

Anton


raidtab:

raiddev /dev/md0
        raid-level              1
        nr-raid-disks           2
        persistent-superblock   0
        chunk-size              8
        device                  /dev/loop0
        raid-disk               0
        device                  /dev/loop1
        raid-disk               1


script:

#!/bin/sh

export PATH=$PATH:/sbin

ROOT=/home/anton/regression/raid1

rmmod raid1
rmmod md
rmmod loop
insmod loop
insmod md
insmod raid1

dd if=/dev/zero of=$ROOT/raidfile1 bs=1024k count=100
dd if=/dev/zero of=$ROOT/raidfile2 bs=1024k count=100

losetup /dev/loop0 $ROOT/raidfile1
losetup /dev/loop1 $ROOT/raidfile2

mkraid -c $ROOT/raidtab /dev/md0
yes | mke2fs /dev/md0
mkdir $ROOT/raidmnt
mount /dev/md0 $ROOT/raidmnt

cd $ROOT/raidmnt
tar cvf foo.tar /etc
sync
cd ..

raidsetfaulty -c $ROOT/raidtab /dev/md0 $ROOT/raidfile1

sleep 5

cd $ROOT/raidmnt
tar cvf foo.tar /etc
sync
cd ..

raidhotadd -c $ROOT/raidtab /dev/md0 $ROOT/raidfile1

sleep 5

cd $ROOT/raidmnt
tar cvf foo.tar /etc
sync
cd ..

sleep 60

umount $ROOT/raidmnt
raidstop -c $ROOT/raidtab /dev/md0
losetup -d /dev/loop0
losetup -d /dev/loop1

rmdir $ROOT/raidmnt
rm $ROOT/raidfile1
rm $ROOT/raidfile2

rmmod raid1
rmmod md
rmmod loop
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [EMAIL PROTECTED]

Reply via email to