ggate
The ggated utility is a network server for the GEOM Gate class. It runs on a server machine to service GEOM Gate requests from workers placed on a client machine allowing you to expose a block device in the network.
Keep in mind, that connections between ggatec and ggated are not encrypted.
ggated
Usage: ggated [-h] [-n] [-v] [-a address] [-p port] [-F pidfile] [-R rcvbuf] [-S sndbuf] [exports file]
Options
| Option | Description |
|---|---|
-a address | Specifies an IP address to bind to. |
-n | Do not use TCP_NODELAY option on TCP sockets. |
-p port | Port on which ggated listens for connections. Default is 3080 |
-F pidfile | PID file to use |
-R rcvbuf | Size of the receive buffer. Default is 131072 (128kb) |
-S sndbuf | Size of the send buffer. Default is 131072 (128kb) |
-v | Do not fork, run in foreground and print debug information. |
The format of an exports file is as follows:
1.2.3.4 RO /dev/cd0
1.2.3.0/24 RW /tmp/test.img
hostname WO /tmp/image
ggatec
Usage:
# Connecz to a ggated daemon on the specified host and create a ggate provider for the specified remote file or device.
ggatec create [-n] [-v] [-o ro | wo | rw] [-p port] [-q queue_size] [-R rcvbuf] [-S sndbuf] [-s sectorsize] [-t timeout] [-u unit] host path
# Create a new connection after the ggatec process has died or been killed. The new connection to the ggated daemon handles pending and future requests.
ggatec rescue [-n] [-v] [-o ro | wo | rw] [-p port] [-R rcvbuf] [-S sndbuf] -u unit host path
# Destroy the given ggate provider.
ggatec destroy [-f] -u unit
# List ggate providers
ggatec list [-v] [-u unit]Options
| Option | Description |
|---|---|
-f | Forcibly destroy ggate provider (cancels all pending requests). |
-n | Do not use TCP_NODELAY option on TCP sockets. |
-o permission | Specify permissions to use when opening the file or device: read-only (ro), write-only (wo), or read-write (rw). Default is rw |
-p port | Port to connect to on the remote host. Default is 3080. |
-q queue_size | Number of pending I/O requests that can be queued before they will start to be canceled. Default is 1024. |
-R rcvbuf | Size of the receive buffer. Default is 131072 (128kb) |
-S sndbuf | Size of the send buffer. Default is 131072 (128kb) |
-s sectorsize | Sector size for ggate provider. If not specified, it is taken from the device, or set to 512 bytes for files. |
-t timeout | Number of seconds to wait before an I/O request will be canceled. Default is 0, which means no timeout. |
-u unit | Unit number to use. |
-v | Do not fork, run in foreground and print debug information. |
Example
server# cat /etc/gg.exports
client RO /dev/cd0
server# ggated
client# ggatec create -o ro server /dev/cd0
ggate0
client# mount_cd9660 /dev/ggate0 /cdrom