nbdserver

command
v1.1.0-alpha-8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2017 License: Apache-2.0 Imports: 24 Imported by: 0

README

NBD Server for blocks stored in ARDB

Installing the NBD Server

Requires Go 1.8 or above.

Using github.com/zero-os/0-Disk/Makefile:

OUTPUT=$GOPATH/bin make nbdserver

or by simply using the Go toolchain:

go install github.com/zero-os/0-Disk/nbdserver

NBD Server Configuration

See the NBD Server Configuration docs for more information about how to configure the NBD Server.

Usage

Use nbdserver -h or nbdserver --help to get more information about all available flags.

Example

Make sure you have an ARDB server(s) running, on the connection info specified in the used configured (using configuration stored in the etcd server running at myserver:2037).

make nbdserver && bin/nbdserver -protocol tcp -address ":6666" -config myserver:2037

Connect your nbd-client to the server running on localhost:6666:

sudo nbd-client -b 4096 -name default localhost 6666 /dev/nbd1
sudo mkfs.ext4 -b 4096 /dev/nbd1
sudo mount /dev/nbd1 /mnt/sharedvolume

Converting an image using 'qemu-img' to insert an image in the NBD server:

apt-get install qemu-utils

When the NBD server is running on a TCP socket:

qemu-img convert -p -n ubuntu-16.04-server-cloudimg-amd64-disk1.img -O nbd nbd+tcp://[HOST]:[PORT]/[VDISKID]

When the NBD server is running on a Unix socket:

qemu-img convert -p -n ubuntu-16.04-server-cloudimg-amd64-disk1.img -q nbd nbd+unix:///[VDISKID]?socket=/tmp/nbd-socket

More

For more verbose documentation see the /docs directory.

You'll find there following sections about the NBD Server:

For more information about the internals of the NBD Server you can find the following sections:

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL