Hello Wouter
Yeap, I noticed you were using your personal email to answer my mails, but I
thought you were doing so because of all the spam in the list. It was the first
time I used a list, so please forgive me if I should have moved the
conversation back there =)
Thanks for providing a workaround. The reason we have to use console arguments
is that we trigger the nbd-server whenever a USB drive is plugged in. We use
mdev and then mdev triggers a script to do so. We can improve that, if it suits
the behavior of the nbd-server in a better way.
Thanks again for your advice, I know you are a very busy programmer.
Cheers from Mexico.
Regards,
Santiago Villafuerte
El Sábado, 19 de julio, 2014 1:25:55, Wouter Verhelst <[email protected]> escribió:
Op woensdag 16 juli 2014 12:01:54 schreef Santiago Villafuerte:
> Hello
>
> I am running Linux 2.6.31 on an iMX25 from Freescale. We have the nbd-server
> binary (2.9.23 apparently) and we run this command:
>
> /usr/local/bin/nbd-server 9000 /dev/sda1
>
>
> If an ethernet interface is active in Linux (eth0 or usb0), the nbd-server
> stays alive and netstat shows the LISTENING status of the 9000 port:
>
> Active Internet connections (servers and established)
> Proto Recv-Q Send-Q Local Address Foreign Address State
> tcp 0 0 0.0.0.0:9000 0.0.0.0:* LISTEN
>
>
> However, when there is no available interface up in the system (only
> localhost -loopback), and the nbd-server is started, it won't stay active
> at all. The netstat -al command does not show the 9000 port as active.
So, it looks like that's a bug which only triggers when you want to do
oldstyle negotiation. The "tests on the train" that I talked about were
invalid, because I forgot that I have a tap0 interface active at all
time for communication with virtual machines.
Of course that shouldn't happen; I can't look at it in detail right now,
but I have a fairly good idea where the problem most likely is. However,
the workaround is fairly simple: Don't use oldstyle negotiation, use
newstyle negotiation. That's a good idea for more reasons than just
making your problem go away:
- It's easier to use on the client side (you need to remember an export
name rather than a port number)
- It will continue working (oldstyle has been deprecated for a fair
while now, and I'm seriously considering dropping support for it some
time soon)
To be able to use newstyle, all you need to do is create a config file
and start nbd-server without arguments. There's a few examples in the
README file that show you how to do it.
Regards,
--
It is easy to love a country that is famous for chocolate and beer
-- Barack Obama, speaking in Brussels, Belgium, 2014-03-26
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Nbd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nbd-general