Giter Club home page Giter Club logo

nbdserve's Introduction

nbdserve

Simple network block device server. Created because of usual nbd-server is tricky-ish to cross-compile. Also it typically requires config file, which is inconvenient for one-off use.

There are pre-built versions for Linux, Mac, Windows and Android on releases page.

IPv6 is supported, use options like -a [::1].

nbdserve 0.1.0
Vitaly "_Vi" Shukela <[email protected]>
Simple network block device server

USAGE:
    nbdserve [FLAGS] [OPTIONS] <file>

FLAGS:
    -h, --help          Prints help information
    -q, --quiet         Quiet mode, suppress non-error output
    -r, --read-only     Read-only mode
        --resize        Support RESIZE NBD extension (not implemented)
        --rotational    Hint clients that elevator algorithm should be used
        --trim          Convert TRIM operations to FALLOC_FL_PUNCH_HOLE or something (not implemented)
    -V, --version       Prints version information

OPTIONS:
    -a, --addr <host>    Address to listen the port on [default: 127.0.0.1]
    -p, --port <port>    TCP port to listen [default: 10809]
    -s, --size <size>    

ARGS:
    <file>    File or device to be served

Windows

On windows, you can use with physical drives like so:

List physical drives:

wmic diskdrive list brief

Build and run (note that physical drives seem to only work in read only mode):

wmic diskdrive list brief
cargo build --release
.\target\release\nbdserve.exe --addr 0.0.0.0 \\.\PHYSICALDRIVE0 --read-only

You can use the firewall-rule.ps1 script to add the needed firewall rules to the windows firewall.

nbdserve's People

Contributors

vi avatar yuval-k avatar

Stargazers

 avatar Hana McLaughlin avatar RandomOS avatar ik5 avatar GAURAV avatar John Deeny avatar genevera (she/her) avatar Mikal avatar  avatar  avatar

Watchers

 avatar James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.