Re: 2.1.x config options??

Malcolm Beattie (mbeattie@sable.ox.ac.uk)
Wed, 14 Jan 1998 10:53:56 +0000 (GMT)


Alan Cox writes:
> > Anyone know anything about the following:
> > CONFIG_BLK_DEV_NBD
>
> Network block device - you can mount a remote file as a filesystem. This
> is _awesome_ with the mirror driver but right now a bit too slow to be very
> useful

This sounds like something I've been thinking about, in which case
it's useful even if it is slow. My goal is to be able to hot-migrate
filesystems off one of the nodes of a cluster (the sort I've
mentioned here before and which I'm about to start testing once the
hardware shows up in a a day or two :-). It struck me that all you
need is a simple block device which (1) does end_request(0) (I/O
error) for all reads and (2) responds to writes in one of two modes:
(a) drop them on the floor (b) send the buffer down an open socket
(or via netlink and a user-mode process) off to a remote host which
writes it to a raw disk.

Configure your real disk(s) to be in a mirror set with md. Configure
the network block device in the mirror set too but mark it bad. In the
usual situation, then, reads are satisfied from the real disk and
writes to the mirror set are written to the real disk (and nowhere
else) so its fast. When you want to migrate the filesystem to a spare
node (in order to take the node down for upgrade/fixing) you mark the
node as down for IP clustering ("clconfig 10.0.0.1 down" on the
front-end) and mark the network block device as up. Use the raid tools
to start a rebuild of the mirror set (I'm assuming there is a tool to
hot-rebuild an md mirror set; if not, I'll have to write one). That
starts syncing the disk with the remote node (that's the part that will
be slow if the network block driver is slow but its doesn't matter too
much unless it's *really* slow). When the sync rebuild is complete it
takes only a second or two to tweak the NFS mounts and maybe the
automounter (possibly you have to wait for no user activity on the
filesystem depending on whether other tricks work out) and then the
filesystem appears from the remote node.

The only time the slowness of the network block driver matters is
during migration (a rare occurrence). So although it would be nice to
be able to have remote mirror sets without nice long SSA connections,
it's still a useful driver.

--Malcolm

-- 
Malcolm Beattie <mbeattie@sable.ox.ac.uk>
Unix Systems Programmer
Oxford University Computing Services