Re: Bug? Determining the holders of partitions shadowed by dm-multipath.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux