[ENBD] kernel message "non existant block device"
Peter T. Breuer
ptb@it.uc3m.es
Mon, 23 Oct 2000 19:13:51 +0200 (MET DST)
"A month of sundays ago pbmonday@imation.com wrote:"
> >> kernel: ll_rw_block: Trying to read non-existant block-device 2b:00
> >This is a clear message! You don't have any such device, the module is
> >not loaded or is inactive or disabled, the kernel is talking to the wall.
> >It is complaining.
>
> This, I guessed, but I receive no errors to indicate the module failed.
Kernel messages will be visible in the dmesg output. Insmod may or may
not notice an error depending on whether it is a load error or not.
In this case there is no error on loading.
> >> us688274b:/tmp # insmod /tmp/nbd.o
> >And did it succeed? The kernel tells us that it didn't or that it
> >succeeded but subsequently never was opened.
>
> I received no message from the kernel on success or lack thereof.
Look with lsmod and dmesg.
> >> us688274b:/tmp # ./nbd-client localhost 1077 /dev/nda
> >Incorrect command line for a 2.4.* nbd version. You named no channels.
>
> Hmm, I don't see any documentation on how to name channels. This is the
> usage statement in the sourcecode:
The man page:
NAME
nbd-client - NBD client daemon
SYNOPSIS
nbd-client host ctrlport alias [ alias .. ] [ -r ] [ -b blocksize ]
[ { -j|-jb|-jh } journalfile ] [ -js journalsectors ]
[ -t negotiation-timeout ] [ -cert certificate_file ] [ -key key_file ]
[ -CApath certificate_authority_dir ]
[ -CAfile certificated_authority_file ] [ -verify depth ] device
...
ARGUMENTS
host ctrlport alias [ alias .. ]
The first argument is the name of a server host to connect to
for control information and the second argument is the port
number at which to connect. Subsequent arguments indicate the
routes to the server to be taken per data connection. Each must
be a valid IP alias of the server (and may usually be a repeat
of the servers hostname). At least one alias must be given,
normally the server hostname. To set up connections across
different routes to the server, use different IP aliases for the
host and route them differently.
> printf(
> "Usage: host port .. [host port ..] .. [-b blksize] [-t timeout]"
> #ifdef USING_SSL
> "[-cert certfile] [-key keyfile] "
> "[-CApath CApath] [-CAfile CAfile] "
> "[-verify depth] "
> #endif
> "nbd_device [mirror_device ..]\n"
> "(error %d)\n", err
> );
Interesting. That is the old usage .. is it still in the source? No.
Not in my source (I am looking at 2.4.15, which is my current version)
at least:
void usage(int err) {
printf(
"Usage: host port alias [alias ..] .. "
"[-b blksize] [-t timeout] [-j journal] [-r] "
#ifdef USING_SSL
"[-cert certfile] [-key keyfile] "
"[-CApath CApath] [-CAfile CAfile] "
"[-verify depth] "
#endif
"nbd_device [mirror_device ..]\n"
"(error %d)\n", err
);
}
Are you sure you're not looking at 2.2.* source and docs and running
2.4.* code? That would explain it. But you're right, the usage
message needs updating.
> Is there anywhere I can get the new command line parameters and their
> meanings?
The man page.
> > nbd-client: client received no connections named on cmdline!
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >I hope it will fail! Missing hard disks are usually fatal.
> There is no noticeable failure except with the ll_rw_block message from
> the kernel.
That's the only failure that you should see. The device is loaded
and running, with "zero disks" under its charge. Åccessing one of the
zero disks gives an error.
> >Output from /proc/nbdinfo will confirm.
>
> I retried the command trying to follow the setup from "make test", but the
> same types of errors occur. The message above "agreed 0 channels ok"
"Trying to" is not good enough! You just have to copy it and change it
to suit your circumstances.
> changed to "agreed 2 channels ok"
Then it is apaprantly up and running, at least at the user level. Why do
you say that it is not working? Did you give a different signature, perhaps?
Look at the output from /prco/nbdinfo.
> I am retrying everything again, the biggest help would be the new command
> line syntax.
Look at the man page. There is no mystery. For example (I quote)
nbd-client server1 4017 server1 server1 /dev/nda
Peter