From: malahal@us.ibm.com
To: dm-devel@redhat.com
Subject: Re: Device-mapper for write monitoring
Date: Thu, 19 Feb 2009 06:28:07 -0800 [thread overview]
Message-ID: <20090219142807.GA26662@us.ibm.com> (raw)
In-Reply-To: <OF2FA15171.EBB61656-ONC2257562.00256C52-C2257562.002C88F5@il.ibm.com>
Michael Keller [MKELLER@il.ibm.com] wrote:
> For our block-based incremental backup software we need to monitor all
> writes to a device, and report them to our user mode application for
> further processing. Our plan is to add a virtual block device of our own
> "on top" of every block device to be monitored. Our driver then intercepts
> all writes to this virtual device, executes the appropriate logic, and
> eventually passes it on to the underlying device.
>
> Should we consider writing this as a dm target?
>
> Some points that came up in discussions with other folks:
> 1. The "mapping" part itself is really trivial - it's an identity mapping.
> Does this mean, we are really abusing the dm infrastructure?
Don't think so. There are targets that have near 'identity mapping'
(dm-delay) and multipath target will have 'identity mapping' too, apart
from managing multiple paths!
In general, dm targets process the I/O without the help of any user land
code for performance.
> 2. What are the actual gains from writing a dm target over writing a
> dedicated driver? The following comes to mind: writing less setup code, a
> user space library, tools (dmsetup).
Yes. But then you will also get all the limitations/unimplemented
features of device-mapper framework too. E.g. barrier support comes to
mind! This is just an example, the simple barrier support might go to
upstream before you actually begin using your target though.
> 3. Are the interfaces of the device mapper relatively stable? (Assume that
> our target is not general enough to be included into mainline, and we'll
> have to do the API chasing ourselves.)
I don't think API changes, if any, give you a big trouble.
> I was also hoping that the device-mapper can somehow help us with
> monitoring the device hosting the root filesystem. Device-mapper apparently
> comes with some special support, which allows it to, e.g., mount root on a
> logical volume. Does this work for any device-mapper targets, or just for
> inbuilt ones? Where do you store the configuration information (dm tables)
> anyway, so that it's accessible before root is mounted?
As far as I know, "dm tables" are not stored persistently by the device
mapper tools. LVM is the one that stores and uses it from
initramfs/initrd. You will have to write your own tools to store the
configuration and use it. These tools will have to be included in the
initramfs/initrd for your thing to work on root device. You may need to
reserve some space on the device to store your configuration!
next prev parent reply other threads:[~2009-02-19 14:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-19 8:06 Device-mapper for write monitoring Michael Keller
2009-02-19 14:28 ` malahal [this message]
2009-02-22 13:18 ` Michael Keller
2009-02-23 5:48 ` malahal
2009-02-19 14:49 ` Alasdair G Kergon
2009-02-22 13:28 ` Michael Keller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090219142807.GA26662@us.ibm.com \
--to=malahal@us.ibm.com \
--cc=dm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.