Bug 243531 - anaconda needs to configure lvm filters for mpath devices
anaconda needs to configure lvm filters for mpath devices
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: anaconda (Show other bugs)
5.0
All Linux
urgent Severity urgent
: ---
: ---
Assigned To: David Cantrell
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-09 10:24 EDT by Bryn M. Reeves
Modified: 2007-11-30 17:07 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-06-27 17:01:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bryn M. Reeves 2007-06-09 10:24:16 EDT
Description of problem:
When using LVM on multipath devices we need to filter out underlying paths to
avoid activating a volume group on a single path rather than the multipath
device. This also prevents LVM scanning from attempting to probe inactive paths
on an active/passive storage controller.

Version-Release number of selected component (if applicable):
anaconda-11.1.2.36

How reproducible:
100%

Steps to Reproduce:
1. Install a multipath system using "linux mpath"
2. Create some root & non-root multipath volumes
3. Reboot
3. Run vgscan -v
4. grep 'filter\ =' /etc/lvm/lvm.conf

Actual results:

Step 3 on an active/passive SAN (EMC Clariion AX150):
# vgscan
  Reading all physical volumes.  This may take a while...
  /dev/sda: read failed after 0 of 4096 at 0: Input/output error
  /dev/sda: read failed after 0 of 4096 at 32212189184: Input/output error
  /dev/sda: read failed after 0 of 4096 at 0: Input/output error
  /dev/sdb: read failed after 0 of 4096 at 0: Input/output error
  /dev/sdb: read failed after 0 of 4096 at 5368643584: Input/output error
  /dev/sdb: read failed after 0 of 4096 at 0: Input/output error
  /dev/sdc: read failed after 0 of 4096 at 0: Input/output error
  /dev/sdc: read failed after 0 of 4096 at 5368643584: Input/output error
  /dev/sdc: read failed after 0 of 4096 at 0: Input/output error
  /dev/sdd: read failed after 0 of 4096 at 0: Input/output error
  /dev/sdd: read failed after 0 of 4096 at 5368643584: Input/output error
  /dev/sdd: read failed after 0 of 4096 at 0: Input/output error
  /dev/sde: read failed after 0 of 4096 at 0: Input/output error
  /dev/sde: read failed after 0 of 4096 at 5368643584: Input/output error
  /dev/sde: read failed after 0 of 4096 at 0: Input/output error
  /dev/sdf: read failed after 0 of 4096 at 0: Input/output error
  /dev/sdf: read failed after 0 of 4096 at 5368643584: Input/output error
  /dev/sdf: read failed after 0 of 4096 at 0: Input/output error
  /dev/sdg: read failed after 0 of 4096 at 0: Input/output error
  /dev/sdg: read failed after 0 of 4096 at 5368643584: Input/output error
  /dev/sdg: read failed after 0 of 4096 at 0: Input/output error
  /dev/sdh: read failed after 0 of 4096 at 0: Input/output error
  /dev/sdh: read failed after 0 of 4096 at 5368643584: Input/output error
  /dev/sdh: read failed after 0 of 4096 at 0: Input/output error
  /dev/sdi: read failed after 0 of 4096 at 0: Input/output error
  /dev/sdi: read failed after 0 of 4096 at 5368643584: Input/output error
  /dev/sdi: read failed after 0 of 4096 at 0: Input/output error
  /dev/sdk: read failed after 0 of 4096 at 0: Input/output error
  /dev/sdk: read failed after 0 of 4096 at 5368643584: Input/output error
  /dev/sdk: read failed after 0 of 4096 at 0: Input/output error
  Found volume group "VolGroup00" using metadata type lvm2


Step 4:
# grep 'filter\ =' /etc/lvm/lvm.conf
    filter = [ "a/.*/" ]
    # filter = [ "r|/dev/cdrom|" ]
    # filter = [ "a/loop/", "r/.*/" ]
    # filter =[ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
    # filter = [ "a|^/dev/hda8$|", "r/.*/" ]


Expected results:
Step 3:
# vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "VolGroup00" using metadata type lvm2

Step 4:
# grep 'filter\ =' /etc/lvm/lvm.conf
    filter = < appropriate filtering rules for devices present at install >
    # filter = [ "r|/dev/cdrom|" ]
    # filter = [ "a/loop/", "r/.*/" ]
    # filter =[ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
    # filter = [ "a|^/dev/hda8$|", "r/.*/" ]

E.g. for the system above this would be:
    filter = [ "a|/dev/mpath|", "r|.*|" ]

All mpath installs will want the "a|/dev/mpath|" rule. If any VGs were created
on non-mpath devices, they will also need an "a|<pattern>|" appropriate to the
PVs used for those VGs.

Users who need to add additional non-mpath PVs post-install will need to adjust
the filters as appropriate - probably requires a mention in the release notes.

Additional info:
Comment 1 David Cantrell 2007-06-15 13:27:04 EDT
I've added this to the post install code:

        # add mpath filters to /etc/lvm/lvm.conf (#243531)
        try:
            conf = self.instPath + '/etc/lvm/lvm.conf'
            if flags.mpath and os.path.isfile(conf):
                f = open(conf, 'w+')
                f.write('filter = [ "a|/dev/mpath|", "r|.*|" ]\n')
                f.close()
        except:
            pass

Is this what we are after?  Just appending that filter line?  I'm also unclear
on the filtering rules for VGs on non-mpath devices.
Comment 2 RHEL Product and Program Management 2007-06-15 13:33:35 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 3 David Cantrell 2007-06-18 14:21:58 EDT
Since this fix is required for the large rhel5-multipath bug, committing the
code and setting state to modified.
Comment 4 David Cantrell 2007-06-20 15:20:45 EDT
Removing this from the RHEL-5 tree as it was determined to cause a regression.
Comment 5 David Cantrell 2007-06-27 16:57:20 EDT
Removing devel ack based on comment #4.
Comment 6 RHEL Product and Program Management 2007-06-27 17:01:32 EDT
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request. 

Note You need to log in before you can comment on or make changes to this bug.