Re: yoke device driver

Peter T. Breuer (ptb@it.uc3m.es)
Sun, 12 Dec 1999 01:55:37 +0100 (MET)


I've got a 2.2.* version of this "transparant hot-swappable mirror"
yoke device module now on ftp://oboe.it.uc3m.es/pub/Programs/yoke-0.3.2.tgz.

It was working at least this afternoon binding loopback devices
together. I can't swear to anything else for the moment.

> I've been writing a "yoke" device driver - it hooks up several block
> devices into a single device. Like a mirror but with many faces. Write
> to any of the yoked devices and you write in all of them.

To make it clear, this is NOT raid1 mirroring. It's a union block
device. There's something called "translucent mirroring" in the new
raid code that might be the same thing, but I can't tell because it
seems to be marked as not working yet.

When binding loop0 and loop1, for example, the "yoke" code means that
echo hello > /dev/loop0; head -6c /dev/loop1; returns "hello".
I've had one filesystem mounted on both devices like this a bit
earlier today. The effect was rather strange :-).

You get some debugging output in /proc/yokeinfo

cat /proc/yokeinfo
Device 0: Open+Running
[0] Devices: 7:0 7:1 <=> 63:0
[0] Input: 22739R/23284736B
[0] Output: 45478R/46569472B
[0] Pending: -12R/-12288B
[0] Queued: 0R/0B
[0] Erred: 6R/6144B
Device 1-15: Closed

And a suite of tools to manage the system with. Essentially, do:

yadd /dev/yd0 DEV1 DEV2
yrun /dev/yd0

to start. If anybody tries this, please let me know how it should have
been done, if you know better. The kernel module does not require any
patches to the kernel. Generated against 2.2.10.

The - numbers in the debug output above are a mystery. I seem to get
some extra requests falling into the device from I don't know where.
Kernel experts please fix. The theory of operation is in the header
comments. I don't know enough about the block cache layer and VFS
to proceed except by trial and error.

I'm working on updating the cvs tree.

Peter

-
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/