欢迎来到NBD Userland支持文件!
该软件包包含NBD服务器和NBD-CLIENT。
要安装软件包,请下载源并进行普通configure / make / make install Dance。您需要在客户端和服务器上安装它。
要从Git编译,请进行结帐,安装SGML工具(DOCBOOK2MAN),然后在结帐时运行'./autogen.sh'。然后,请参见上文。
如果要发送补丁,请不要打开拉请请求;相反,将其发送到邮件列表
如果您认为在NBD中找到了安全问题,请联系MailingList。不要仅仅为此提出问题(尽管您愿意的话,也可以这样做)。
有关禁运问题,请联系wouter verhelst [email protected]
NBD很容易使用。首先,在客户端上,您需要加载模块,如果您不使用UDEV,则可以创建设备节点:
# modprobe nbd
# cd /dev
# ./MAKEDEV nbd0
(如果您需要多个NBD设备,请重复上述NBD1,NBD2的命令,...)
接下来,为服务器编写配置文件。一个例子是这样:
# This is a comment
[generic]
# The [generic] section is required, even if nothing is specified
# there.
# When either of these options are specified, nbd-server drops
# privileges to the given user and group after opening ports, but
# _before_ opening files.
user = nbd
group = nbd
[export1]
exportname = /export/nbd/export1-file
authfile = /export/nbd/export1-authfile
timeout = 30
filesize = 10000000
readonly = false
multifile = false
copyonwrite = false
prerun = dd if=/dev/zero of=%s bs=1k count=500
postrun = rm -f %s
[otherexport]
exportname = /export/nbd/experiment
# The other options are all optional
配置文件用Glib的GkeyFile解析,该文件在freesktop.org中指定的键文件桌面条目规范中解析了密钥文件,如http://freedesktop.org/standards/desktop-entry-entry-pec。虽然这种格式不打算用于配置文件,但GLIB API足够灵活,可以使用它。
现在启动服务器:
nbd-server -C /path/to/configfile
请注意,文件名必须是绝对路径;即,类似/path/to/file类的东西,而不是../file 。有关任何可用选项的详细信息,请参见NBD-Server Manpage。
最后,您将能够启动客户:
nbd-client <hostname> -N <export name> <nbd device>
例如,
nbd-client 10.0.0.1 -N otherexport /dev/nbd0
将在上述示例中使用第二个导出(导出/export/nbd/experiment导出)
nbd-client必须作为根;对于NBD服务器而言,情况并非如此(但请确保nbd-server运行的服务器可以编写 /var /run,否则您将不会收到PID文件,尽管服务器将继续运行)。
大多数当前操作系统都有包裹(或类似);有关详细信息,请参见下面的“包装状态”徽章。
如有疑问,请使用[email protected] mailinglist。
除此项目外,NBD协议已由其他各个人实施。 A(可能不完整)列表如下:
qemu-nbd )。他们维护NBD实施的状态文件。此外,这些实现曾经存在,但现在不再维护: