]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit - configure.ac
Add device-mapper support to the blkid library
authorKarel Zak <kzak@redhat.com>
Wed, 8 Mar 2006 19:17:28 +0000 (14:17 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 8 Mar 2006 19:17:28 +0000 (14:17 -0500)
commit4db2f59a718c18202a7ce1d559be18bfa1087747
tree406b54316ab495dfec054b38db6cdf45f87cb876
parentd2955d2216889467c1694af3b6691da10712508f
Add device-mapper support to the blkid library

On systems where is multi-path storage device is problem with duplicated
filesystems. The solution is select "the best" device. This is possible
by device-mapper library.

Short quotation from RH bugzilla:

With my patch, all dm devices remains in libblkid cache.

Only the top level dm devices are given high priority
and more appropriate node names (i.e. /dev/mapper/*) are used.

For example, if we have linear mapped dm device "ov1" over
dm device "disk1p3" which is multipath mapped to /dev/sdd3 and /dev/sdh3:
  # dmsetup.static ls --tree
  ov1 (253:5) <-- /dev/mapper/ov1 or /dev/dm-5
   `-disk1p3 (253:4) <-- /dev/mapper/disk1p3 or /dev/dm-4
      `-disk1 (253:0)
         |- (8:112) <-- /dev/sdh
         `- (8:48) <-- /dev/sdd

Original version of blkid will show:
  # ./orig/blkid -t LABEL=mpdisk1p3 -l
  /dev/sdd3: LABEL="mpdisk1p3" ... TYPE="ext3"

With my patch, blkid will show:
  # ./deptree/blkid -t LABEL=mpdisk1p3 -l
  /dev/mapper/ov1: LABEL="mpdisk1p3" ... TYPE="ext3"

In blkid cache, all devices are listed:

  # ./orig/blkid -t LABEL=mpdisk1p3
  /dev/sdd3: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/sdh3: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/dm-4: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/dm-5: LABEL="mpdisk1p3" ... TYPE="ext3"

  # ./deptree/blkid -t LABEL=mpdisk1p3
  /dev/mapper/ov1: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/sdd3: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/sdh3: LABEL="mpdisk1p3" ... TYPE="ext3"
  /dev/dm-4: LABEL="mpdisk1p3" ... TYPE="ext3"

For more details see discussion on:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=156324

Addresses Red Hat Bug: #156324

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
MCONFIG.in
configure
configure.in
lib/blkid/Makefile.in
lib/blkid/blkid.pc.in
lib/blkid/blkidP.h
lib/blkid/devname.c