# dmesg outputs garbage

## suhlhorn

I recently updated my system after letting it get very out of date and made the mistake of giving the '-5' to etc-update which hosed a lot of configuration files. After a fair amount of work, I've got most things working again with a couple of strange problems:

1) demsg gives me garbage. As the machine boots, everything comes up fine with no errors, but when I look at the output of dmesg, I get:

```
y

end_request: I/O error, dev nbd59, sector 0

nbd60: Request when not-ready

end_request: I/O error, dev nbd60, sector 0

nbd61: Request when not-ready

end_request: I/O error, dev nbd61, sector 0

nbd62: Request when not-ready

end_request: I/O error, dev nbd62, sector 0

nbd63: Request when not-ready

end_request: I/O error, dev nbd63, sector 0

nbd64: Request when not-ready

end_request: I/O error, dev nbd64, sector 0

nbd65: Request when not-ready

end_request: I/O error, dev nbd65, sector 0

nbd66: Request when not-ready

end_request: I/O error, dev nbd66, sector 0

---snip---

end_request: I/O error, dev nbd126, sector 0

nbd127: Request when not-ready

end_request: I/O error, dev nbd127, sector 0

ReiserFS: dm-0: found reiserfs format "3.6" with standard journal

ReiserFS: dm-0: using ordered data mode

ReiserFS: dm-0: journal params: device dm-0, size 8192, journal first block 18, max 

trans len 1024, max batch 900, max commit age 30, max trans age 30

ReiserFS: dm-0: checking transaction log (dm-0)

ReiserFS: dm-0: Using r5 hash to sort names

e100: eth0: e100_watchdog: link up, 100Mbps, full-duplex

parport0: PC-style at 0x378 [PCSPP,TRISTATE,EPP]

parport0: Printer, Hewlett-Packard HP LaserJet 5L

lp0: using parport0 (polling).

```

The whole output is 403 lines to give you an idea of how much crap there is. Also, what is device nbd??, and is this a hardware problem?

2) Very slow switching between VTs (~5 s), which I have never noticied before.

I don't know if these are related, but they started ocurring at about the same time. Anyone have any ideas where to look?

-stephen

----------

## setagllib

For slow switching, do you use a framebuffer for consoles? There might be something wrong with it that is causing the problems. 

I've never had either problem, ever, but it's very strange indeed. Don't suppose building a new kernel helps? What kernel sources? Try gentoo-dev-sources, of all kernels that's the one I've never had troubles with.

----------

## suhlhorn

I do use console framebuffer, but I've never noticed the slow swtiching before (using 3 different systems).

Kernel is gentoo-dev-sources-2.6.9-r? (not at local machine now) and I've built it about a half-dozen times with different options to try and fix it without any luck.

Any idea what dev nbd* is?

----------

## o5gmmob8

Hi,

I am getting the same error/warning on my AMD64 desktop.  I am running lvm2 and have nbd compiled into the kernel.

NBD stands for Network Block Device.

I believe that the errors are related to lvm2, but I am unsure.

Walter

----------

## lookinin

 *Quote:*   

> I believe that the errors are related to lvm2, but I am unsure. 

 

I have the same errors, running lvm2, but not amd64

----------

## o5gmmob8

Hi,

I would like to know if this problem is serious ... I had issues booting up to my Gentoo install last week as the initrd would detect the volume groups correctly, but decide not to mount any of the partitions inside like root prompting a reinstall.

I also get errors on my server box alot which runs RAID 5 (no LVM) that are similar to these.  It of course had harddrive issues frequently last year.

The only thing I could say is, is nbd support in the kernel really needed and what exactly is it used for?  I know the definition, but cannot apply it - as I thought eth0 was an NBD and could have been so sure that pre 2.6 kernels had not that option.

Walter

----------

## lookinin

In my case, it doesn't seem to be serious - I can mount my volume and everything works as it should - there is no additional error output when I read/write, and the data doesn't get corrupted or anything.  The errors occur only when it's being mounted or I do something like a lvscan.

Honestly, my biggest gripe about it is that I can't do a good dmesg - I guess I should be more concerned about it, but I couldn't find any relevent information until I found this thread, so I just started ignoring it.

----------

## o5gmmob8

Hi,

My bad, I could mount the partition read/write and write to it okay.  When I tried to chroot, I forgot that the CD I booted with was 32 bit and the binaries on the parititon were 64 bit.  That explains the exec error, but does not explain the nbd error.  I too would like to have a cleaner dmesg output and with the last problem I had with LVM2, I need a cleaner output to know what is failing.

Walter

----------

## lookinin

Okay, I figured this out... in the file /etc/lvm/lvm.conf, there's a device section, in which you can filter out certain types of devices that you don't want lvm to look at.  So if you don't need nbd, you can filter it out, and it won't output the garbage to your dmesg.

The default /etc/lvm/lvm.conf on my system contained:

```
devices { filter=["r/cdrom/"] }
```

I changed this to:

```
devices { filter=["r/cdrom/" "r/nbd/"] }
```

Now I can at least read my dmesg - please use at your own risk - if you need ndb with lvm for some reason, this will prevent it from working.

Check out man lvm.conf for more information.

----------

## o5gmmob8

Hi,

I have tried that several different ways, but I still get nbd stuff in my dmesg.  I tried using commas between arguments instead of spaces, but that didn't do it either.  I am more concerned with understanding what the problem is rather than trying to have something print neatly.

Walter

----------

## lookinin

In a recent update to lvm, my lvm.conf was changed, and unlike the previous one, it contained this line:

```
filter = [ "a/.*/" ]
```

Make sure that's commented if you have it, because it tells lvm to scan all devices in /dev.  There should only be one filter line.

I replaced that with (just slightly different from my previous reply):

```
filter = [ "r|cdrom|" "r|nbd|" ]
```

 *Quote:*   

> I am more concerned with understanding what the problem is rather than trying to have something print neatly. 

 

Well, as I said before, my issue was reading my dmesg at all - not about having it print neatly.  And that's all I was trying to give input on and get fixed for myself.  But in any case, I don't believe there really is a problem.  imho, it's normal debugging output.  

 *man lvm.conf wrote:*   

> scan -- List of directories to scan recursively for LVM physical
> 
> volumes.  Devices in directories outside this hierarchy will  be
> 
> ignored.  Defaults to "/dev".
> ...

 

I take that to mean that every time lvm loads up, that it scans the entire /dev directory for valid lvm volumes, regardless of what the device actually does.  So as it tries to read devices, it spits out errors if the device doesn't exist or can't be read.

That's my two cents - works for me... sorry if this wasn't helpful for you.

----------

## brig

Hi!

I had to recompile my kernel "2.6.12-gentoo-r9" and change in the "Device Drivers -> Block Devices"  section the "Network block device support" as a module and the "end_request: I/O error," messages disappear.

----------

## raylpc

I'm not using lvm, but still got the message. I think it's related to udev, since it happened after I upgraded udev. Also, there was one version of udev that didn't cause these garbage.

----------

## eagle_cz

under LVM and Raid in kernel , there is Faulty test module for MD, it might be the spammer.

Im going to check it out

----------

## eagle_cz

ok ... since this problem started after update of udev, i guess, that i found whats behind it.

```

g Kroah-Hartman:

  fix nbd error messages with a gentoo rule hack

```

http://lwn.net/Articles/152281/

----------

