[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] network block device



Hi,

I note that you've actually already sent a previous config file; somehow
I missed that. Sorry.

On Wed, May 27, 2015 at 07:53:26PM +0000, wadood rahimi wrote:
> yes i run nbd of version 3.8 and following is my configuraion file in
> nbd-server
> [generic]
> 
> [myexport]
> exportname=/dev/sda1
> port=2000
> but in nbd-client when i want to access the block device i can not access it
> and show me error
> in client side i write this commane
> nbd-client 192.168.5.2 2000 /dev/nbd0

In your first version, you show an "oldstyle = true" line, but the error
message that you get implies you don't have that line. This version
doesn't have that line. Assuming this version is the version that's
actually in use, your problem is that you're trying to use the old
negotiation protocol on a server that doesn't have that enabled. That
won't work.

You _could_ enable the oldstyle negotiation protocol by adding a line
"oldstyle = true" to the [generic] section, but I don't recommend that
(the oldstyle protocol is deprecated, and indeed 3.8 is the final
working version which supports it). Instead, you should use the newstyle
protocol. This is done by running the client with the -N option. For
your above configuration file, you should do that as follows:

nbd-client -N myexport <server IP> /dev/nbd0

Where "myexport" is the name of the section in your
/etc/nbd-server/config file which defines the export you're trying to
use.

Regards,

> On Monday, May 25, 2015 3:36 AM, Wouter Verhelst <w@...112...> wrote:
> 
> 
> Hi,
> 
> On Sat, May 23, 2015 at 06:11:52AM +0000, wadood rahimi wrote:
> > I configured nbd-server correctly in server side now I want to access the /
> dev/
> > sda1  block device in client side I write his command # nbd-client
> 192.168.1.1
> > 9000 /dev/nbd0
> > but it give following error
> > negotiation: error: server closed connection
> 
> Which version of nbd-server are you running?
> 
> Can you show the configuration file you've written?
> 
> > On Friday, May 22, 2015 8:13 AM, Wouter Verhelst <w@...112...> wrote:
> > On Thu, May 21, 2015 at 08:23:02PM +0000, wadood rahimi wrote:
> > > [ubuntu 14.04]
> > > Given the following config file:
> > > ---- /etc/nbd-server/config ----
> > >  [generic]
> > >  # If you want to run everything as root rather than the nbd user, you
> > >  # may either say "root" in the two following lines, or remove them
> > >  # altogether. Do not remove the [generic] section, however.
> > >  user = nbd
> > >  group = nbd
> > >
> > >
> > >  oldstyle = true
> > > # What follows are export definitions.. You may create as much of them as
> > >  # you want, but the section header has to be unique.
> > >  [disk1]
> > >          exportname = /data/sda1
> > >       
> > >     
> > >          port = 9000
> > >  ------------
> > > When you restart nbd-server the following severe-sounding warning is
> > reported:
> > > ------------
> > >  # service nbd-server restart
> > >  Restarting the Network Block Device server is pretty harsh on clients
> still
> > > using it.
> > >  waiting 5 seconds...You have been warned!
> >
> > That part is a warning which you receive from the init script, because
> > killing an nbd-server kills all connections it's serving. It's just a
> > warning, so don't worry about it if you're not running anything on the
> > server (you also don't get it if you run 'stop', and it has no influence
> > on the exit state)
> >
> >
> > >  Restarting Network Block Device server: Stopping Network Block Device
> > server:
> > > nbd-server.
> > > ** (process:19655): WARNING **: A port was specified, but oldstyle exports
> > were
> > > not requested. This may not do what you expect.
> > > ** (process:19655): WARNING **: Please read 'man 5 nbd-server' and search
> for
> > > oldstyle for more info
> > >  nbd-server.
> >
> >
> > That part should be fairly self-explanatory. Please read the man page if
> > you don't understand it.
> >
> > --
> > It is easy to love a country that is famous for chocolate and beer
> >
> >  -- Barack Obama, speaking in Brussels, Belgium, 2014-03-26
> >
> >
> >
> 
> >
> ------------------------------------------------------------------------------
> > One dashboard for servers and applications across Physical-Virtual-Cloud
> > Widest out-of-the-box monitoring support with 50+ applications
> > Performance metrics, stats and reports that give you Actionable Insights
> > Deep dive visibility with transaction tracing using APM Insight.
> > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> 
> > _______________________________________________
> > Nbd-general mailing list
> > Nbd-general@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/nbd-general
> 
> 
> 
> --
> It is easy to love a country that is famous for chocolate and beer
> 
>   -- Barack Obama, speaking in Brussels, Belgium, 2014-03-26
> 
> 

> ------------------------------------------------------------------------------

> _______________________________________________
> Nbd-general mailing list
> Nbd-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nbd-general


-- 
It is easy to love a country that is famous for chocolate and beer

  -- Barack Obama, speaking in Brussels, Belgium, 2014-03-26



Reply to: