From: Hannes Reinecke <hare@suse.de>
To: device-mapper development <dm-devel@redhat.com>
Subject: Re: Bug? Determining the holders of partitions shadowed by dm-multipath.
Date: Wed, 11 Feb 2009 08:32:20 +0100 [thread overview]
Message-ID: <49927F04.3070404@suse.de> (raw)
In-Reply-To: <20090210213239.GA30270@mail.oracle.com>
Hi Joel,
Joel Becker wrote:
> On Tue, Feb 10, 2009 at 09:49:58AM -0500, Romanowski, John (OFT) wrote:
>> my sles10sp2 at 2.6.16.60-0.29-default doesn't have the /sys/block/.../holders but
>> I've used major:minor device numbers from commands
>> dmsetup ls
>> and
>> dmsetup deps
>> to resolve such device relationships.
>>
>> A 'dmsetup ls' device number that isn't listed in 'dmsetup deps' device numbers is a top-level device. Example below: mproot-part1 (dev 253:3, a partition of mp device 253:2) isn't listed as a dependency of any device. Likewise each listed LVM volume isn't listed as a dependency of any device; example- rootvg-tmp 253:10
>
> Sure, but a /dev/sda2 won't show up in dmsetup output anywhere.
> That's kind of my point.
>
Well, yes.
That's because you have _two_ parent-child relationship in sysfs.
The one (as you already noted) is the holders / slaves directories in sysfs.
However, partitions are handled differently; they are listed under
/sys/block/sda/sda2
(note the subdir) and do not appear under holders / slaves. So the correct algorithm
is to
a) check the holders / slaves
and
b) check if the parent directory starts with the same name and if so, check for
the holders / slaves relationship there.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
next prev parent reply other threads:[~2009-02-11 7:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-10 0:49 Bug? Determining the holders of partitions shadowed by dm-multipath Joel Becker
2009-02-10 14:49 ` Romanowski, John (OFT)
2009-02-10 21:32 ` Joel Becker
2009-02-11 1:14 ` Romanowski, John (OFT)
2009-02-11 7:32 ` Hannes Reinecke [this message]
2009-02-11 8:03 ` Joel Becker
2009-02-11 8:18 ` Hannes Reinecke
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=49927F04.3070404@suse.de \
--to=hare@suse.de \
--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.