device mapper not reporting no-barrier-support?



Hi,

I'm currently stuck between Kernel LVM and DRBD, as I'm using Kernel
2.6.24.2 with DRBD 8.2.5 on top of an LVM2 device (LV).

-LVM2/device mapper doesn't support write barriers
-DRBD uses blkdev_issue_flush() to flush its metadata to disk.
On a no-barrier-device, DRBD should receive EOPNOTSUPP, but
it really does receive an EIO. Promptly, DRBD gives the
error message "drbd0: local disk flush failed with status -5".

The physical disk (in LVM speak) is a RAID1 on a 3ware 9650SE-2LP
controller; the driver 3w-9xxx supports barriers and after moving my D
RBD device from the LV to a single partition on the same RAID1, the
error messages from DRBD vanished.

I've posted a lengty summary of my findings to

http://lists.linbit.com/pipermail/drbd-user/2008-February/008665.html

... where Lars Ellenberg from DRBD basically responded in

http://lists.linbit.com/pipermail/drbd-user/2008-February/008666.html

... that DRBD does catch the EOPNOTSUPP for blkdev_issue_flush and
BIO_RW_BARRIER, but the lvm implementation of blkdev_issue_flush in
2.6.24.2 aparently does return EIO for blkdev_issue_flush.

So simply the question: how should a top-layer driver check wether a lower
device does support barriers? md-raid does check this way differently than
e.g. XFS does, while DRBD also adds a third way to check this.
Or is this "merely" a bug in drivers/md/dm.c?


Anders
--
1&1 Internet AG System Architect
Brauerstrasse 48 v://49.721.91374.50
D-76135 Karlsruhe f://49.721.91374.225

Amtsgericht Montabaur HRB 6484
Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Andreas Gauger,
Thomas Gottschlich, Matthias Greve, Robert Hoffmann, Markus Huhn, Achim Weiss
Aufsichtsratsvorsitzender: Michael Scheeren
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: device mapper not reporting no-barrier-support?
    ... I'm currently stuck between Kernel LVM and DRBD, ... -LVM2/device mapper doesn't support write barriers ... the driver 3w-9xxx supports barriers and after moving my D ...
    (Linux-Kernel)
  • Re: [PATCH 00/16] DRBD: a block device for HA clusters
    ... reorder barriers for the packet stream. ... I couldn't find a call to blk_queue_orderedin the DRBD 8.3.1 source ... This made me wonder how DRBD obtains information about barriers ... I was refering to implicit write after write dependencies, ...
    (Linux-Kernel)
  • Re: [PATCH 00/16] DRBD: a block device for HA clusters
    ... write-after-write dependencies in the stream of writes you get from ... DRBD does exactly this! ... On the secondary node we impose these barriers onto the stream of writes ... guarantee that no implicit write-after-write dependencies are violated. ...
    (Linux-Kernel)
  • Re: [PATCH 00/16] DRBD: a block device for HA clusters
    ... functionality of drbd that you could use. ... Both the in kernel md/nbd and drbd do sync and async replication ... On the secondary node we impose these barriers onto the stream of writes ...
    (Linux-Kernel)
  • 2.6.17.7-grsec x86_64 pdflush killed
    ... i got some scary messages from kernel, pls check it out, wtf is problem ... Aug 7 14:15:50 dude Modules linked in: drbd ... Aug 7 14:51:44 dude NMI Watchdog detected LOCKUP on CPU 0 ... # ACPI Support ...
    (Linux-Kernel)