[ENBD] nbd server file system

Peter T. Breuer enbd@lists.community.tummy.com
Tue, 8 Jan 2002 17:30:55 +0100 (MET)


"A month of sundays ago [Luc Robalo Marques] wrote:"
> I am quite new with nbd, only testing it right now.
> I would like to know how I can write file on the
> server and use them on the client and/or the other way
> around.

You can't. Not safely anyway. NBD is not NFS. What you could do is
export the NBD partition on the _client_ _to_ the _server_ via _nfs_.

That would be quite safe! But I don't see the point. Why not use nfs
if you want to share files?

> I need to have disk space shared on both computer to
> keep dns zone files up to date on both machine.

> If I could get to mount the file used on the nbd
> server as a fs, then I could create a mirror on both
> computer to keep the dns server up even If one of them
> going down.

You can create a mirror anyway. But I think you have the wrong idea
about how to go about it. Think again. 

What you may want is to mirror you dns server to an nbd partition exported
from a secondary machine. I.e. the dns server is the nbd client.

When the dns server dies, the secondary should take over its IP address
and start a dns server operating off the residual image of the former
mirror component. It will have to fsck it first, unless it is a
journalling fs, and even then maybe.

But you are mirroring files. I don't see why you want to go to all this
fuss. A periodic backup with rsync to a secondary machine is all you
need in order to be safe. You don't need realtime mirroring. Just
remember to sync the secondary every time you change the dns master
file, or add the sync command to your make script, or run a daemon to
detect changes and sync the secondary .. HEY! You're crazy. The bind
named syncs secondaries automatically whenever you make a change.

I.e. you have mirroring already. You don't need any more. When your
primary goes down, make one of its secondaries master. See the bind
documentation for details.

Peter