nbdserver

command
v1.1.0-alpha-7 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2017 License: Apache-2.0 Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 config.yml file.

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

You can also instead simply run the nbdserver with no flag specified bin/nbdserver to run it on the default /tmp/nbd-socket unix socket, which is the same as the more explicit version bin/nbdserver -protocol unix --address /tmp/nbd-socket.

Note that if you don't have the config.yml file in your current working directory, you'll have to specify the config file explicitly using the -config path flag.

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.

Jump to

Keyboard shortcuts

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