View previous topic :: View next topic |
Author |
Message |
solamour l33t
Joined: 21 Dec 2004 Posts: 726 Location: San Diego, CA
|
Posted: Mon Sep 26, 2011 10:07 pm Post subject: [Solved] How to setup nbd server config? |
|
|
I'm able to use nbd with the following commands.
server: | nbd-server 2000 /tmp/file -d |
client: | nbd-client SERVER_IP 2000 /dev/nbd0 |
But whenever I start the server, I see the following warning message.
warning: | ** (process:9104): WARNING **: Specifying an export on the command line is deprecated.
** (process:9104): WARNING **: Please use a configuration file instead. |
So I created the config file.
/etc/nbd-server/config: | [generic]
[export]
exportname = /tmp/file
port = 2000
|
But when I do "nbd-server -d", the port 2000 is not open (at least not showing in "netstat -a"), and the client isn't able to connect. Please guide me what to look for. Thank you.
__
sol
Last edited by solamour on Tue Sep 27, 2011 10:07 pm; edited 1 time in total |
|
Back to top |
|
|
solamour l33t
Joined: 21 Dec 2004 Posts: 726 Location: San Diego, CA
|
Posted: Tue Sep 27, 2011 5:34 pm Post subject: |
|
|
I just noticed that the configuration file described in the previous post (i.e. "/etc/nbd-server/config") works perfectly in Ubuntu 11.04, which has nbd 2.9.16-7.1ubuntu2, whereas Gentoo's latest is 2.9.22. I'm not sure the version difference is the cause of the problem, though.
__
sol |
|
Back to top |
|
|
solamour l33t
Joined: 21 Dec 2004 Posts: 726 Location: San Diego, CA
|
Posted: Tue Sep 27, 2011 10:07 pm Post subject: |
|
|
It turned out that 2.9.17 or later requires "oldstyle" flag in order to be compatible with the older versions. Perhaps that's why Ubuntu sticks with 2.9.16 as of 11.04 release. When I added the required flag, everything worked as expected.
/etc/nbd-server/config: | [generic]
oldstyle = true <--
[export]
exportname = /tmp/file
port = 2000 |
If you want to use the "new" style in 2.9.17 or later, remove both "oldstyle" and "port". The default port 10809 will be used.
/etc/nbd-server/config: | [generic]
[export]
exportname = /tmp/file |
From the client side, you need to provide the name of export.
client: | nbd-client SERVER_IP /dev/nbd0 -name export |
I must say that everything was clearly laid out in the manual page, but the examples there were somewhat misleading.
__
sol |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|