• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

doc/H03-May-2022-4,2673,356

gznbd/H16-Nov-2021-929752

man/H16-Nov-2021-4,7594,411

support/H16-Nov-2021-9,0928,215

systemd/H16-Nov-2021-566479

tests/H16-Nov-2021-6,0275,288

COPYINGH A D23-Nov-201817.7 KiB340281

CodingStyleH A D23-Nov-20181.6 KiB4736

Makefile.amH A D04-Oct-20211.9 KiB5046

Makefile.inH A D16-Nov-202158.8 KiB1,3431,203

README.mdH A D26-May-20213.7 KiB10880

aclocal.m4H A D16-Nov-202156.4 KiB1,5511,406

autogen.shH A D14-Feb-2019204 64

backend.hH A D23-Nov-2018100 74

buffer.cH A D23-Nov-20184.7 KiB226128

buffer.hH A D23-Nov-20181.6 KiB4617

cliserv.cH A D14-Feb-20193.3 KiB160122

cliserv.hH A D10-Sep-20214.4 KiB13090

compileH A D04-Oct-20217.2 KiB349259

config.guessH A D04-Oct-202143.2 KiB1,4811,288

config.h.inH A D16-Nov-20217.2 KiB270186

config.subH A D04-Oct-202135.3 KiB1,8021,661

configureH A D16-Nov-2021517.7 KiB18,19715,432

configure.acH A D16-Nov-202111.1 KiB390366

crypto-gnutls.cH A D23-Nov-201814.4 KiB628478

crypto-gnutls.hH A D23-Nov-20181.6 KiB4414

depcompH A D04-Oct-202123 KiB792502

install-shH A D04-Oct-202115 KiB542352

lfs.hH A D23-Nov-2018375 2017

ltmain.shH A D04-Oct-2021319.6 KiB11,2528,044

make-integrityhuge.cH A D23-Nov-20182.1 KiB9569

maketrH A D23-Nov-20181.1 KiB5243

missingH A D04-Oct-20216.7 KiB216143

nbd-client.cH A D18-Oct-202135.9 KiB1,3671,189

nbd-debug.hH A D23-Nov-2018233 1512

nbd-netlink.hH A D23-Nov-20181.7 KiB7036

nbd-server.cH A D03-May-2022104.8 KiB3,6312,737

nbd-trdump.cH A D10-Sep-20212.6 KiB11695

nbd.hH A D10-Sep-20212.8 KiB9050

nbdclt.hH A D04-Oct-2021579 3430

nbdsrv.cH A D04-Oct-20218.3 KiB327267

nbdsrv.hH A D10-Sep-20219.2 KiB230111

nbdtab_lexer.cH A D04-Oct-202143.9 KiB1,7661,084

nbdtab_lexer.lH A D04-Oct-2021303 1410

nbdtab_parser.cH A D04-Oct-202140.3 KiB1,324831

nbdtab_parser.tab.hH A D04-Oct-20212.5 KiB7829

nbdtab_parser.yH A D04-Oct-2021538 4233

netdb-compat.hH A D23-Nov-2018559 256

treefiles.cH A D23-Nov-20182.8 KiB11091

treefiles.hH A D23-Nov-2018484 139

ylwrapH A D04-Oct-20216.7 KiB248143

README.md

1NBD README
2==========
3
4Welcome to the NBD userland support files!
5
6This package contains nbd-server and nbd-client.
7
8To install the package, download the source and do the normal
9`configure`/`make`/`make install` dance. You'll need to install it on both the
10client and the server. Note that released nbd tarballs are found on
11[sourceforge](http://sourceforge.net/projects/nbd/files/nbd/).
12
13For compiling from git, do a checkout, install the SGML tools
14(docbook2man), and then run './autogen.sh' while inside your checkout.
15Then, see above.
16
17Contributing
18------------
19
20If you want to send a patch, please do not open a pull request; instead, send
21it to the
22[mailinglist](https://lists.debian.org/nbd)
23
24Using NBD
25---------
26
27NBD is quite easy to use. First, on the client, you need to load the module
28and, if you're not using udev, to create the device nodes:
29
30    # modprobe nbd
31    # cd /dev
32    # ./MAKEDEV nbd0
33
34(if you need more than one NBD device, repeat the above command for nbd1,
35nbd2, ...)
36
37Next, write a configuration file for the server. An example looks like
38this:
39
40    # This is a comment
41    [generic]
42        # The [generic] section is required, even if nothing is specified
43        # there.
44        # When either of these options are specified, nbd-server drops
45        # privileges to the given user and group after opening ports, but
46        # _before_ opening files.
47        user = nbd
48        group = nbd
49    [export1]
50        exportname = /export/nbd/export1-file
51        authfile = /export/nbd/export1-authfile
52        timeout = 30
53        filesize = 10000000
54        readonly = false
55        multifile = false
56        copyonwrite = false
57        prerun = dd if=/dev/zero of=%s bs=1k count=500
58        postrun = rm -f %s
59    [otherexport]
60        exportname = /export/nbd/experiment
61        # The other options are all optional
62
63The configuration file is parsed with GLib's GKeyFile, which parses key
64files as they are specified in the Freedesktop.org Desktop Entry
65Specification, as can be found at
66<http://freedesktop.org/Standards/desktop-entry-spec>. While this format
67was not intended to be used for configuration files, the glib API is
68flexible enough for it to be used as such.
69
70Now start the server:
71
72    nbd-server -C /path/to/configfile
73
74Note that the filename must be an absolute path; i.e., something like
75`/path/to/file`, not `../file`. See the nbd-server manpage for details
76on any available options.
77
78Finally, you'll be able to start the client:
79
80    nbd-client <hostname> -N <export name> <nbd device>
81
82e.g.,
83
84    nbd-client 10.0.0.1 -N otherexport /dev/nbd0
85
86will use the second export in the above example (the one that exports
87`/export/nbd/experiment`)
88
89`nbd-client` must be ran as root; the same is not true for nbd-server
90(but do make sure that /var/run is writeable by the server that
91`nbd-server` runs as; otherwise, you won't get a PID file, though the
92server will keep running).
93
94There are packages (or similar) available for most current operating
95systems; see the "Packaging status" badge below for details.
96
97For questions, please use the [nbd@other.debian.org](mailto:nbd@other.debian.org) mailinglist.
98
99Badges
100======
101
102[![Download Network Block Device](https://img.shields.io/sourceforge/dm/nbd.svg)](https://sourceforge.net/projects/nbd/files/latest/download)
103[![Coverity Scan Build Status](https://scan.coverity.com/projects/1243/badge.svg)](https://scan.coverity.com/projects/1243)
104[![CII badge](https://bestpractices.coreinfrastructure.org/projects/281/badge)](https://bestpractices.coreinfrastructure.org/projects/281)
105[![Travis](https://img.shields.io/travis/NetworkBlockDevice/nbd.svg)](https://travis-ci.org/NetworkBlockDevice/nbd)
106
107[![Packaging status](https://repology.org/badge/vertical-allrepos/nbd.svg)](https://repology.org/metapackage/nbd)
108