Bug#624343: linux-image-2.6.38-2-amd64: frequent message "bio too big device md0 (248 > 240)" in kern.log
Package: linux-2.6
Version: 2.6.38-3
Severity: normal
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
As you can see from the kern.log snippet below, I am seeing frequent
messages reporting "bio too big device md0 (248 > 240)".
I run what I imagine is a fairly unusual disk setup on my laptop,
consisting of:
ssd -> raid1 -> dm-crypt -> lvm -> ext4
I use the raid1 as a backup. The raid1 operates normally in degraded
mode. For backups I then hot-add a usb hdd, let the raid1 sync, and
then fail/remove the external hdd.
I started noticing these messages after my last sync. I have not
rebooted since.
I found a bug report on the launchpad that describes an almost
identical situation:
The reporter seemed to be concerned that their may be data loss
happening. I have not yet noticed any, but of course I'm terrified
that it's happening and I just haven't found it yet. Unfortunately
the bug was closed with a "Won't Fix" without any resolution.
Is this a kernel bug, or is there something I can do to remedy the
situation? I haven't tried to reboot yet to see if the messages stop.
I'm obviously most worried about data loss. Please advise!
Thanks so much for any help.
jamie.
- -- Package-specific info:
** Version:
Linux version 2.6.38-2-amd64 (Debian 2.6.38-3) (ben@decadent.org.uk) (gcc version 4.4.5 (Debian 4.4.5-15) ) #1 SMP Thu Apr 7 04:28:07 UTC 2011
** Kernel log:
[134465.496126] bio too big device md0 (248 > 240)
[134465.544976] bio too big device md0 (248 > 240)
[134465.626438] bio too big device md0 (248 > 240)
[134465.675884] bio too big device md0 (248 > 240)
[134465.752459] bio too big device md0 (248 > 240)
[134465.827410] bio too big device md0 (248 > 240)
[134466.087495] bio too big device md0 (248 > 240)
[134466.155538] bio too big device md0 (248 > 240)
[134466.225549] bio too big device md0 (248 > 240)
[134466.268505] bio too big device md0 (248 > 240)
[134466.397099] bio too big device md0 (248 > 240)
[134466.464110] bio too big device md0 (248 > 240)
[134466.501557] bio too big device md0 (248 > 240)
[134466.547847] bio too big device md0 (248 > 240)
[134466.636949] bio too big device md0 (248 > 240)
[134466.695790] bio too big device md0 (248 > 240)
[134466.748543] bio too big device md0 (248 > 240)
[134466.791067] bio too big device md0 (248 > 240)
[134466.822082] bio too big device md0 (248 > 240)
[134466.834387] bio too big device md0 (248 > 240)
[134466.884726] bio too big device md0 (248 > 240)
[134466.933843] bio too big device md0 (248 > 240)
[134466.982737] bio too big device md0 (248 > 240)
[134467.021168] bio too big device md0 (248 > 240)
[134467.093886] bio too big device md0 (248 > 240)
[134467.113183] bio too big device md0 (248 > 240)
[134467.133697] bio too big device md0 (248 > 240)
[134467.163391] bio too big device md0 (248 > 240)
[134467.238819] bio too big device md0 (248 > 240)
[134467.279655] bio too big device md0 (248 > 240)
[134467.337005] bio too big device md0 (248 > 240)
[134467.406347] bio too big device md0 (248 > 240)
[134467.462565] bio too big device md0 (248 > 240)
[134467.499770] bio too big device md0 (248 > 240)
[134467.544269] bio too big device md0 (248 > 240)
[134511.879575] bio too big device md0 (248 > 240)
[134511.903777] bio too big device md0 (248 > 240)
[135819.708128] bio too big device md0 (248 > 240)
[135833.674591] bio too big device md0 (248 > 240)
[135833.675175] bio too big device md0 (248 > 240)
[135833.679417] bio too big device md0 (248 > 240)
[135833.683757] bio too big device md0 (248 > 240)
[135833.687908] bio too big device md0 (248 > 240)
[135833.691984] bio too big device md0 (248 > 240)
[135833.696038] bio too big device md0 (248 > 240)
[135833.700465] bio too big device md0 (248 > 240)
[135833.705000] bio too big device md0 (248 > 240)
[135833.709328] bio too big device md0 (248 > 240)
[135833.713498] bio too big device md0 (248 > 240)
[135833.717687] bio too big device md0 (248 > 240)
[135833.721729] bio too big device md0 (248 > 240)
[135833.727046] bio too big device md0 (248 > 240)
[135833.732615] bio too big device md0 (248 > 240)
[135833.736938] bio too big device md0 (248 > 240)
[135835.924148] bio too big device md0 (248 > 240)
[135835.941912] bio too big device md0 (248 > 240)
[135835.942503] bio too big device md0 (248 > 240)
[135835.955810] bio too big device md0 (248 > 240)
[135836.007533] bio too big device md0 (248 > 240)
[135836.016057] bio too big device md0 (248 > 240)
[135836.020241] bio too big device md0 (248 > 240)
[135836.020257] bio too big device md0 (248 > 240)
[135836.028139] bio too big device md0 (248 > 240)
[135836.038644] bio too big device md0 (248 > 240)
[135836.039922] bio too big device md0 (248 > 240)
[135836.070426] bio too big device md0 (248 > 240)
[135836.102252] bio too big device md0 (248 > 240)
[135836.103499] bio too big device md0 (248 > 240)
[135836.104840] bio too big device md0 (248 > 240)
[135836.105129] bio too big device md0 (248 > 240)
[135836.106135] bio too big device md0 (248 > 240)
[135836.106688] bio too big device md0 (248 > 240)
[135836.107130] bio too big device md0 (248 > 240)
[135836.108851] bio too big device md0 (248 > 240)
[135836.141311] bio too big device md0 (248 > 240)
[135836.167815] bio too big device md0 (248 > 240)
[135836.169831] bio too big device md0 (248 > 240)
[135836.173219] bio too big device md0 (248 > 240)
[135836.174490] bio too big device md0 (248 > 240)
[135836.180757] bio too big device md0 (248 > 240)
[135836.181090] bio too big device md0 (248 > 240)
[135836.185878] bio too big device md0 (248 > 240)
[135836.186630] bio too big device md0 (248 > 240)
[135836.187965] bio too big device md0 (248 > 240)
[135836.201740] bio too big device md0 (248 > 240)
[135836.573240] bio too big device md0 (248 > 240)
[135837.034449] bio too big device md0 (248 > 240)
[135837.249750] bio too big device md0 (248 > 240)
[136279.870448] bio too big device md0 (248 > 240)
[136279.870465] bio too big device md0 (248 > 240)
[136280.081125] bio too big device md0 (248 > 240)
[136280.081144] bio too big device md0 (248 > 240)
[136280.177058] bio too big device md0 (248 > 240)
[136280.187703] bio too big device md0 (248 > 240)
[136280.228098] bio too big device md0 (248 > 240)
[136280.230033] bio too big device md0 (248 > 240)
[136280.230051] bio too big device md0 (248 > 240)
[136280.307610] bio too big device md0 (248 > 240)
[136280.341876] bio too big device md0 (248 > 240)
[136280.617888] bio too big device md0 (248 > 240)
** Model information
sys_vendor: LENOVO
product_name: 3626WVF
product_version: ThinkPad X201
chassis_vendor: LENOVO
chassis_version: Not Available
bios_vendor: LENOVO
bios_version: 6QET62WW (1.32 )
board_vendor: LENOVO
board_name: 3626WVF
board_version: Not Available
*** Protocol statistics:
Ip:
5198735 total packets received
872 with invalid addresses
0 forwarded
0 incoming packets discarded
5197863 incoming packets delivered
3642865 requests sent out
814 dropped because of missing route
570 fragments received ok
1161 fragments created
Icmp:
1067 ICMP messages received
16 input ICMP message failed.
ICMP input histogram:
destination unreachable: 1057
timeout in transit: 1
echo requests: 7
echo replies: 2
111 ICMP messages sent
0 ICMP messages failed
ICMP output histogram:
destination unreachable: 102
echo request: 2
echo replies: 7
IcmpMsg:
InType0: 2
InType3: 1057
InType8: 7
InType11: 1
OutType0: 7
OutType3: 102
OutType8: 2
Tcp:
7062 active connections openings
203 passive connection openings
61 failed connection attempts
703 connection resets received
2 connections established
4083060 segments received
3072790 segments send out
3281 segments retransmited
2 bad segments received.
2505 resets sent
Udp:
1028759 packets received
102 packets to unknown port received.
8 packet receive errors
784098 packets sent
UdpLite:
TcpExt:
1 resets received for embryonic SYN_RECV sockets
2 packets pruned from receive queue because of socket buffer overrun
3054 TCP sockets finished time wait in fast timer
2094 packets rejects in established connections because of timestamp
134268 delayed acks sent
11 delayed acks further delayed because of locked socket
Quick ack mode was activated 8597 times
116998 packets directly queued to recvmsg prequeue.
3650181 bytes directly in process context from backlog
183274829 bytes directly received in process context from prequeue
3153774 packet headers predicted
140771 packets header predicted and directly queued to user
21346 acknowledgments not containing data payload received
719768 predicted acknowledgments
14 times recovered from packet loss by selective acknowledgements
Detected reordering 2 times using time stamp
2 congestion windows fully recovered without slow start
5 congestion windows partially recovered using Hoe heuristic
13 congestion windows recovered without slow start by DSACK
99 congestion windows recovered without slow start after partial ack
112 TCP data loss events
TCPLostRetransmit: 2
8 timeouts after SACK recovery
8 timeouts in loss state
57 fast retransmits
4 forward retransmits
2177 retransmits in slow start
356 other TCP timeouts
734 packets collapsed in receive queue due to low socket buffer
8613 DSACKs sent for old packets
147 DSACKs received
100 connections reset due to unexpected data
673 connections reset due to early user close
112 connections aborted due to timeout
16 times unabled to send RST due to no memory
TCPDSACKIgnoredOld: 10
TCPDSACKIgnoredNoUndo: 42
TCPSpuriousRTOs: 4
TCPSackShifted: 292
TCPSackMerged: 202
TCPSackShiftFallback: 438
IpExt:
InMcastPkts: 73261
OutMcastPkts: 415
InBcastPkts: 106900
InOctets: -187533471
OutOctets: 1007392102
InMcastOctets: 15687663
OutMcastOctets: 58874
InBcastOctets: 14631325
** USB devices:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 004: ID 17ef:4816 Lenovo
Bus 001 Device 010: ID 17ef:1005 Lenovo
Kernel: Linux 2.6.38-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages linux-image-2.6.38-2-amd64 depends on:
ii debconf [debconf-2.0] 1.5.38 Debian configuration management sy
ii initramfs-tools [linux-initra 0.98.8 tools for generating an initramfs
ii linux-base 3.2 Linux image base package
ii module-init-tools 3.12-1 tools for managing Linux kernel mo
Versions of packages linux-image-2.6.38-2-amd64 recommends:
ii firmware-linux-free 3 Binary firmware for various driver
Versions of packages linux-image-2.6.38-2-amd64 suggests:
ii grub-pc 1.99~rc1-13 GRand Unified Bootloader, version
pn linux-doc-2.6.38 <none> (no description available)
Versions of packages linux-image-2.6.38-2-amd64 is related to:
pn firmware-bnx2 <none> (no description available)
pn firmware-bnx2x <none> (no description available)
pn firmware-ipw2x00 <none> (no description available)
pn firmware-ivtv <none> (no description available)
ii firmware-iwlwifi 0.29 Binary firmware for Intel Wireless
ii firmware-linux 0.29 Binary firmware for various driver
ii firmware-linux-nonfree 0.29 Binary firmware for various driver
pn firmware-qlogic <none> (no description available)
pn firmware-ralink <none> (no description available)
pn xen-hypervisor <none> (no description available)
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110427161901.27049.31001.reportbug@servo.factory .finestructure.net">http://lists.debian.org/20110427161901.27049.31001.reportbug@servo.factory .finestructure.net
04-28-2011, 12:22 AM
Jameson Graef Rollins
Bug#624343: linux-image-2.6.38-2-amd64: frequent message "bio too big device md0 (248 > 240)" in kern.log
I am starting to suspect that these messages are in face associated with
data loss on my system. I have witnessed these messages occur during
write operations to the disk, and I have also started to see some
strange behavior on my system. dhclient started acting weird after
these messages appeared (not holding on to leases) and I started to
notice database exceptions in my mail client.
Interestingly, the messages seem to have gone away after reboot. I will
watch closely to see if they return after my next raid1 sync.
jamie.
04-29-2011, 04:39 AM
Ben Hutchings
Bug#624343: linux-image-2.6.38-2-amd64: frequent message "bio too big device md0 (248 > 240)" in kern.log
On Wed, 2011-04-27 at 09:19 -0700, Jameson Graef Rollins wrote:
> Package: linux-2.6
> Version: 2.6.38-3
> Severity: normal
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> As you can see from the kern.log snippet below, I am seeing frequent
> messages reporting "bio too big device md0 (248 > 240)".
>
> I run what I imagine is a fairly unusual disk setup on my laptop,
> consisting of:
>
> ssd -> raid1 -> dm-crypt -> lvm -> ext4
>
> I use the raid1 as a backup. The raid1 operates normally in degraded
> mode. For backups I then hot-add a usb hdd, let the raid1 sync, and
> then fail/remove the external hdd.
Well, this is not expected to work. Possibly the hot-addition of a disk
with different bio restrictions should be rejected. But I'm not sure,
because it is safe to do that if there is no mounted filesystem or
stacking device on top of the RAID.
I would recommend using filesystem-level backup (e.g. dirvish or
backuppc). Aside from this bug, if the SSD fails during a RAID resync
you will be left with an inconsistent and therefore useless 'backup'.
> I started noticing these messages after my last sync. I have not
> rebooted since.
>
> I found a bug report on the launchpad that describes an almost
> identical situation:
>
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/320638
>
> The reporter seemed to be concerned that their may be data loss
> happening. I have not yet noticed any, but of course I'm terrified
> that it's happening and I just haven't found it yet. Unfortunately
> the bug was closed with a "Won't Fix" without any resolution.
>
> Is this a kernel bug, or is there something I can do to remedy the
> situation? I haven't tried to reboot yet to see if the messages stop.
> I'm obviously most worried about data loss. Please advise!
The block layer correctly returns an error after logging this message.
If it's due to a read operation, the error should be propagated up to
the application that tried to read. If it's due to a write operation, I
would expect the error to result in the RAID becoming desynchronised.
In some cases it might be propagated to the application that tried to
write.
If the error is somehow discarded then there *is* a kernel bug with the
risk of data loss.
> I am starting to suspect that these messages are in face associated with
> data loss on my system. I have witnessed these messages occur during
> write operations to the disk, and I have also started to see some
> strange behavior on my system. dhclient started acting weird after
> these messages appeared (not holding on to leases) and I started to
> notice database exceptions in my mail client.
>
> Interestingly, the messages seem to have gone away after reboot. I will
> watch closely to see if they return after my next raid1 sync.
Ben.
--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
05-01-2011, 10:06 PM
Jameson Graef Rollins
Bug#624343: linux-image-2.6.38-2-amd64: frequent message "bio too big device md0 (248 > 240)" in kern.log
On Fri, 29 Apr 2011 05:39:40 +0100, Ben Hutchings <ben@decadent.org.uk> wrote:
> On Wed, 2011-04-27 at 09:19 -0700, Jameson Graef Rollins wrote:
> > I run what I imagine is a fairly unusual disk setup on my laptop,
> > consisting of:
> >
> > ssd -> raid1 -> dm-crypt -> lvm -> ext4
> >
> > I use the raid1 as a backup. The raid1 operates normally in degraded
> > mode. For backups I then hot-add a usb hdd, let the raid1 sync, and
> > then fail/remove the external hdd.
>
> Well, this is not expected to work. Possibly the hot-addition of a disk
> with different bio restrictions should be rejected. But I'm not sure,
> because it is safe to do that if there is no mounted filesystem or
> stacking device on top of the RAID.
Hi, Ben. Can you explain why this is not expected to work? Which part
exactly is not expected to work and why?
> I would recommend using filesystem-level backup (e.g. dirvish or
> backuppc). Aside from this bug, if the SSD fails during a RAID resync
> you will be left with an inconsistent and therefore useless 'backup'.
I appreciate your recommendation, but it doesn't really have anything to
do with this bug report. Unless I am doing something that is
*expressly* not supposed to work, then it should work, and if it doesn't
then it's either a bug or a documentation failure (ie. if this setup is
not supposed to work then it should be clearly documented somewhere what
exactly the problem is).
> The block layer correctly returns an error after logging this message.
> If it's due to a read operation, the error should be propagated up to
> the application that tried to read. If it's due to a write operation, I
> would expect the error to result in the RAID becoming desynchronised.
> In some cases it might be propagated to the application that tried to
> write.
Can you say what is "correct" about the returned error? That's what I'm
still not understanding. Why is there an error and what is it coming
from?
jamie.
05-02-2011, 12:00 AM
Ben Hutchings
Bug#624343: linux-image-2.6.38-2-amd64: frequent message "bio too big device md0 (248 > 240)" in kern.log
On Sun, 2011-05-01 at 15:06 -0700, Jameson Graef Rollins wrote:
> On Fri, 29 Apr 2011 05:39:40 +0100, Ben Hutchings <ben@decadent.org.uk> wrote:
> > On Wed, 2011-04-27 at 09:19 -0700, Jameson Graef Rollins wrote:
> > > I run what I imagine is a fairly unusual disk setup on my laptop,
> > > consisting of:
> > >
> > > ssd -> raid1 -> dm-crypt -> lvm -> ext4
> > >
> > > I use the raid1 as a backup. The raid1 operates normally in degraded
> > > mode. For backups I then hot-add a usb hdd, let the raid1 sync, and
> > > then fail/remove the external hdd.
> >
> > Well, this is not expected to work. Possibly the hot-addition of a disk
> > with different bio restrictions should be rejected. But I'm not sure,
> > because it is safe to do that if there is no mounted filesystem or
> > stacking device on top of the RAID.
>
> Hi, Ben. Can you explain why this is not expected to work? Which part
> exactly is not expected to work and why?
Adding another type of disk controller (USB storage versus whatever the
SSD interface is) to a RAID that is already in use.
> > I would recommend using filesystem-level backup (e.g. dirvish or
> > backuppc). Aside from this bug, if the SSD fails during a RAID resync
> > you will be left with an inconsistent and therefore useless 'backup'.
>
> I appreciate your recommendation, but it doesn't really have anything to
> do with this bug report. Unless I am doing something that is
> *expressly* not supposed to work, then it should work, and if it doesn't
> then it's either a bug or a documentation failure (ie. if this setup is
> not supposed to work then it should be clearly documented somewhere what
> exactly the problem is).
The normal state of a RAID set is that all disks are online. You have
deliberately turned this on its head; the normal state of your RAID set
is that one disk is missing. This is such a basic principle that most
documentation won't mention it.
> > The block layer correctly returns an error after logging this message.
> > If it's due to a read operation, the error should be propagated up to
> > the application that tried to read. If it's due to a write operation, I
> > would expect the error to result in the RAID becoming desynchronised.
> > In some cases it might be propagated to the application that tried to
> > write.
>
> Can you say what is "correct" about the returned error? That's what I'm
> still not understanding. Why is there an error and what is it coming
> from?
The error is that you changed the I/O capabilities of the RAID while it
was already in use. But what I was describing as 'correct' was that an
error code was returned, rather than the error condition only being
logged. If the error condition is not properly propagated then it could
lead to data loss.
Ben.
--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
05-02-2011, 12:22 AM
NeilBrown
Bug#624343: linux-image-2.6.38-2-amd64: frequent message "bio too big device md0 (248 > 240)" in kern.log
On Mon, 02 May 2011 01:00:57 +0100 Ben Hutchings <ben@decadent.org.uk> wrote:
> On Sun, 2011-05-01 at 15:06 -0700, Jameson Graef Rollins wrote:
> > On Fri, 29 Apr 2011 05:39:40 +0100, Ben Hutchings <ben@decadent.org.uk> wrote:
> > > On Wed, 2011-04-27 at 09:19 -0700, Jameson Graef Rollins wrote:
> > > > I run what I imagine is a fairly unusual disk setup on my laptop,
> > > > consisting of:
> > > >
> > > > ssd -> raid1 -> dm-crypt -> lvm -> ext4
> > > >
> > > > I use the raid1 as a backup. The raid1 operates normally in degraded
> > > > mode. For backups I then hot-add a usb hdd, let the raid1 sync, and
> > > > then fail/remove the external hdd.
> > >
> > > Well, this is not expected to work. Possibly the hot-addition of a disk
> > > with different bio restrictions should be rejected. But I'm not sure,
> > > because it is safe to do that if there is no mounted filesystem or
> > > stacking device on top of the RAID.
> >
> > Hi, Ben. Can you explain why this is not expected to work? Which part
> > exactly is not expected to work and why?
>
> Adding another type of disk controller (USB storage versus whatever the
> SSD interface is) to a RAID that is already in use.
Normally this practice is perfectly OK.
If a filesysytem is mounted directly from an md array, then adding devices
to the array at any time is fine, even if the new devices have quite
different characteristics than the old.
However if there is another layer in between md and the filesystem - such as
dm - then there can be problem.
There is no mechanism in the kernl for md to tell dm that things have
changed, so dm never changes its configuration to match any change in the
config of the md device.
A filesystem always queries the config of the device as it prepares the
request. As this is not an 'active' query (i.e. it just looks at
variables, it doesn't call a function) there is no opportunity for dm to then
query md.
There is a ->merge_bvec_fn which could be pushed into service. i.e. if
md/raid1 defined some trivial merge_bvec_fn, then it would probably work.
However the actual effect of this would probably to cause every bio created
by the filesystem to be just one PAGE in size, and this is guaranteed always
to work. So it could be a significant performance hit for the common case.
We really need either:
- The fs sends down arbitrarily large requests, and the lower layers split
them up if/when needed
or
- A mechanism for a block device to tell the layer above that something has
changed.
But these are both fairly intrusive which unclear performance/complexity
implications and no one has bothered.
NeilBrown
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110502102224.7787d6bd@notabene.brown">http://lists.debian.org/20110502102224.7787d6bd@notabene.brown
05-02-2011, 12:42 AM
Daniel Kahn Gillmor
Bug#624343: linux-image-2.6.38-2-amd64: frequent message "bio too big device md0 (248 > 240)" in kern.log
On 05/01/2011 08:00 PM, Ben Hutchings wrote:
> On Sun, 2011-05-01 at 15:06 -0700, Jameson Graef Rollins wrote:
>> Hi, Ben. Can you explain why this is not expected to work? Which part
>> exactly is not expected to work and why?
>
> Adding another type of disk controller (USB storage versus whatever the
> SSD interface is) to a RAID that is already in use.
>
[...]
> The normal state of a RAID set is that all disks are online. You have
> deliberately turned this on its head; the normal state of your RAID set
> is that one disk is missing. This is such a basic principle that most
> documentation won't mention it.
This is somewhat worrisome to me. Consider a fileserver with
non-hotswap disks. One disk fails in the morning, but the machine is in
production use, and the admin's goals are:
* minimize downtime,
* reboot only during off-hours, and
* minimize the amount of time that the array is spent de-synced.
A responsible admin might reasonably expect to attach a disk via a
well-tested USB or ieee1394 adapter, bring the array back into sync,
announce to the rest of the organization that there will be a scheduled
reboot later in the evening.
Then, at the scheduled reboot, move the disk from the USB/ieee1394
adapter to the direct ATA interface on the machine.
If this sequence of operations is likely (or even possible) to cause
data loss, it should be spelled out in BIG RED LETTERS someplace. I
don't think any of the above steps seem unreasonable, and the set of
goals the admin is attempting to meet are certainly commonplace goals.
> The error is that you changed the I/O capabilities of the RAID while it
> was already in use. But what I was describing as 'correct' was that an
> error code was returned, rather than the error condition only being
> logged. If the error condition is not properly propagated then it could
> lead to data loss.
How is an admin to know which I/O capabilities to check before adding a
device to a RAID array? When is it acceptable to mix I/O capabilities?
Can a RAID array which is not currently being used as a backing store
for a filesystem be assembled of unlike disks? What if it is then
(later) used as a backing store for a filesystem?
One of the advantages people tout for in-kernel software raid (over many
H/W RAID implementations) is the ability to mix disks, so that you're
not reliant on a single vendor during a failure. If this advantage
doesn't extend across certain classes of disk, it would be good to be
unambiguous about what can be mixed and what cannot.
Regards,
--dkg
05-02-2011, 01:04 AM
Ben Hutchings
Bug#624343: linux-image-2.6.38-2-amd64: frequent message "bio too big device md0 (248 > 240)" in kern.log
On Sun, 2011-05-01 at 20:42 -0400, Daniel Kahn Gillmor wrote:
> On 05/01/2011 08:00 PM, Ben Hutchings wrote:
> > On Sun, 2011-05-01 at 15:06 -0700, Jameson Graef Rollins wrote:
> >> Hi, Ben. Can you explain why this is not expected to work? Which part
> >> exactly is not expected to work and why?
> >
> > Adding another type of disk controller (USB storage versus whatever the
> > SSD interface is) to a RAID that is already in use.
> >
> [...]
> > The normal state of a RAID set is that all disks are online. You have
> > deliberately turned this on its head; the normal state of your RAID set
> > is that one disk is missing. This is such a basic principle that most
> > documentation won't mention it.
>
> This is somewhat worrisome to me. Consider a fileserver with
> non-hotswap disks. One disk fails in the morning, but the machine is in
> production use, and the admin's goals are:
>
> * minimize downtime,
> * reboot only during off-hours, and
> * minimize the amount of time that the array is spent de-synced.
>
> A responsible admin might reasonably expect to attach a disk via a
> well-tested USB or ieee1394 adapter, bring the array back into sync,
> announce to the rest of the organization that there will be a scheduled
> reboot later in the evening.
>
> Then, at the scheduled reboot, move the disk from the USB/ieee1394
> adapter to the direct ATA interface on the machine.
>
> If this sequence of operations is likely (or even possible) to cause
> data loss, it should be spelled out in BIG RED LETTERS someplace.
So far as I'm aware, the RAID may stop working, but without loss of data
that's already on disk.
> I don't think any of the above steps seem unreasonable, and the set of
> goals the admin is attempting to meet are certainly commonplace goals.
>
> > The error is that you changed the I/O capabilities of the RAID while it
> > was already in use. But what I was describing as 'correct' was that an
> > error code was returned, rather than the error condition only being
> > logged. If the error condition is not properly propagated then it could
> > lead to data loss.
>
> How is an admin to know which I/O capabilities to check before adding a
> device to a RAID array? When is it acceptable to mix I/O capabilities?
> Can a RAID array which is not currently being used as a backing store
> for a filesystem be assembled of unlike disks? What if it is then
> (later) used as a backing store for a filesystem?
[...]
I think the answers are:
- Not easily
- When the RAID does not have another device on top
- Yes
- Yes
but Neil can correct me on this.
Ben.
--
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
05-02-2011, 01:17 AM
Jameson Graef Rollins
Bug#624343: linux-image-2.6.38-2-amd64: frequent message "bio too big device md0 (248 > 240)" in kern.log
On Mon, 02 May 2011 02:04:18 +0100, Ben Hutchings <ben@decadent.org.uk> wrote:
> On Sun, 2011-05-01 at 20:42 -0400, Daniel Kahn Gillmor wrote:
> So far as I'm aware, the RAID may stop working, but without loss of data
> that's already on disk.
What exactly does "RAID may stop working mean"? Do you mean that this
bug will be triggered? The raid will refuse to do further syncs? Or do
you mean something else?
> > How is an admin to know which I/O capabilities to check before adding a
> > device to a RAID array? When is it acceptable to mix I/O capabilities?
> > Can a RAID array which is not currently being used as a backing store
> > for a filesystem be assembled of unlike disks? What if it is then
> > (later) used as a backing store for a filesystem?
> [...]
>
> I think the answers are:
> - Not easily
> - When the RAID does not have another device on top
This is very upsetting to me, if it's true. It completely undermines
all of my assumptions about how software raid works.
Are you really saying that md with mixed disks is not possible/supported
when the md device has *any* other device on top of it? This is a in
fact a *very* common setup. *ALL* of my raid devices have other devices
on top of them (lvm at least). In fact, the debian installer supports
putting dm and/or lvm on top of md on mixed disks. If what you're
saying is true then the debian installer is in big trouble.
jamie.
05-02-2011, 02:47 AM
"Guy Watkins"
Bug#624343: linux-image-2.6.38-2-amd64: frequent message "bio too big device md0 (248 > 240)" in kern.log
} -----Original Message-----
} From: linux-raid-owner@vger.kernel.org [mailto:linux-raid-
} owner@vger.kernel.org] On Behalf Of NeilBrown
} Sent: Sunday, May 01, 2011 8:22 PM
} To: Ben Hutchings
} Cc: Jameson Graef Rollins; 624343@bugs.debian.org; linux-
} raid@vger.kernel.org
} Subject: Re: Bug#624343: linux-image-2.6.38-2-amd64: frequent message "bio
} too big device md0 (248 > 240)" in kern.log
}
} On Mon, 02 May 2011 01:00:57 +0100 Ben Hutchings <ben@decadent.org.uk>
} wrote:
}
} > On Sun, 2011-05-01 at 15:06 -0700, Jameson Graef Rollins wrote:
} > > On Fri, 29 Apr 2011 05:39:40 +0100, Ben Hutchings
} <ben@decadent.org.uk> wrote:
} > > > On Wed, 2011-04-27 at 09:19 -0700, Jameson Graef Rollins wrote:
} > > > > I run what I imagine is a fairly unusual disk setup on my laptop,
} > > > > consisting of:
} > > > >
} > > > > ssd -> raid1 -> dm-crypt -> lvm -> ext4
} > > > >
} > > > > I use the raid1 as a backup. The raid1 operates normally in
} degraded
} > > > > mode. For backups I then hot-add a usb hdd, let the raid1 sync,
} and
} > > > > then fail/remove the external hdd.
} > > >
} > > > Well, this is not expected to work. Possibly the hot-addition of a
} disk
} > > > with different bio restrictions should be rejected. But I'm not
} sure,
} > > > because it is safe to do that if there is no mounted filesystem or
} > > > stacking device on top of the RAID.
} > >
} > > Hi, Ben. Can you explain why this is not expected to work? Which
} part
} > > exactly is not expected to work and why?
} >
} > Adding another type of disk controller (USB storage versus whatever the
} > SSD interface is) to a RAID that is already in use.
}
} Normally this practice is perfectly OK.
} If a filesysytem is mounted directly from an md array, then adding devices
} to the array at any time is fine, even if the new devices have quite
} different characteristics than the old.
}
} However if there is another layer in between md and the filesystem - such
} as
} dm - then there can be problem.
} There is no mechanism in the kernl for md to tell dm that things have
} changed, so dm never changes its configuration to match any change in the
} config of the md device.
}
} A filesystem always queries the config of the device as it prepares the
} request. As this is not an 'active' query (i.e. it just looks at
} variables, it doesn't call a function) there is no opportunity for dm to
} then
} query md.
}
} There is a ->merge_bvec_fn which could be pushed into service. i.e. if
} md/raid1 defined some trivial merge_bvec_fn, then it would probably work.
} However the actual effect of this would probably to cause every bio
} created
} by the filesystem to be just one PAGE in size, and this is guaranteed
} always
} to work. So it could be a significant performance hit for the common
} case.
}
} We really need either:
} - The fs sends down arbitrarily large requests, and the lower layers
} split
} them up if/when needed
} or
} - A mechanism for a block device to tell the layer above that something
} has
} changed.
}
} But these are both fairly intrusive which unclear performance/complexity
} implications and no one has bothered.
}
} NeilBrown
Maybe mdadm should not allow a disk to be added if its characteristics are
different enough to be an issue? And require the --force option if the
admin really wants to do it anyhow.
Oh, and a good error message explaining the issues and risks.
Guy
--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AFE0035C8E784AF8BE3370E7D72A2595@m5">http://lists.debian.org/AFE0035C8E784AF8BE3370E7D72A2595@m5