[dm-devel] A better solution than "md_component_detection = 1"
Lars Marowsky-Bree
lmb at suse.de
Tue Apr 19 21:38:10 UTC 2005
On 2005-04-10T19:29:31, Lars Marowsky-Bree <lmb at suse.de> wrote:
This has generated absolutely no comments, so I'm resending it...
> On 2005-02-15T20:17:10, shahid shaikh <shahid.shaikh at patni.com> wrote:
>
> Sorry about this late reply, but I just stumbled across this post.
>
> To recap, the issue is that we want to prevent LVM2/EVMS2 etc from
> scanning (and using!) the raw physical devices if those are already
> claimed/used by multipath.
>
> LVM2 has a special handling for md_component_detection already; what I
> want to propose in the following is a bit more general, and I've
> discussed it with Hannes before.
>
> Problem: A general solution for finding out whether another component is
> using the device we're looking at.
>
> Proposed solution: Introduce sub-devices into the sysfs tree. (And,
> automatically, backlink those to parent devices, but that's just so the
> tree can be traversed in any order.)
>
> For example, /sys/block/sda would have a sub/ directory with "dm-0" in
> there, pointing at /sys/block/dm-0 (surprise). The
> /sys/block/dm-0/parent/sd{a,b} entries would do a very surprising
> thing.
>
> This would also allow us to handle partitions in DM better: as all
> linear mappings on top of /dev/dm-0 would show up in block/dm-0/sub/ and
> vice versa.
>
> md could work the same: block/sys/md0/parent/ would list all the devices
> (or partitions) which it consists of.
>
> This very simple(?) change would make a number of things much easier to
> figure out.
>
>
> Caveats:
>
> - This obviously only works if the devices are already active, not if
> the specific user is offline; if LVM2 scans before multipath-tools has
> worked its magic, it won't work.
>
> (But then, multipath-tools can figure out that there's already someone
> else using the raw physical device and not mess with it! Woho, world
> saved!)
>
> - This ONLY exports very rudimentary hierarchical information; it won't
> tell you what the device is used for or how. However, that information
> alone would be very helpful already.
>
>
> Greg, Alasdair? List?
>
>
Sincerely,
Lars Marowsky-Brée <lmb at suse.de>
--
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business
More information about the dm-devel
mailing list