Mailing List Archive

Can not open device.
I compiled drbd and insmod'ed it succesfully. When I try accessing /dev/nb0
with drbdsetup, I get:

open("/dev/nb0", O_RDONLY) = -1 ENOSYS (Function not implemented)
open("/dev/nb0", O_RDONLY) = -1 ENOSYS (Function not implemented)
open("/dev/nb0", O_RDONLY) = -1 ENODEV (No such device)

/dev/nb0 is a block device with major 43.

My kernel is compiled without any modules - should I compile network block as a
module for example?

--
Antti Salmela
Re: Can not open device. [ In reply to ]
Hi,

You must have kernel module support activated in your kernel.
Can you see drbd with lsmod
Did you create you device with "make dev"

Thomas
----- Original Message -----
From: Antti Salmela <asalmela@example.com>
To: <drbd-devel@example.com>
Sent: Thursday, June 15, 2000 3:43 PM
Subject: [DRBD-dev] Can not open device.


> I compiled drbd and insmod'ed it succesfully. When I try accessing
/dev/nb0
> with drbdsetup, I get:
>
> open("/dev/nb0", O_RDONLY) = -1 ENOSYS (Function not
implemented)
> open("/dev/nb0", O_RDONLY) = -1 ENOSYS (Function not
implemented)
> open("/dev/nb0", O_RDONLY) = -1 ENODEV (No such device)
>
> /dev/nb0 is a block device with major 43.
>
> My kernel is compiled without any modules - should I compile network block
as a
> module for example?
>
> --
> Antti Salmela
>
> _______________________________________________
> DRBD-devel mailing list
> DRBD-devel@example.com
> http://lists.sourceforge.net/mailman/listinfo/drbd-devel
>
Re: Can not open device. [ In reply to ]
On Thu, Jun 15, 2000 at 04:24:43PM +0100, Thomas Mangin wrote:
> Hi,
>
> You must have kernel module support activated in your kernel.

Yes, I have module support, I just did not compile any modules.

> Can you see drbd with lsmod

Yes.

> Did you create you device with "make dev"

Tried that too.

> ----- Original Message -----
> From: Antti Salmela <asalmela@example.com>
> To: <drbd-devel@example.com>
> Sent: Thursday, June 15, 2000 3:43 PM
> Subject: [DRBD-dev] Can not open device.
>
>
> > I compiled drbd and insmod'ed it succesfully. When I try accessing
> /dev/nb0
> > with drbdsetup, I get:
> >
> > open("/dev/nb0", O_RDONLY) = -1 ENOSYS (Function not
> implemented)
> > open("/dev/nb0", O_RDONLY) = -1 ENOSYS (Function not
> implemented)
> > open("/dev/nb0", O_RDONLY) = -1 ENODEV (No such device)
> >
> > /dev/nb0 is a block device with major 43.
> >
> > My kernel is compiled without any modules - should I compile network block
> as a
> > module for example?
> >
> > --
> > Antti Salmela
> >
> > _______________________________________________
> > DRBD-devel mailing list
> > DRBD-devel@example.com
> > http://lists.sourceforge.net/mailman/listinfo/drbd-devel
> >

--
Antti Salmela
Re: Can not open device. [ In reply to ]
Am Don, 15 Jun 2000 schrieb Antti Salmela:
>I compiled drbd and insmod'ed it succesfully. When I try accessing /dev/nb0
>with drbdsetup, I get:
>
>open("/dev/nb0", O_RDONLY) = -1 ENOSYS (Function not implemented)
>open("/dev/nb0", O_RDONLY) = -1 ENOSYS (Function not implemented)
>open("/dev/nb0", O_RDONLY) = -1 ENODEV (No such device)
>
>/dev/nb0 is a block device with major 43.
>
>My kernel is compiled without any modules - should I compile network block as a
>module for example?
>

Hi,

could you please verify that:

*) There is a message like this in you syslog:
Jun 15 13:16:08 alf kernel: drbd: module initialised. Version: 56

*) cat /proc/drbd shows something like this:
version : 56
0: cs:WFConnection st:Secondary/Unknown ns:0 nr:0 dw:0 dr:0 of:0

If the second line is missing (the line starting with "0:" then
you loaded the module with the option "minor_count=0", which is
the case when running /etc/rc.d/init.d/drbd when there are no
drbd config files at /etc/sysconfig/drbd/.

-Philipp
Re: Can not open device. [ In reply to ]
On Fri, Jun 16, 2000 at 07:58:02AM +0200, Philipp Reisner wrote:

Uh, my mistake. I made a Debian package for my own use and forgot that
debmake creates a build-script that calls make with CFLAGS="-O2 -g -Wall"
and strips the binary.

No wonder it broke a kernel module.

--
Antti Salmela