What am I missing here then to connect using the old-style?
[root@hvm2 ~]# nbd-client 10.8.0.12 1040 /dev/nbd15
ERROR: not enough information specified
Usage: nbd-client -name|-N name host [port] nbd_device [-block-size|-b
block size] [-timeout|-t timeout] [-swap|-s] [-sdp|-S] [-persist|-p]
[-nofork|-n] [-systemd-mark|-m]
Or : nbd-client -d nbd_device
Or : nbd-client -c nbd_device
Or : nbd-client -h|--help
Or : nbd-client -l|--list host
Default value for blocksize is 1024 (recommended for ethernet)
Allowed values for blocksize are 512,1024,2048,4096
Note, that kernel 2.4.2 and older ones do not work correctly with
blocksizes other than 1024 without patches
Default value for port with -N is 10809. Note that port must always be
numeric
Thanks for the help!
On Fri, Mar 17, 2017 at 3:57 AM, Wouter Verhelst <w...@uter.be> wrote:
> Hi Stephen,
>
> On Thu, Mar 16, 2017 at 06:00:39PM -0400, Stephen Powers wrote:
> > [root@dal1.sg1b ~]# nbd-server -V
> > This is nbd-server version 3.11
> > [root@dal1.sg1b ~]# nbd-server 10.8.0.12:1040 /root/testfile -d
> >
> > ** (process:18247): WARNING **: Specifying an export on the command line
> is
> > deprecated.
> >
> > ** (process:18247): WARNING **: Please use a configuration file instead.
> > ** Message: virtstyle ipliteral
> > ** Message: connect from 10.8.0.41, assigned file is /root/testfile
> > ** Message: Can't open authorization file /etc/nbd-server/allow (No such
> file
> > or directory).
> > ** Message: Authorized client
> > ** Message: Starting to serve
> > ** Message: Size of exported file/device is 524288000
> > Error: Read failed: Connection reset by peer
> > Exiting.
> >
> > [root@hvm2 ~]# nbd-client -N sg1b -l 10.8.0.12 1040 /dev/nbd1
> > Negotiation: Error: Server closed connection
> > Exiting.
>
> Actually, that "Negotiation:" bit shows you that it quits *during*
> negotiation ;-)
>
> Note that it doesn't actually crash, though; since you pass a -d
> parameter, it starts the server in debugging mode, which is really meant
> for debugging purposes only. In that mode, it will handle one
> connection, and then exit. Since your negotiation fails (see below), the
> server has no other recourse than to exit after the failed negotiation.
>
> > What is the problem here?
>
> In 3.11 and before, starting a server from the command line starts the
> server in oldstyle negotiation. That can't work with a newstyle client
> (which is triggered by the "-N <name>" command line option on the
> client).
>
> You need to either start the server with a configuration file and do
> newstyle negotiation (see "man 5 nbd-server" for that), or start it like
> above and do an oldstyle negotiation from the client.
>
> Note also that in newer versions of nbd, oldstyle negotiation was
> dropped. For that reason, I recommend that you use newstyle rather than
> oldstyle negotiation.
>
> Regards,
>
> --
> < ron> I mean, the main *practical* problem with C++, is there's like a
> dozen
> people in the world who think they really understand all of its
> rules,
> and pretty much all of them are just lying to themselves too.
> -- #debian-devel, OFTC, 2016-02-12
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Nbd-general mailing list
Nbd-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nbd-general