From: Joel Becker <Joel.Becker@oracle.com>
To: dm-devel@redhat.com
Cc: Sunil Mushran <sunil.mushran@oracle.com>
Subject: Bug? Determining the holders of partitions shadowed by dm-multipath.
Date: Mon, 9 Feb 2009 16:49:51 -0800 [thread overview]
Message-ID: <20090210004951.GA4341@mail.oracle.com> (raw)
Folks,
I think this is a bug.
I I have a device with two paths, sda and sdb. The device is
partitioned into two partitions (sda1, sdb1) and (sda2, sdb2). The
multipath software will create me the devices mpath1, mpath1p1, and
mpath1p2. So far so good.
Now, I need to detect disks used by my software. There is a
signature on disks used by my software, so the basic algorithm is "for
each disk, check for the signature". But, as you know, multipath makes
this fun. You don't want to detect sda1 or sdb1, you want to detect
mpath1. This is true no matter how the devices are arranged (LVM
devices, kpartx of loopbacks, whatever it is). I'll use the term
"toplevel device" to describe a device that is not being used as part
of some other device.
So, how to determine toplevel devices? Well,
/sys/block/.../holders works for that, so I tried it. Sure enough,
/sys/block/sda/holders and /sys/block/sdb/holders point to mpath1. So
my software can reliably ignore sda and sdb. But when I look at
/sys/block/sda1/holders, it is empty.
The disk encompassing sda1 is held by another device. By
extension, sda1 is held. So I think it is a bug that
/sys/block/sda1/holders is empty.
Bug or not, what is the recommended way to determine that
/dev/sda1 should not be used, because you should be using
/dev/mpath/mpath1p1 (or whatever udev name it appears as)?
Joel
--
Life's Little Instruction Book #510
"Count your blessings."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
next reply other threads:[~2009-02-10 0:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-10 0:49 Joel Becker [this message]
2009-02-10 14:49 ` Bug? Determining the holders of partitions shadowed by dm-multipath 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
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=20090210004951.GA4341@mail.oracle.com \
--to=joel.becker@oracle.com \
--cc=dm-devel@redhat.com \
--cc=sunil.mushran@oracle.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.