Linux Device Mapper development
 help / color / mirror / Atom feed
From: Lars Marowsky-Bree <lmb@suse.de>
To: device-mapper development <dm-devel@redhat.com>, gregkh@suse.de
Cc: hare@suse.de
Subject: Re: A better solution than "md_component_detection = 1"
Date: Sun, 10 Apr 2005 19:29:31 +0200	[thread overview]
Message-ID: <20050410172931.GF12752@marowsky-bree.de> (raw)
In-Reply-To: <000001c5136d$3b3502a0$11051aac@pcp41116>

On 2005-02-15T20:17:10, shahid shaikh <shahid.shaikh@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@suse.de>

-- 
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business

  parent reply	other threads:[~2005-04-10 17:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-15 14:47 md_component_detection = 1 shahid shaikh
2005-02-15 21:20 ` Christophe Varoqui
2005-02-15 21:34   ` Alasdair G Kergon
2005-02-15 21:51     ` Christophe Varoqui
2005-04-10 17:29 ` Lars Marowsky-Bree [this message]
2005-04-19 21:38   ` A better solution than "md_component_detection = 1" Lars Marowsky-Bree
2005-04-19 21:55     ` christophe varoqui
2005-04-20 10:13       ` Lars Marowsky-Bree
2005-04-20 10:36         ` christophe varoqui
2005-04-20 23:42   ` Greg KH
2005-05-03 11:20   ` Lars Marowsky-Bree

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=20050410172931.GF12752@marowsky-bree.de \
    --to=lmb@suse.de \
    --cc=dm-devel@redhat.com \
    --cc=gregkh@suse.de \
    --cc=hare@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox