==Using the GEOM Gate daemon. (ggated and ggatec)==
By Nathan Butcher 2006.12.6

The ggate daemon is capable of allowing remote servers to access a device node
belonging to a local server.
This means that you could offer up /dev/acd0 (the device node belonging to the
CD drive) over the network and access it from another machine.

GEOM gate has it's limitations. You cannot mount the shared device on two
machines at once.

The man pages for ggated and ggatec are already pretty good, so this will be a
short and sweet implementation:-

We have two machines, 192.168.0.1 and 192.168.0.2
192.168.0.1 will be our server, and 192.168.0.2 will be our client.

First we'll just make a 256MB vnode to share just as an example.
First we make an image file from zeroes.

server# dd if=/dev/zero of=device.img bs=1k count=256k

Then attach this image as a device node (/dev/md0 in this case, as dictated by -u)

server# mdconfig -a -t vnode -f device.img -u 0

label the image

server# disklabel -r -w md0 auto

and create file system on it

server# newfs /dev/md0

Now for the fun part. We make a configuration file for ggated. It is only a line long.
What this does is to allow other machines on the 192.168.0.0/24 network both
read and write access to /dev/md0 which we made:

server# vi /etc/gg.exports
--------------------------------------------------
192.168.0.0/24		RW		/dev/md0

Now to kickstart ggated

server# ggated /etc/gg.exports

Now /dev/md0 will be accessible to any clients on the export network
So now to access it from the client

client# ggatec create -o rw 192.168.0.1 /dev/md0

The client should respond by printing out "ggate0". You can use the -u unit
option to set the unit number, but if you leave this out, you will get 
the default unit number of 0.

/dev/md0 is now accessible on the client, and you can mount it if you wish. You
cannot mount it on both server and client though.

Hosted by www.Geocities.ws

1