Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 519742 - sys-kernel/genkernel and >=sys-fs/multipath-tools-0.5 will not find multipath devices
Summary: sys-kernel/genkernel and >=sys-fs/multipath-tools-0.5 will not find multipath...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-12 16:05 UTC by Ian Stakenvicius (RETIRED)
Modified: 2016-05-16 06:53 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
populate udev db manually with scsi_id (chainsaw2.patch,684 bytes, patch)
2014-08-12 16:05 UTC, Ian Stakenvicius (RETIRED)
Details | Diff
genkernel-next-60 patch for multipath-tools-0.5.0-r1 (mpath.patch,529 bytes, patch)
2015-02-02 00:42 UTC, Jacek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Stakenvicius (RETIRED) gentoo-dev 2014-08-12 16:05:41 UTC
Created attachment 382762 [details, diff]
populate udev db manually with scsi_id

multipath-tools-0.5 and above has switched the way it queries for ID_SERIAL from storage devices, so that instead of forking a call to id_scsi it depends uses the API from libudev.

This is generally fine, except that libudev will not return the relevant information without 60*storage.rules having been processed (and the udev database at /run/udev/data populated as a result), and that requires udevd to be running before multipath-tools attempts to query.

There are three solutions to this:

#1 - force multipath-tools to use the deprecated method (forking a call to id_scsi) with a hacky, unstable override in multipath.conf

#2 - integrate udev as the device handler for genkernel initramfs, and require it to be used if multipath is requested

#3 - populate /run/udev/data manually using 'scsi_id'.


Option 1 seems difficult to do and may be removed by upstream at any time.

Option 2 is probably the best overall, but is non-trivial.  IIRC there is already a feature request for udevd integration into genkernel.

Option 3 is surprisingly trivial, due to the fact that the /run/udev/data population seems to be verbatum output from 'scsi_id --export' (indeed, that's what the relevant portions of 60*storage.rules is doing).  I have attached a patch which provides this capability, that can be used until such time as proper udevd integration is added to genkernel initramfs.  Note that I have tested it locally but am still awaiting results of a production test from Chainsaw.
Comment 1 Jacek 2015-02-02 00:40:37 UTC
hi,

genkernel works good, but not in early boot (initrd), so for non root filesystem its ok.

For root fs on multipath you have to have udev in initrd, so there is another way to resolve your issue:
1. unmerge genkernel
2. apply simple patch I prepared for genkernel-next-60 (attached).
genkernel-next has udev integration already, but try to add not neded mpath* files.
3. merge genkernel-next
It works for me.



multipath-tool-0.5.0-r1
patched sys-kernel/genkernel-next-60
IBM storage via four fc paths.
SAN boot, root-fs on lvm on SAN-storage.
j
Comment 2 Jacek 2015-02-02 00:42:49 UTC
Created attachment 395354 [details, diff]
genkernel-next-60 patch for multipath-tools-0.5.0-r1
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-05-16 06:53:34 UTC
[master 5276cd7] defaults/initrd.scripts: bug #519742, fix multipath detection.
 1 file changed, 6 insertions(+)